'm3u8 + 404 + ios Safari = annoying popup: "The requested URL was not found on this server"

HTML Video tag

if you load m3u8, which is 404 (file not found), on ios Safari( ipad )

annoying popup will be resulted:

"The requested URL was not found on this server"

Is there a way to handle this error, so that pop up won't show.



Solution 1:[1]

First of all the HTML 5 Video tag only supports a dedicated amount of media formats,.


Though "m3u" and "m3u8" files are the basis for the HTTP Live Streaming format used by Apple to stream video to iOS devices. So just in case that your ipad actually can interpret your m3u8 file, there might totally be another problem:

m3u / m3u8 files are only playlist files which contain links to the real media files, so you check out the content of your m3u8 files. I'd strongly advise to use absolute paths in that file instead of relative paths. And make sure that those files are accessible by your device.

Instead of:

#EXTM3U
#EXTINF:123,Some Fancy Video
Some Fancy Video.mp4

it should look similar to this:

#EXTM3U
#EXTINF:123,Some Fancy Video
http://www.example.com/Some Fancy Video.mp4

Solution 2:[2]

I came across a similar error today and problem was in configuration Nginx server. We check the header HTTP_ORIGIN - if origin header (domain) in list then give access else return 404. But iPhone not present it header.

For check access execure command:

curl -I <doman.test>

If response see:

HTTP/2 200

all right!

And yes,

Checked on:

  • IOS 12
  • android 10

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kevin Sandow
Solution 2 gregman