Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix (SUP-46985): Replay button unresponsive when PiP is activated (#809)
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](https://kaltura.atlassian.net/browse/SUP-46985) [SUP-46985]: https://kaltura.atlassian.net/browse/SUP-46985?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
- Loading branch information