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

> 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:

```javascript
const pc = new RTCPeerConnection({ iceTransportPolicy: 'relay' });
pc.setConfiguration({});

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