Skip to content

This : (opts || {}).RTCPeerConnection || RTCPeerConnection sometimes returns undefined on ios #54

Open
@magestican

Description

@magestican

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions