MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / handleCanPlay

Function handleCanPlay

frontend/src/components/FloatingVideo.jsx:293–306  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

291 seekToStart();
292 };
293 const handleCanPlay = () => {
294 setIsLoading(false);
295 // Final fallback for the Safari native-HLS path where seekable.start(0)
296 // is sometimes only valid by the time `canplay` fires.
297 seekToStart();
298 // Auto-play for VOD content
299 video.play().catch((e) => {
300 console.log('Auto-play prevented:', e);
301 setLoadError('Auto-play was prevented. Click play to start.');
302 });
303 // Show overlay briefly when video is ready, then auto-hide
304 setShowOverlay(true);
305 startOverlayTimer();
306 };
307 const handleError = (e) => {
308 setIsLoading(false);
309

Callers

nothing calls this directly

Calls 2

seekToStartFunction · 0.85
startOverlayTimerFunction · 0.85

Tested by

no test coverage detected