Video website , doesn’t play videos for iOS users , exact error message :
The media could not be loaded, either because the server or network failed or b…
if I access the video file directly ( direct URL … /video.mp4 , then it plays perfectly fine ) . But on the webpage with the video player , it’s showing the error
If cloudflare disabled. Then there are no issues whatsoever.
Everything works fine on Android devices , desktops …
the issue only occurs with iOS devices on both safari and chrome browsers .
Tested on multiple fully updated iOS devices , emulators , same issue .
This issue might be due to how Cloudflare handles byte-range requests which are essential for iOS devices to play media files. Please check your server configuration to ensure it allows byte-range requests. If this doesn’t solve the issue, setting a Page Rule in Cloudflare to bypass caching for the path of your media files can be a potential solution.
Here’s how to set a Page Rule:
Log into your Cloudflare account.
Select your domain.
Go to the “Page Rules” section.
Click “Create Page Rule”.
In the “If the URL matches” field, input the path to your media files.
Eg, *yourdomain.com/*.mp4*
Under “Then the settings are”, choose “Cache Level” and select “Bypass”.
Click “Save and Deploy”.
This rule should bypass Cloudflare’s cache for your media files, allowing them to play correctly on iOS devices.
I have encountered the same problem and upon searching on Google, I discovered that it has been a recurring issue. I attempted to solve it using the suggested solution, but unfortunately, it did not work. It appears that the rule is being disregarded or has no impact.
Has anyone found a solution that doesn’t involve completely disabling Cloudflare?
Hi all, I’m having the same problem but my content is stored in B2 (backblaze), so… I can’t update the server response for mp4 files as recommended above in the answers… would you have any tips for fixing this problem in this type of situation?