Intent to Deprecate and Remove: RTCPeerConnection#getStreamById(id)

183 προβολές
Παράβλεψη και μετάβαση στο πρώτο μη αναγνωσμένο μήνυμα

Philip Jägenstedt

μη αναγνωσμένη,
14 Απρ 2017, 4:58:33 π.μ.14/4/17
ως blink-dev

Summary

Remove the getStreamById() method for RTCPeerConnection, which is a convenience method for finding a local or remote stream by a particular id.


Motivation

It was removed from the spec in 2014, removed from Gecko, and appears to be used very little in the wild.


Interoperability and Compatibility Risk


The interop risk is associated with Edge and WebKit-based browsers other than Safari at this point.


Edge: No signals. I've filed an issue for removal requesting feedback.

Firefox: Removed

Safari: RTCPeerConnection is not shipped. I've filed an issue for WebKit requesting feedback.


If there is any feedback, I will report back here.

The compat risk was judged by httparchive analysis, where the total number of hits was low, and no cases that would break were found. It looks much safer than some removals we've successfully done.

Alternative implementation suggestion for web developers

From the bug, here is a replacement for anyone that needs it after removal: RTCPeerConnection.prototype.getStreamById = function(id) { try { var localStreams = this.getLocalStreams(); var remoteStreams = this.getRemoteStreams(); var i; for (i = 0; i < localStreams.length; i++) { if (localStreams[i].id == id) return localStreams[i]; } for (i = 0; i < remoteStreams.length; i++) { if (remoteStreams[i].id == id) return remoteStreams[i]; } } catch(e) {} return null; }


The try-catch is because getLocalStreams() and getRemoteStreams() are also non-standard, with an uncertain fate.


Usage information from UseCounter

https://www.chromestatus.com/metrics/feature/timeline/popularity/1645


Rounds to 0, gaps in the timeline means it was literally zero that day.


OWP launch tracking bug

https://crbug.com/698163


Entry on the feature dashboard

https://www.chromestatus.com/feature/5751819573657600


Requesting approval to remove too?

Yes, I would like to deprecate in M60 and remove in M62.

PhistucK

μη αναγνωσμένη,
14 Απρ 2017, 7:38:40 π.μ.14/4/17
ως Philip Jägenstedt, blink-dev
Just a note - I am not sure an HTTPArchive analysis makes sense for WebRTC cases. Homepages would rarely use WebRTC.


PhistucK

--
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+unsubscribe@chromium.org.

TAMURA, Kent

μη αναγνωσμένη,
14 Απρ 2017, 10:59:42 π.μ.14/4/17
ως Philip Jägenstedt, blink-dev
LGTM1

--
TAMURA Kent
Software Engineer, Google


Dimitri Glazkov

μη αναγνωσμένη,
14 Απρ 2017, 11:23:24 π.μ.14/4/17
ως TAMURA, Kent, Philip Jägenstedt, blink-dev
LGTM2

Chris Harrelson

μη αναγνωσμένη,
14 Απρ 2017, 11:26:10 π.μ.14/4/17
ως Dimitri Glazkov, TAMURA, Kent, Philip Jägenstedt, blink-dev
LGTM3

LGTM2

Philip Jägenstedt

μη αναγνωσμένη,
4 Αυγ 2017, 11:33:48 π.μ.4/8/17
ως Chris Harrelson, Dimitri Glazkov, TAMURA, Kent, blink-dev
This has now been removed.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Απάντηση σε όλους
Απάντηση στον συντάκτη
Προώθηση
0 νέα μηνύματα