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

待续。。。。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,288评论 19 139
  • afinalAfinal是一个android的ioc,orm框架 https://github.com/yangf...
    passiontim阅读 15,647评论 2 45
  • 进入2017年,突然发现越来越大脑迟钝,跟不上节奏了,刚刚还没弄明白罗胖跨年演讲的母爱算法和父爱算法,又看到一篇“...
    元初阅读 311评论 0 0
  • 1 初识陈子昂,是在当老师时,跟学生讲了他的诗歌。 就是那首传诵千古的《登幽州台歌》—— 前不见古人,后不见来者,...
    这个作者有点冷阅读 804评论 2 5
  • 喵屋屋阅读 97评论 0 0