videojs / videojs-contrib-eme

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

EME Error with WideVine #49

Open vitaliy-shahanyants opened 6 years ago

vitaliy-shahanyants commented 6 years ago

Hello Everyone,

I have a dash stream with DRM enabled both widevine and playready.

I'm trying to implement this API with videojs-http-streaming, and "videojs-contrib-eme" producing the following error: (index):1 Uncaught (in promise) DOMException: Unsupported keySystem or supportedConfigurations.

The Browser I'm using is Chrome Version 68.0.3440.106.

I tested it on the Microsoft Edge and it worked, but Chrome seems to have trouble.

I also tried on FireFox and got different error message:

"The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol."

Here us the script how I'm implementing the source

player.src([ { src:'', type:'application/dash+xml', keySystems:[{ 'com.widevine.alpha':{ url:'' } }, { 'com.microsoft.playready':{ url:'' } } ] }, { src:'', type:'application/x-mpegURL', }, ]);

Perhaps I'm not implementing the API right, or I'm missing some other libraries ?

gesinger commented 6 years ago

Hey @vitaliy-shahanyants , it looks like your options are all empty there (but it appears in the right format). Would you be able to put together a reduced test case using our starter template with some sources and the options set? Thanks.

vitaliy-shahanyants commented 6 years ago

Unfortunately I'm not authorized to give out our sources, This is why the option are empty.

I have tried using regular videojs with videojs-dash-contrib and dash.js, and that works. The source is DRM protected, and Im passing my licences keys through "keySystemOptions" property. No videojs-contrib-eme import. I'm not sure if videojs imports this library automatically or it's using built in, but I was not using videojs-contrib-eme library.

I just wanted to update to Videojs HTTP-Streaming, and they told me that videojs-contrib-eme library would work with DRM protected streams.

vitaliy-shahanyants commented 6 years ago

Sorry for making this difficult, but I can't give away a lot of information. Here is a screen shot.

screen shot 2018-08-23 at 11 36 54 am
vdmtrv commented 6 years ago

@vitaliy-shahanyants you'll need to declare the audioContentType and videoContentType properties when declaring the Widevine object. You can find that information in the .mpd manifest.

Refer to the example in the README, located just under the excerpt I have extracted below:

The audioContentType and videoContentType properties for non-FairPlay sources are used to determine if the system supports that codec, and to create an appropriate keySystemAccess object. If left out, it is possible that the system will create a keySystemAccess object for the given key system, but will not be able to play the source due to the browser's inability to use that codec.

appsembly-team commented 5 years ago

Quite similar to this. I have followed the directions in this example https://storage.googleapis.com/videoplayer/index2.html. The source can be easily seen.

Whats happening is that the video plays for sometime and it stops. videoplayissue

And if this has a fix, and if i want to pass "Authorization" : "Bearer ....." to the license url, how do we do it? is using getLicense function right approach here?