ott-web-app icon indicating copy to clipboard operation
ott-web-app copied to clipboard

Support autoplay on Safari

Open marcovandeveen opened this issue 2 years ago • 0 comments

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

  1. On page load, mute the video and start playing (Safari allows muted autoplay).
  2. When the user unmutes the video, capture the click event.
  3. 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.
  4. When the user clicks on another video, do 3i and 3ii.

marcovandeveen avatar Nov 18 '22 07:11 marcovandeveen