Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create RTCIceCandidate? #43

Open
jespermjonsson opened this issue Oct 12, 2015 · 1 comment
Open

Can't create RTCIceCandidate? #43

jespermjonsson opened this issue Oct 12, 2015 · 1 comment

Comments

@jespermjonsson
Copy link

Shouldn't it be possible to create ice candidate instances like this:

new RTCIceCandidate({ candidate: "candidate:1680186374 2 udp 1686052606 10.0.16.1 37198 typ srflx raddr 10.0.1.10 rport 55221 generation 0", sdpMLineIndex: 1, sdpMid: "video" });

On OSX 10.10.5 and Safari 9 I only get "Error calling method on NPObject.". Opening the console on https://doubango.org/webrtc/samples/web/content/peerconnection-states/ and running the above code even produces this error.

@jespermjonsson
Copy link
Author

It seems that after removing the "type check" code from "RTCIceCandidate::Init" in npapi/RTCIceCandidate.cc

RTCIceCandidate* _candidateInitDict = (RTCIceCandidate*)(RTCIceCandidate::IsInstanceOf(npObj) ? npObj : Utils::NPObjectUpCast(npObj));
if (!_candidateInitDict) {
    CHECK_NPERR_RETURN(NPERR_GENERIC_ERROR);
}

I started working for me, why is this check necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant