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

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