[mediacapture-handle] CaptureHandleChangeEvent.captureHandle() when navigating (#53)

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

== CaptureHandleChangeEvent.captureHandle() when navigating ==
The spec currently reads:
> CaptureHandleChangeEvent.[captureHandle()](https://w3c.github.io/mediacapture-handle/identity/#dom-capturehandlechangeevent-capturehandle):
>
> The track's [CaptureHandle](https://w3c.github.io/mediacapture-handle/identity/#dom-capturehandlechangeevent-capturehandle) at the time the event was fired, as observable by the capturing application. If not observable by the capturing application, all of CaptureHandle's fields will be set to their default value - the empty [DOMString](https://webidl.spec.whatwg.org/#idl-DOMString).

It makes more sense to return the exact same CaptureHandle as would a call to [MediaStreamTrack.getCaptureHandle()](https://w3c.github.io/mediacapture-handle/identity/#capture-handle-via-getcapturehandle). When there is no [observable](https://w3c.github.io/mediacapture-handle/identity/#dfn-observable) CaptureHandle, that means returning `null`. So:

> CaptureHandleChangeEvent.[captureHandle()](https://w3c.github.io/mediacapture-handle/identity/#dom-capturehandlechangeevent-capturehandle):
>
> The track's [CaptureHandle](https://w3c.github.io/mediacapture-handle/identity/#dom-capturehandlechangeevent-capturehandle) at the time the event was fired, as observable by the capturing application. If not observable by the capturing application, returns `null`, as `MediaStreamTrack.getCaptureHandle()` does.

--

Noteworthy - there's a discussion on issue #50 over a suggestion to strip `captureHandle()` out of the event altogether. If that proposal is adopted, the current discussion would be rendered moot. However, until we settle that particular discussion, it makes sense to perform a localized fix here.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 2 May 2022 15:39:33 UTC