balvinderz/video_player_web_hls

[Question] Any recommendations for handling Safari?

wreppun opened this issue · 3 comments

Videos do not play on either Safari on Mac, or Safari/Chrome on iOS.

There is some discussion of the issue in the hls.js readme.

Any thoughts on how to work around those issues with this plugin?

version: 0.1.5

can you share me the link that is not playing on mac and ios

Ok, after much frustration (Safari + Flutter Web = not easy to debug), I've found that this is not a package issue!
I think I was triggering Safari's guards against autoplay video.

  1. I have a play button on a video thumbnail.
  2. Clicking on the button opens the video in full screen (but on a new screen).
  3. The video starts to play without any additional user action.

This flow would work if I were to do it on the same screen (via a Stack or maybe an Overlay), but since I open the video in a new screen, Safari doesn't like it.

But if I open the video on a new screen, and then require a click, it works.

Why this only triggers Safari's autoplay restrictions, I don't know. I believe chrome has similar restrictions.

Also, thank you for the plugin -- super helpful!