1

I am trying to detect this setting because if this is disabled then chrome seems to allow screen capture of DRM protected content.

I have tried the suggestions mentioned in this question and this one but have not been able to successfully detect the setting.

The code I'm using currently is this

var config = [
  {
    initDataTypes: ["cenc"],
    audioCapabilities: [
      {
        contentType: 'audio/mp4;codecs="mp4a.40.2"',
      },
    ],
    videoCapabilities: [
      {
        contentType: 'video/mp4;codecs="avc1.640016"',
        robustness: "SW_SECURE_CRYPTO",
      },
    ],
  },
];
navigator
  .requestMediaKeySystemAccess("com.widevine.alpha", config)
  .then((k) => {
    console.log(k);
    console.log(k.getConfiguration());
  })
  .catch(console.log);

0 Answers0