videojs / videojs-contrib-dash

Video.js plugin for supporting the MPEG-DASH playback through a video.js player
https://videojs.github.io/videojs-contrib-dash/
Apache License 2.0
294 stars 129 forks source link

How to pass the widevine key to video js with video-contrib-dash plugin #209

Open arunvjy opened 7 years ago

arunvjy commented 7 years ago

Hi , I am Trying to load the stream below and getting an error from video js v6.2.5 with video-contrib-dash plugin. Stream : https://s3.us-east-2.amazonaws.com/bairavamultidrm/stream.mpd DRM KeySystem : com.widevine.alpha Proxy: https://wv-gen.test.expressplay.com Browser: chrome v60.0.3112.113 OS: Windows 7

When i tried to play this encrypted mpd file using drm it gives error "No compatible source was found for this media". I tried to play this on below live example link. http://videojs.github.io/videojs-contrib-dash/ Anybody knows how to pass the drm license key to the video-contrib-dash plugin please help me solve this issue.

forbesjo commented 7 years ago

You'll have to test your source on https://videojs.github.io/videojs-contrib-dash/ because of this Chrome update https://www.chromestatus.com/feature/5724389932793856

arunvjy commented 7 years ago

I tested there too. It shows the same error as well.

serv commented 7 years ago

VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media.

For people who's been seeing this error on Chrome, while FF works fine, I noticed that navigator.requestMediaKeySystemAccess is undefined in Chrome for development environment because you most likely is running on http. https://github.com/videojs/videojs-contrib-dash/blob/master/src/js/videojs-dash.js#L239

Chrome enables navigator.requestMediaKeySystemAccess only if the page is served on https.