We are writing a webplayer where we need to determine the DRM system supported by the browser. We used below code to check the DRM type on browser.
keySystems: {
clearkey: ['webkit-org.w3.clearkey', 'org.w3.clearkey'],
widevine: ['com.widevine.alpha'],
playready: ['com.microsoft.playready', 'com.youtube.playready'],
fairplay: ['com.apple.fairplay']
},
Chrome:
navigator.requestMediaKeySystemAccess()
IE:
videoElement.isTypeSupported()
We thought of using webkitGenerateKeyRequest() in Safari. But on Javascript console on Safari I tried to see whether the API is available.
let vel = document.getElementById('videoID');
but vel is not listing webkitGenerateKeyRequest() on Javascript console. Can I use can I use canPlayType() as per the answer Determine DRM system supported by browser .
The problem is it will say 'maybe' to everything instead of determining exactly whether the browser supports the perticular DRM or not. Is there any API to find the DRM supported by browser?