5
如何將本地視頻流發送到多個遠程對等方?我是否需要爲每個遠程對等實例化一個PeerConnection
?或者可以同時使用相同的PeerConnection
用於所有遠程對等方?將本地流發送到多個遠程對等方
如何將本地視頻流發送到多個遠程對等方?我是否需要爲每個遠程對等實例化一個PeerConnection
?或者可以同時使用相同的PeerConnection
用於所有遠程對等方?將本地流發送到多個遠程對等方
根據用戶dom
對#webrtc on irc.w3.org,每個PeerConnection與單個遠程對等關聯。開發人員負責共享同一個流實例多個PeerConnections
:
<Cow_woC> Can a single PeerConnection connect to multiple remote peers, or only a single one at a time? If I want to stream the same video to multiple remote peers, what am I supposed to do?
<dom> Cow_woC, you need to manage several PeerConnection objects
<dom> and plug your video stream to each of them
<Cow_woC> dom: How do I share the camera feed with multiple PeerConnections? Is getUserMedia() allowed to return the same resource (and share it) multiple times?
<Cow_woC> dom: Or am I responsible for keeping the reference around and passing it to multiple PeerConnections?
<dom> the latter
偉大的幫助!謝謝 –