Open Th0masL opened 4 years ago
It really depends on what your backend does when it returns the license and certificate. You may just be able to provide certificateUri or licenseUri rather than using the example. The example shows how you could need processing of the license response to modify it into a value that's useable. I would recommend reading the README and trying again. If you can produce a test case, we can help with figuring out the configuration exactly.
I also am facing this issue. Please help us with the solution.
player.src({ keySystems: { 'org.w3.clearkey' : { getLicense: function(emeOptions, keyMessage, callback){ let keysObject = { "keys": [ { "kty": "oct", "kid": "xnpHFy0Xwd65XCmlKRLTyA", "k": "-j_gr_b9eZfN6Dk28HIyXA" }, { "kty": "oct", "kid": "XH2uNF-6acnCVa4aiYN-4w", "k": "D9sjE4x_5glfXvAE7RAsrg" }, { "kty": "oct", "kid": "plOH2VBd59S9MvSnBz6ndg", "k": "aZsxA1itdQZScbuNgNTYKA" } ] }; callback(null, new TextEncoder().encode(JSON.stringify(keysObject))); } } } });
RangeError: attempting to construct out-of-bounds TypedArray on ArrayBuffer
Using TS container for video framents and AAC for audio fragments 3:08 The 'licenserequestattempted' event of videojs-contrib-eme is not even being emitted. 3:09 Nothing inside getLicense() function is being console logged as well.
I also would love to finally see ClearKey support with HLS.
Hi,
I'm new to videojs, HLS/DASH streaming and encryption/DRM, so I'm going through the examples and try to work my way up to understand exactly how to use this tool.
My needs are simple, as I don't need any official DRM protection. I only want to encrypt the video files with ClearKey, and I don't need to hide the encryption key (the key can be visible in the source code, I don't mind for the moment).
So I've been trying to use the simple example of the encrypted "moose_encrypted.webm" provided in the file videojs-contrib-eme/index-player-options.html but it doesn't work on my side.
The error I get is the following :
The only thing that I have changed from the files I cloned from this Git repository is the path to the .css and .js files, to use the latest version of videojs/EME :
This example has been last updated in 2017, so maybe there are things that are not up to date anymore ?
Could someone offer another simple working example of a basic ClearKey implementation that is working with the current version of videojs/EME ?