Bug 144088 - CreatePeerConnection API cannot pass null server argument
Summary: CreatePeerConnection API cannot pass null server argument
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-22 21:46 PDT by Adam Tiamiou
Modified: 2017-06-13 23:40 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Tiamiou 2015-04-22 21:46:16 PDT
When we do, in the minibrowser, the instruction "new RTCPeerConnection(servers, pcConstraint);" with "servers = null;" the inspector show "TypeError: RTCPeerConnection argument must be a valid Dictionary" 

We have found that this error was raised in JSRTCPeerConnectionCustom.cpp line 59. We think the problem is related to the instruction "rtcConfiguration.isObject()" Line 58.
Comment 1 Jon Lee 2017-06-13 19:26:30 PDT
Spec has changed a bit since this was first reported.
Comment 2 youenn fablet 2017-06-13 23:40:21 PDT
Instead of doing "new RTCPeerConnection(servers, pcConstraint);", you might need to use https://www.w3.org/TR/webrtc/#dom-rtcconfiguration dictionary.
That would end-up with something like: "new RTCPeerConnection({iceServers: servers, ... });"

Also "servers" must use "urls" and not "url" as per https://www.w3.org/TR/webrtc/#dom-rtciceserver.