micnews / react-jw-player

A React Component API for JW Player

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In Safari, when source file is m3u8 I get an Error: no playable sources found

kshoell opened this issue · comments

I do not see this issue in Chrome or other browsers with the same .m3u8 files.

If I set the file to be an .mp4, it loads successfully.

I found a work around for this. When creating sources I have to add a second source that does not include the type attribute. This appears to work on Safari now.

const sources = [
        // without type, this fails to load in Chrome in my http dev environment
        {
            file: fileUrl,
            type: mimeType,
        },
        // Setting the type on Safari causes the .m3u8 file to fail to load properly
        // This second source will be loaded if the first one fails
        {
            file: fileUrl,
        },
    ]