tangled
alpha
login
or
join now
stream.place
/
streamplace
Live video on the AT Protocol
74
fork
atom
overview
issues
1
pulls
pipelines
remove logging
Natalie B.
8 months ago
6f45b9e1
66386930
-4
1 changed file
expand all
collapse all
unified
split
js
app
components
player
video-retry.tsx
-4
js/app/components/player/video-retry.tsx
···
12
12
const retryTimeoutRef = useRef<NodeJS.Timeout | null>(null);
13
13
const segment = useSegment();
14
14
15
15
-
const status = usePlayerStore((x) => x.status);
16
15
const offline = usePlayerStore((x) => x.offline);
17
16
const spurl = useStreamplaceStore((x) => x.url);
18
18
-
19
19
-
console.log("Status", status, offline);
20
17
21
18
useEffect(() => {
22
19
if (
···
27
24
) {
28
25
const jitter = 500 + Math.random() * 1500;
29
26
retryTimeoutRef.current = setTimeout(() => {
30
30
-
console.log("Detected new segment and stalled state, retrying video");
31
27
lastSegmentRef.current = segment?.startTime;
32
28
}, jitter);
33
29
}