videojs / videojs-contrib-eme

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

need better docs for widevine #72

Open ralyodio opened 5 years ago

ralyodio commented 5 years ago

I've scoured the web and its my understanding that all I need to load is videojs-contrib-eme and videojs 7+.

I am loading my mpdurl and a license url but this doesn't seem to work. all the chunks return a 400 which makes me think the license url isn't being set properly.

    <script src="https://unpkg.com/video.js/dist/video.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/videojs-contrib-eme@3.4.1/dist/videojs-contrib-eme.min.js"></script>
    const player = videojs('video');
    player.eme();

    player.ready(function() {
        player.src({
            src: streamUrl,
            type: 'application/dash+xml',
            keySystems: {
                'com.widevine.alpha': {
                    url: licenseUrl
                }
            }
          });
        player.play();
    });
ziddey commented 5 years ago

Widevine should have no effect on delivery of chunks, only their decryption.

samueleastdev commented 5 years ago

I am testing Widevine and having issues its not working in Chrome but it is working in Firefox.

It may be related to this issue that I posted:

https://github.com/videojs/http-streaming/issues/332

I have tested here https://bitmovin.com/demos/drm and everything is working so not sure if its related to and issue loading the DASH manifest or it is a issue with this plugin.

My console is logging the following not sure if it helps.

screenshot 2019-01-10 at 16 28 34
mahogben commented 5 years ago

Doesn't explain the 400 errors, but the keySystems object should be like this:

  keySystems: {
    'com.widevine.alpha': '<your url here>'
  }