video-js-contrib-eme can't get initializeMediaKeys to work

1.5k Views Asked by At

In our use case, we need to reuse the same license for multiple sources for different videos, I came across the initializeMediaKeys function, but when called with the following emeOptions:

var emeOptions = { 
              keySystems : {
                  "com.widevine.alpha": { 
                  url : myUrl,
                  audioRobustness: 'SW_SECURE_CRYPTO',
                  videoRobustness: 'SW_SECURE_CRYPTO'
                  }
              }
      }

I've tried several variations of this object as a parameter but I always get a:

instrument.js:109 VIDEOJS: ERROR: (CODE:5 MEDIA_ERR_ENCRYPTED) Unsupported keySystem or supportedConfigurations. 
MediaError {code: 5, message: 'Unsupported keySystem or supportedConfigurations.'}

And opening the media error object I get:

MediaError {code: 5, message: 'Unsupported keySystem or supportedConfigurations.'}
code: 5
message: "Unsupported keySystem or supportedConfigurations."
responseContentType: "application/dash+xml"
responseStatus: 200
responseURL:[REDACTED]
token=[REDACTED]
[[Prototype]]: Object
MEDIA_ERR_ABORTED: 1
MEDIA_ERR_CUSTOM: 0
MEDIA_ERR_DECODE: 3
MEDIA_ERR_ENCRYPTED: 5
MEDIA_ERR_NETWORK: 2
MEDIA_ERR_SRC_NOT_SUPPORTED: 4
code: 0
message: ""
status: null
constructor: ƒ MediaError(value)
[[Prototype]]: Object

Could someone help me or give me a hint? Thanks.

0

There are 0 best solutions below