Safari won't play video from s3 despite 206 response

2.8k Views Asked by At

I am displaying a video with the html5 video element. The source is a pre-signed url from Wasabi s3. It works well on Chrome but it won't play on Safari. I did some research and it seems like this is usually due to the server not being configured to return a 206 code. However, I did check the server and it seems to support byte-range requests.

enter image description here

Here is the network tab. Any help would be greatly appreciated. enter image description here

2

There are 2 best solutions below

10
On BEST ANSWER

Ok, it seems like I usually get stuck on those minuscule problems. Turns out that Safari, unlike Chrome, doesn't like to play files without file extension. Adding ".mp4" to my files solved the problem...

0
On

I had the same issue but my files already had the .mp4 extension.

The issue was the videos were H.265-encoded MP4s but Apple recommends (requires?) H.264-encoded MP4s and mention this in the "Delivering Video Content for Safari" documentation.

Strangely 1 of my H.265-encoded MP4s did load and play but the other, much larger MP4 did not until I changed to H.264-encoded video.

It seems the devil really is in the details.