videojs-contrib-dash
videojs-contrib-dash copied to clipboard
How to set robustness level
How can I set the EME robustness level?
You can set it with mediaPlayer.getProtectionController().setRobustnessLevel('SW_SECURE_CRYPTO');
But I can't find the right place to call this method.
I've tried the beforeinitialize and updatesource hooks. Both do not work.
wondering the same thing. Is this documented anywhere?
Also wondering the same thing I am getting lots of errors in Chrome but its working in Firefox.
I tested that it works with the beforeinitialize hook, and it does. If you find your code is not working, please put it on a codepen so that we can review it for any potential errors.
Here is an example of what you'd do:
var dashSetup = function(player, mediaPlayer) {
mediaPlayer.getProtectionController().setRobustnessLevel('SW_SECURE_CRYPTO');
};
var player = videojs('player');
videojs.Html5DashJS.hook('beforeinitialize', dashSetup);