[mediacapture-fromelement] Define behavior when a cycle is detected (#85)

achronop has just created a new issue for https://github.com/w3c/mediacapture-fromelement:

== Define behavior when a cycle is detected ==
Nothing can prevent from setting the captured stream to the `srcObject` of the HTMLMediaElement that is producing the stream. This can happen in a direct and indirect way. For example:
 ```
// direct
stream1 = element1.captureStream();
element1.srcObject = stream1;
```
```
//indirect
stream1 = element1.capturedStream();
element2.srcObject = stream1;
stream2 = element2.captureStream();
element1.srcObject = stream2;
```
More complicated scenarios can exist if the stream is driven first to the WebAudio API and returns after to the producing element.

This issue is about how the HTMLMediaElement must behave when that happens. I see two options here. One is to throw an error and the second to produce silenced or disabled/muted tracks. Both have tradeoffs. The first is more explicit but it might break existing functionality. The second is less involving but the error might slip unnoticed.

Please view or discuss this issue at https://github.com/w3c/mediacapture-fromelement/issues/85 using your GitHub account

Received on Thursday, 4 June 2020 12:12:31 UTC