W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > March 2020

Re: [mediacapture-screen-share] Should fire ended track event when shared window/tab is closed. (#136)

From: guest271314 via GitHub <sysbot+gh@w3.org>
Date: Mon, 23 Mar 2020 01:19:22 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-602314429-1584926361-sysbot+gh@w3.org>
> It was reported to us in https://bugzil.la/1615282 that Chrome does this, but Firefox does not.

The implementations of Firefox and Chromium are not consistent.

> The spec should speak about this.

Is expected behaviour not already specified at https://w3c.github.io/mediacapture-main/#track-ended ?

> When a [`MediaStreamTrack`](https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack) _track_ **ends for any reason other than the [stop()](https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack-stop) method being invoked**, the User Agent _MUST_ queue a task that runs the following steps:
> 1. If the _track's_ [`readyState`](https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack-readystate) attribute has the value `ended` already, then abort these steps.
> 2. Set _track's_ [`readyState`](https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack-readystate) attribute to `ended`.
> 3. Notify _track's_ source that _track_ is [ended](https://w3c.github.io/mediacapture-main/#track-ended) so that the source may be [stopped](https://w3c.github.io/mediacapture-main/#source-stopped), unless other [`MediaStreamTrack`](https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack) objects depend on it.
> 4. Fire a simple event named [ended](https://w3c.github.io/mediacapture-main/#event-mediastreamtrack-ended) at the object.
> If the end of the track was reached due to a user request, the event source for this event is the user interaction event source.

GitHub Notification of comment by guest271314
Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/136#issuecomment-602314429 using your GitHub account
Received on Monday, 23 March 2020 01:19:24 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:50 UTC