videojs / videojs-contrib-hls

HLS library for video.js
http://videojs.github.io/videojs-contrib-hls/
Other
2.84k stars 792 forks source link

Encrypted HLS failed on safari #1343

Closed robov closed 6 years ago

robov commented 6 years ago

I just downloaded safari to test my encrypted (AES) hls stream The encrypted stream plays nicely in chrome, firefox, but on safari I get 'No compatible source was found for this media.'

Any ideas ?

gesinger commented 6 years ago

Hey @robov , Safari will use native playback instead of playback via videojs-contrib-hls. Usually, if a stream fails in Safari, then it points towards an issue with the content. In some cases, our code will still be able to playback this content, however, the content itself could be out of spec.

Just to test this, if you put the m3u8 URL directly in the Safari address bar, does the content still fail?

robov commented 6 years ago

The content is encrypted. could that be the reason why it fails in videojs ?

gesinger commented 6 years ago

videojs-contrib-hls has support for encrypted HLS content. And in this case, since it is failing in Safari, and videojs-contrib-hls uses native (browser) playback for Safari, it looks more like a potential content issue or something separate.

Would you be able to provide the sample m3u8 URL? Thanks.

robov commented 6 years ago

https://tests1.yormy.com/vid/

robov commented 6 years ago

... thanks for your assistance....

robov commented 6 years ago

@gesinger , did you see the issue in safari, and the working file in chrome ? Any ideas how to fix this ?

robov commented 6 years ago

I just got a not that it could not be played on an iphone7 (i cannot test, as I do not have an iphone)

robov commented 6 years ago

On that iphone the flowplayer encrypted hls works : https://flowplayer.blacktrash.org/hls-crypt/ (worked)

robov commented 6 years ago

Any ideas why the videojs is not yet working ?

robov commented 6 years ago

My friend reported that the flowplayer worked on her iphone, however on my windows desktop running safari, the flowplayer also doe not work. On safari I also cannot see the pulling of the m3u8 in the network tab (while I can in chrome)

robov commented 6 years ago

Or another solution could be to force safari to use your code instead of native... would that resolve the issue... and how to do that ?

robov commented 6 years ago

@gesinger .. ps opera also works nicely, only safari F @#%#@ cks up

robov commented 6 years ago

Yes, just confirmed again. Flowplayer works, videojs does not work... I rather use videojs (pricing and open source), but I might have to switch if I cannot get it to work properly on a macoc

robov commented 6 years ago

OR it could be that my encoding on elastic transcoder is set wrong.... what is the best settings to be able to play on ios ? HLS

robov commented 6 years ago

I am using this elastic preset :

HLS v3 (Apple HTTP Live Streaming), 1 megabit/second | 1351620000001-200030

Could that be the issue? If so what prefix should I use instead

gesinger commented 6 years ago

Hey @robov , not sure on specific encoder settings that may help, just a note that Safari's native playback is usually a good bet for if the content is configured properly or not.

However, if you want to try overriding native playback, you can use https://github.com/videojs/videojs-contrib-hls#overridenative . We haven't done much testing on Safari with overrideNative, and have seen some reported issues, but it is an available option.

gesinger commented 6 years ago

Closing for now since we can't provide precise encoder settings, and since Safari has native playback, except for the override native case we can't change the playback The spec has some details on AES encryption and server responsibilities, but won't be able to talk about a specific preset either (see https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3 for details). Please let us know if you encounter any more issues. Thank you.