[encrypted-media] Clarify behaviour around discarded browsing contexts and unloaded windows (#466)

SingingTree has just created a new issue for https://github.com/w3c/encrypted-media:

== Clarify behaviour around discarded browsing contexts and unloaded windows ==
What is the appropriate behaviour for `requestMediaKeySystemAccess` when called on a navigator that is associated with a discarded browsing context or with a window that has been unloaded?

For example, I believe the following will attempt to request access via a navigator associated with a discarded browsing context:

```
<iframe></iframe>
<script>
let clearKeyOptions = [
  {
    initDataTypes: ['keyids', 'webm'],
    audioCapabilities: [
      { contentType: 'audio/webm; codecs="opus"' }
    ]
  }];
try {
  let i = document.querySelector("iframe");
  let nav = i.contentWindow.navigator;
  i.remove();
  let mka = nav.requestMediaKeySystemAccess('org.w3.clearkey', clearKeyOptions);
  console.log(mka);
} catch (e) {
  console.log(e);
}
</script>
```

The Window unloaded case has come up in Gecko if we request access as a page is navigated away from.

It makes sense to me that these cases should fail, but would be useful to have that specified.

Please view or discuss this issue at https://github.com/w3c/encrypted-media/issues/466 using your GitHub account

Received on Wednesday, 22 January 2020 17:31:14 UTC