Skip to content

Unable to create MediaKeys with clearkey on Chrome. Works on firefox

Created by: ashutoshsingh0223

Environment
Steps to reproduce
  1. Please provide clear steps to reproduce your problem
  2. If the bug is intermittent, give a rough frequency if possible
Observed behaviour

Describe what the player is doing that is unexpected or undesired behaviour.

Console output
[3757][ProtectionController] DRM: KeySystem Access Granted (org.w3.clearkey)!  Selecting key system... 
Debug.js:168 [3759][PlaybackController] Native video element event: loadedmetadata 
Debug.js:168 [3760][ScheduleController][audio] Top quality audio index has changed from undefined to 0 
Debug.js:168 [3763][ScheduleController][video] Top quality video index has changed from undefined to 2 
Debug.js:168 [3771][Stream] DRM: KeySystem Access Denied! -- Error selecting key system! -- Error selecting keys system (org.w3.clearkey)! Could not create MediaKeys -- TODO 
doLog @ Debug.js:168
fatal @ Debug.js:123
onProtectionError @ Stream.js:353
(anonymous) @ EventBus.js:88
trigger @ EventBus.js:88
onKeySystemSelected @ ProtectionController.js:538
(anonymous) @ EventBus.js:88
trigger @ EventBus.js:88
(anonymous) @ ProtectionModel_21Jan2015.js:158
Promise.catch (async)
selectKeySystem @ ProtectionModel_21Jan2015.js:157
onKeySystemAccessComplete @ ProtectionController.js:496
(anonymous) @ EventBus.js:88
trigger @ EventBus.js:88
(anonymous) @ ProtectionModel_21Jan2015.js:321
Promise.then (async)
(anonymous) @ ProtectionModel_21Jan2015.js:315
requestKeySystemAccessInternal @ ProtectionModel_21Jan2015.js:330
requestKeySystemAccess @ ProtectionModel_21Jan2015.js:142
(anonymous) @ ProtectionController.js:547
selectKeySystem @ ProtectionController.js:547
onNeedKey @ ProtectionController.js:807
(anonymous) @ EventBus.js:88
trigger @ EventBus.js:88
handleEvent @ ProtectionModel_21Jan2015.js:354
Debug.js:168 [17531][PlaybackController] Native video element event: play 
Debug.js:168 [17543][PlaybackController] Native video element event: waiting 

My encryption works on firefox which means I encryted it right. I am using the example from dashjs samples on this repo. Path samples/drm/clearkey.html

I just changed the prot data to:

const protData = {
                "org.w3.clearkey": {
                    "clearkeys": {
                        "QyFWeBI0EjQSNBI0EjQSNA": "EjQSNBI0EjQSNBI0EjQSNA"
                    }
                }
            };

Is there some other configuration to be done. Everything works on firefox but not on chrome