[webrtc-pc] Ambiguous wording in addIceCandidate

jan-ivar has just created a new issue for 
https://github.com/w3c/webrtc-pc:

== Ambiguous wording in addIceCandidate ==
"If candidate is not null but is missing values for both sdpMid and 
sdpMLineIndex, return a promise rejected with a TypeError."

Provided candidate is not null, is this

    if (!sdpMid && !sdpMLineIndex) { throw new TypeError(); }

or

    if (!sdpMid || !sdpMLineIndex) { throw new TypeError(); }

?

I read it as the former (opposite of s/both/either/), but I could see 
someone reading it as needing "both sdpMid and sdpMLineIndex", for 
which values can't be missing.

Which one is intended, and is there a better way to write this?

Please view or discuss this issue at 
https://github.com/w3c/webrtc-pc/issues/930 using your GitHub account

Received on Wednesday, 9 November 2016 02:30:45 UTC