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

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开发可视对讲的一些问题)