ghostsf

ghostsf

Do what i love and just do it !

adapter for webrtc

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

W3C StandardChromeFirefox
getUserMediawebkitGetUserMediamozGetUserMedia
RTCPeerConnectionwebkitRTCPeerConnectionRTCPeerConnection
RTCSessionDescriptionRTCSessionDescriptionRTCSessionDescription
RTCIceCandidateRTCIceCandidateRTCIceCandidate

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

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.