OdyseeTeam / odysee-frontend

The code that runs odysee.com
https://odysee.com
MIT License
208 stars 65 forks source link

Unable to resume video in background in Safari on ios 12.5.7 #2890

Open anohren opened 1 year ago

anohren commented 1 year ago

Bug

When locking the screen or otherwise putting Safari in the background on iOS 12.5.7 while playing a video, playback is stopped and the video is removed from Control Center making it impossible to resume playback in order to listen without watching.

This puts Odysee on equal footing with YouTube in this aspect, undermining my incentive to use Odysee to begin with. It's literally the reason I went from watching the same video on YouTube to playing it on Odysee.

To Reproduce Steps to reproduce the behavior:

  1. Start playing a (any?) video in Safari on iPhone. I used an iPhone 6 in this case.
  2. Lock the screen or press the home button to put Safari in a background state.
  3. Playback stops
  4. The video is removed from control center and can not be resumed

Expected behavior

If I want to listen to a video I should be able to not waste battery on illuminating the screen.

System Configuration

Additional context

Tested on an iPhone 6. This can not be upgraded to run the iOS Odysee app.

Can Safari do this normally? Yes. E.g. videos on EEVBlog.org/video can be resumed in the background.

anohren commented 1 year ago

In fact, after testing this repeatedly and failing every time, now it suddenly doesn't stop playback when putting Safari in the background.

Very difficult to pinpoint whether the problem is in Safari or in the web app...

tzarebczan commented 1 year ago

Sorry to hear. Seems to also be broken on latest IOS, I had to enable some experimental features to even get it to show in the control center. We'll see if there's any easy fixes related to VideoJS and this issue.

anohren commented 1 year ago

Yeah, I think it might have to do with Safari the more I think about it.

I seem to recall struggling with this inconsistent behavior previously, as well as exploit it to actually play Youtube in the background (which was possible with some messing about with the timing of when Safari went into the background.)

I haven't really tried it on iOS 16 since I can just use the Odysee app there.

As long as it's not intended behavior I'm available to test on iOS 10, 12 and 16. Also open to enabling experimental features if that would help.