W3C home > Mailing lists > Public > public-media-capture@w3.org > May 2017

[mediacapture-main] How to handle changes to the set of tracks in a MediaStream assigned to an element via the srcObject attribute

From: guidou via GitHub <sysbot+gh@w3.org>
Date: Wed, 17 May 2017 10:48:36 +0000
To: public-media-capture@w3.org
Message-ID: <issues.opened-229311642-1495018115-sysbot+gh@w3.org>
guidou has just created a new issue for https://github.com/w3c/mediacapture-main:

== How to handle changes to the set of tracks in a MediaStream assigned to an element via the srcObject attribute ==
The spec says:

> The User Agent must always play the current data from the MediaStream and must not buffer.

However, the exact mechanism for this is not explained.

I tested adding and removing tracks to a stream with Edge, and it apparently runs the [https://html.spec.whatwg.org/multipage/embedded-content.html#media-element-load-algorithm](load algorithm) every time the set of tracks changes, since it fires the emptied and loadstart events on track addition/removal.

On Firefox, adding a track results in it being rendered by the element, but the full load algorithm does not run, since loadstart/emptied are not fired. Removing a track is ignored since the track keeps on playing.

On Chromium, both adding and removing a track is ignored by the element. I was actually trying to fix this bug on Chromium and initially went the Edge way, but @foolip suggested that the Firefox approach might more in line with the way the media element is supposed to work.

Should a specific approach be specified here, or are both approaches equally valid?
 

Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/453 using your GitHub account
Received on Wednesday, 17 May 2017 10:48:43 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 17 May 2017 10:48:44 UTC