videojs / videojs-contrib-eme

Supports Encrypted Media Extensions for playback of encrypted content in Video.js
Other
203 stars 72 forks source link

Unable to play DRM HLS video in Safari #90

Closed bishnupradhan closed 5 years ago

bishnupradhan commented 5 years ago

I'm trying to set up DRM using videojs 7.5.4, videojs-contrib-eme 3.5.4, ExpressPlay, and bento4tool mp4hls. I'm currently focusing on FairPlay on Safari 12.1.1 on macOS 10.14.5 using HLS packaging.

My player is loaded with no console error and correctly retrieves the FairPlay certificate, the expressplay license, segments, but the screen turns to green/black. The video could not be played.

Here is my code snippet:

var player = videojs('vid1'); player.eme(); player.src({ src: hlsUrl, type: 'application/x-mpegURL', keySystems: { 'com.apple.fps.1_0': { certificateUri: "/fairplay.cer", licenseUri: licenseUrl } } });

bishnupradhan commented 5 years ago

I have found out the cause as the mismatch between IV used at encryption Vs. IV used in the ExpressPlay token. The issue resolved, so closing it. Ref: https://developer.apple.com/library/archive/technotes/tn2454/_index.html