ott-web-app
ott-web-app copied to clipboard
Support autoplay on Safari
Safari requires a user gesture to play video in a
So Safari will not autoplay the video
Yet Youtube and other video sites found a way around this.
Something like this
- On page load, mute the video and start playing (Safari allows muted autoplay).
- When the user unmutes the video, capture the click event.
- In the event handler, do this: When the video ends, load another one and play it. Update the rest of the web page and the URL dynamically.
- When the user clicks on another video, do 3i and 3ii.