MP4 Won't Load in Safari Using CloudFlare

Just a heads up to anyone still having problems with this

I have played around with this a fair bit and this seems to be a mix between CF returning a 200 Status for video files and Safari only accepting a 206 Status for video

Chrome and Firefox are fine with a 200 Status. However; Safari on both iOS and OS seems to throw in the towel.

I think the issue is caused by having a ‘Cache Everything’ rule on a domain/media directory. This is recommended fairly widely as a way max out the edge-cache lifespan for static assets.

The solution is to exclude mp4/whatever your video file of choice is from the cache. You can prioritise a second rule after the cache everything rule

https://www.domain.tld/mediapath*/*.mp4*
Cache Level: Bypass Cache

This results in mp4s being served up from origin with a correct 206 header.

Long term either CF needs to modify the header on video assets to return a 206 status code; or we need to wait for Safari to sort out how it handles media with a 200 status.