Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (SUP-46985): Replay button unresponsive when PiP is activated #809

Merged
merged 5 commits into from
Feb 25, 2025

Conversation

yambenari24
Copy link
Contributor

@yambenari24 yambenari24 commented Feb 20, 2025

Issue:
On safari, when PiP is open, video ends and try to play it again with start over, nothing happened.
Safari PiP locks the video in an "ended" state, preventing .play() from restarting playback unless the video is explicitly paused and its currentTime is reset.
Unlike Chrome, Safari doesn't automatically reset currentTime to 0 when a video ends.

Fix:
Added a browser check to detect Safari using the user agent.
Applied a conditional reset of the video (pause() and currentTime = 0) only when:
The browser is Safari.
The video is in Picture-in-Picture (PiP) mode.

solved SUP-46985

@yambenari24 yambenari24 merged commit 41798fd into master Feb 25, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants