Primary eng (and PM) emails
Eng: gui...@chromium.org, h...@chromium.org,
Summary
Deprecate MediaStream ended event
Motivation
The MediaStream ended event and attribute, and onended attribute are not part of the WebRTC spec since 2013. The ended attribute has been replaced with the active attribute and the ended event has been replaced with the active and inactive events. Blink no longer supports the ended attribute, but it still provides some support for the ended event and the corresponding onended attribute.
The support for the ended event in Blink is limited to firing the event the first time all the tracks associated with a MediaStream end. Note that this event does not actually mean that the MediaStream has “ended”, as this concept no longer exists. It is possible for a MediaStream whose tracks have ended (and has thus become inactive) to become active again if a new active MediaStreamTrack is added to the MediaStream. If the MediaStream becomes inactive again, no ended event is fired.
Our plan is to deprecate the ended event in M52 and remove it in M53.
Compatibility Risk
With regards to existing Web sites, the future removal of the MediaStream ended event and onended attribute represents a moderate compatibility risk, as the feature has been supported for several years.
However, the feature is not used much. The onended attribute is used by 0.0007% of pages in the stable channel (M50) according to our use counters. This does not include, however, uses of the ended event using the addEventListener method.
With regards to interoperability with other browser engines, this change will make Blink more compatible with Edge, WebKit and Firefox. Edge[1] and WebKit[2,3] do not support the ended event or attribute. Mozilla’s MDN documentation[4] lists the MediaStream ended attribute and event as deprecated features, and the WebIDL Firefox source code[5] suggests that the ended event or attribute are not supported.
[2] https://trac.webkit.org/browser/trunk/Source/WebCore/Modules/mediastream/MediaStream.idl
[3] https://trac.webkit.org/browser/trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp
[4] https://developer.mozilla.org/en/docs/Web/API/MediaStream
[5] http://mxr.mozilla.org/mozilla-central/source/dom/webidl/MediaStream.webidl
Alternative implementation suggestion for web developers
The functionality previously provided by the ended event and onended attribute is now provided by the inactive event and the oninactive attribute, which are fully supported by Blink.
Usage information from UseCounter
https://www.chromestatus.com/metrics/feature/timeline/popularity/526
OWP launch tracking bug
Entry on the feature dashboard
https://www.chromestatus.com/feature/5730404371791872
Requesting approval to remove too?
No
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Discussion was that applications serious about watching for events would watch the tracks not the stream, and people who really want it can easily synthesize them from track events.