W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > July 2017

Re: [webrtc-pc] setConfiguration throwing InvalidModificationError with default values

From: Soares Chen via GitHub <sysbot+gh@w3.org>
Date: Thu, 06 Jul 2017 07:25:50 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-313317922-1499325948-sysbot+gh@w3.org>
> Do we just need to change the wording to be more clear, or do you think the error being thrown is a problem?

In general I find the behavior of default values in `setConfiguration` to be unintuitive and may bring surprise to unfamiliar users. Other than the issues mentioned above and #1454, the default value for `iceTransportPolicy` can also cause unexpected bug:

const pc = new RTCPeerConnection({ iceTransportPolicy: 'relay' });

pc.getConfiguration().iceTransportPolicy; // now become 'all'

The coding convention @taylor-b mentioned above can workaround the issue. But that means users would need to follow the convention to avoid unexpected bugs, and there should be notes some where to recommend the coding convention.

GitHub Notification of comment by soareschen
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1447#issuecomment-313317922 using your GitHub account
Received on Thursday, 6 July 2017 07:25:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:21:40 UTC