美文网首页WebRTC
ionic——使用webrtc开发可视对讲的一些问题

ionic——使用webrtc开发可视对讲的一些问题

作者: 一只飞 | 来源:发表于2017-06-16 15:04 被阅读110次

    1、
    错误信息:window.RTCPeerConnection is not a constructor
    错误信息:sendto() has failed twice returning a transient error net::ERR_ADDRESS_UNREACHABLE. Dropping the packet.
    错误信息:Failed to execute 'addIceCandidate' on 'RTCPeerConnection': The 1st argument
    改为:
    var PeerConnection = window.mozRTCPeerConnection || window.webkitRTCPeerConnection; pc = new PeerConnection(iceServer);
    2、
    错误信息:
    [Deprecation] getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
    改为:
    ionic serve --address 127.0.0.1
    chrome浏览器认为安全的地址:127.0.0.1,localhost,https开头的地址
    3、
    手机上测试,需要有使用相机、麦克风权限;
    错误信息:"Uncaught TypeError: Cannot read property 'then' of undefined"
    以下插件:
    android-camera-permission
    cordova-plugin-media
    cordova-plugin-media-capture
    cordova-plugin-android-permissions
    cordova-plugin-crosswalk-webview

    待续。。。。

    相关文章

      网友评论

        本文标题:ionic——使用webrtc开发可视对讲的一些问题

        本文链接:https://www.haomeiwen.com/subject/ngqmqxtx.html