Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/react/src/LazyVideo/LazyVideoClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ export default function LazyVideoClient({
onPause?.();
};

// Add listeners
if (videoElement) {
videoElement.addEventListener("play", handlePlay);
videoElement.addEventListener("pause", handlePause);

// Sync state in case the video started playing before hydration
setVideoPaused(videoElement.paused);
Comment on lines 110 to +114
}

// Cleanup
Expand Down
Loading