tickets
This commit is contained in:
@@ -152,7 +152,7 @@ const PlaybackItem = ({ item, isActive, userCache, getUserByUid }) => {
|
||||
// Micro-correction initiale uniquement pour absorber un léger décalage réseau
|
||||
useEffect(() => {
|
||||
if (!isActive || !hasExternalAudio) return;
|
||||
const t = setTimeout(() => {
|
||||
const t = global.setTimeout(() => {
|
||||
try {
|
||||
const a = audioPlayer?.currentTime || 0;
|
||||
const v = videoPlayer?.currentTime || 0;
|
||||
@@ -161,7 +161,7 @@ const PlaybackItem = ({ item, isActive, userCache, getUserByUid }) => {
|
||||
}
|
||||
} catch (e) {}
|
||||
}, 300);
|
||||
return () => clearTimeout(t);
|
||||
return () => global.clearTimeout(t);
|
||||
}, [isActive, hasExternalAudio, audioPlayer, videoPlayer]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -190,7 +190,7 @@ const PlaybackItem = ({ item, isActive, userCache, getUserByUid }) => {
|
||||
const [currentTimeS, setCurrentTimeS] = useState(0);
|
||||
useEffect(() => {
|
||||
if (!isActive) return;
|
||||
const id = setInterval(() => {
|
||||
const id = global.setInterval(() => {
|
||||
try {
|
||||
const t = hasExternalAudio
|
||||
? Number(audioPlayer?.currentTime || 0)
|
||||
@@ -198,7 +198,7 @@ const PlaybackItem = ({ item, isActive, userCache, getUserByUid }) => {
|
||||
setCurrentTimeS(t);
|
||||
} catch (e) {}
|
||||
}, 250);
|
||||
return () => clearInterval(id);
|
||||
return () => global.clearInterval(id);
|
||||
}, [isActive, hasExternalAudio, audioPlayer, videoPlayer]);
|
||||
|
||||
// partage: géré via l'API native Share directement dans l'UI
|
||||
@@ -530,7 +530,7 @@ const Playbacks = () => {
|
||||
if (idx >= 0) {
|
||||
setActiveIndex(idx);
|
||||
// give time for first render before scrolling
|
||||
setTimeout(() => {
|
||||
global.setTimeout(() => {
|
||||
try {
|
||||
carouselRef.current?.scrollTo?.({ index: idx, animated: false });
|
||||
} catch (e) {}
|
||||
|
||||
Reference in New Issue
Block a user