On Tue, Aug 25, 2015 at 2:16 PM, Ehsan Akhgari <ehsan.akhg...@gmail.com> wrote:
> On 2015-08-25 4:07 PM, Martin Thomson wrote:
>>
>> WebRTC was shipped with a prefix.
>>
>> Bug 1155923 moves our codebase to non-prefixed names, but includes a
>> patch to restore aliases with the prefix.  Thus we will expose
>> `RTCPeerConnection` and use that ourselves, but permit legacy code to
>> use `mozRTCPeerConnection`.
>
> Is our RTCPeerConnection and the corresponding spec considered as stable?

Stable enough to use the name, certainly [see
https://tools.ietf.org/html/rfc6648].  But maybe that wasn't your
question...

The core parts of the spec are stable and have been for years.  There
are parts that are still unstable.  I don't expect that to change
appreciably for some time, even though the W3C working group has a
goal for a big 1.0 release.

>> Maybe some day we can remove the aliases by just backing out the patch
>> that creates prefixed aliases, but that seems unlikely in the short
>> term [1][2].
>
> Do the aliases only work when you call them or can the webpage also detect
> them?  IOW, what would code like below do?
>
> if (window.mozRTCPeerConnection)
>   foo();
> else if (window.RTCPeerConnection)
>   bar();

The following code would call foo().  In the patch that I have,
mozRTCPeerConnection looks exactly like RTCPeerConnection.  That means
that window.mozRTCPeerConnection is present, can be instantiated, can
be tested with instanceof, and can be passed to any functions that
accept RTCPeerConnection (there aren't any that I can think of there).

The only difference I'm aware of is that constructing the prefixed
version drops a polite warning (using document->WarnOnceAbout()) into
the console.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to