w3c / mediacapture-handle

https://w3c.github.io/mediacapture-handle/
Other
14 stars 10 forks source link

CaptureHandleChangeEvent.captureHandle() when navigating #53

Closed eladalon1983 closed 2 years ago

eladalon1983 commented 2 years ago

The spec currently reads:

CaptureHandleChangeEvent.captureHandle():

The track's 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.

It makes more sense to return the exact same CaptureHandle as would a call to MediaStreamTrack.getCaptureHandle(). When there is no observable CaptureHandle, that means returning null. So:

CaptureHandleChangeEvent.captureHandle():

The track's 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.

eladalon1983 commented 2 years ago

Rendered irrelevant by other changes. Closing.