前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >adapter for webrtc

adapter for webrtc

作者头像
ghostsf
发布2022-09-09 17:38:05
1.3K0
发布2022-09-09 17:38:05
举报
文章被收录于专栏:ghostsf

浏览器直接调用webrtc相关api接口,比如调用PeerConnection。 但是实际上不同浏览器上可能这个API不同:

W3C Standard

Chrome

Firefox

getUserMedia

webkitGetUserMedia

mozGetUserMedia

RTCPeerConnection

webkitRTCPeerConnection

RTCPeerConnection

RTCSessionDescription

RTCSessionDescription

RTCSessionDescription

RTCIceCandidate

RTCIceCandidate

RTCIceCandidate

Note: 参考WebRTC APIs Interop页面的描述。

所以对于H5,推荐用一个adapter.js来支持各种浏览器。

adapter.js is a shim to insulate apps from spec changes and prefix differences in WebRTC. The prefix differences are mostly gone these days but differences in behaviour between browsers remain.

This repository used to be part of the WebRTC organisation on github but moved. We aim to keep the old repository updated with new releases.

这个库的API调用例子,参考Samples,比如PC应该用RTCPeerConnection

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020-09-27,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档