W3C home > Mailing lists > Public > public-webrtc@w3.org > October 2016

Re: setRemoteDescription(RTCSessionDescriptionInit) rather than setRemoteDescription(RTCSessionDescription)

From: Jan-Ivar Bruaroey <jib@mozilla.com>
Date: Sun, 9 Oct 2016 10:48:23 -0400
To: Iñaki Baz Castillo <ibc@aliax.net>, "public-webrtc@w3.org" <public-webrtc@w3.org>
Message-ID: <cc013200-ad7a-7dc8-0da6-d86159219c12@mozilla.com>
On 10/9/16 10:16 AM, Iñaki Baz Castillo wrote:
> Hi,
>
> According to https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-setremotedescription,
> setRemoteDescription() must be called with a RTCSessionDescriptionInit
> (an Object) rather than a RTCSessionDescription instance.
>
> Is this true? AFAIR, in previous spec versions setRemoteDescription()
> requires a RTCSessionDescription instance (created via new
> RTCSessionDescription).

Yes, see https://github.com/w3c/webrtc-pc/pull/302.

If your site uses adapter.js this is already covered. 
https://github.com/webrtc/adapter/pull/266

Much nicer. Here's an example: https://jsfiddle.net/2v1Lnpmx/

This is a 100% backwards compatible, since an RTCSessionDescription 
interface is an acceptable input to an RTCSessionDescriptionInit 
parameter, by design (all the initDict patterns effectively allow copy 
construction).

.: Jan-Ivar :.
Received on Sunday, 9 October 2016 14:48:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:49 UTC