-
Notifications
You must be signed in to change notification settings - Fork 10
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
This : (opts || {}).RTCPeerConnection || RTCPeerConnection sometimes returns undefined on ios #54
Comments
Hi Bryan, I had a look through this, and I think this is the scenario you are attempting to fix:
If this is correct, rather than the solution in the patch, is it possible to use the mechanism for passing in a custom For example:
Let me know if you think whether that is an appropriate solution, or if I have misunderstood in some way. Cheers, |
Hey @nathanoehlman , that is exactly the scenario which I was running into, and your solution looks to be doing the right thing, fixing this problem. I have updated the PR with a comment on the line giving the error so that it would help other people in the future if they run into the same, it would probably be better to give out a console.warn statement however, let me know what you think. Regards, Bryan |
Hello, I'm having the exact same issue with the rtc-quickconnect sample code, but I'm using Node.js. I don't have a "window", so I'm not sure how to fix the problem in a server-only environment. |
On an environment with quickconnect together with cordova + libwebrtc on an ios device, this statement returns undefined sometimes and causes an error of which the application never recovers resulting in failure of call initialization.
The scenario where this happens is when opts does not have RTCPeerConnection property, however RTCPeerConnection exists as a global variable, therefore that indicates this in-line statement is wrong.
Maybe a clearer code would be
(opts && opts.RTCPeerConnection) ? opts.RTCPeerConnection : RTCPeerConnection
PS : I dont understand the {}.RTCPeerConnection from this logic, it will always return undefined.
The text was updated successfully, but these errors were encountered: