sergix44 / XBackBone

A lightweight file manager with full ShareX support and more
https://xbackbone.app
GNU Affero General Public License v3.0
993 stars 81 forks source link

mp4 does not play in safari #557

Closed gramakri closed 8 months ago

gramakri commented 9 months ago

System Info

Describe the bug Upload a mp4 file . The video does not play in Safari (on Desktop or iOS). It plays fine on all other browsers.

To Reproduce Steps to reproduce the behavior:

  1. Upload mp4. I used the mp4 in https://mobamotion.mobatek.net/samples/sample-mp4-video.html
  2. Open link . It works everywhere except Safari
  3. The video appears to be "stuck"

Expected behavior mp4 video should play

gramakri commented 9 months ago

Some background - https://forum.cloudron.io/topic/10723/mp4-files-not-playing-in-safari-on-iphones

I was debugging this a bit. Initially, I thought this was because of "/raw" in the source URL. I renamed this to raw.mp4 but it doesn't need to matter for Safari.

It looks like there is some issue with the response XBackBone sends for content range requests. See https://stackoverflow.com/questions/30199261/why-wont-safari-play-file-without-extension-in-video , https://github.com/rwf2/Rocket/issues/806 , https://github.com/jooby-project/jooby/issues/523 and https://stackoverflow.com/questions/32996396/safari-9-0-can-not-play-mp4-video-on-the-storage-server for related issues. I am still debugging , will update this issue as I find any more info to add.

gramakri commented 9 months ago

Removing the autoplay tag for video makes it work on iphone. But it still doesn't work on desktop safari.

gramakri commented 9 months ago

FWIW, playsinline doesn't seem to help on desktop safari.

sergix44 commented 8 months ago

I dont have any Apple device to test Safari sadly, if you find a way to make it work feel free to open a PR