2012-12-18 35 views
5

Làm cách nào để gửi luồng video cục bộ của tôi tới nhiều đối tác từ xa? Tôi có cần phải nhanh chóng một PeerConnection cho mỗi máy ngang hàng từ xa không? Hoặc có thể sử dụng cùng một PeerConnection cho tất cả các đồng nghiệp từ xa cùng một lúc không?Gửi luồng cục bộ tới nhiều đối tác từ xa

Trả lời

12

Theo người dùng dom trên #webrtc on irc.w3.org, mỗi PeerConnection được liên kết với một đồng đẳng từ xa duy nhất. Nhà phát triển chịu trách nhiệm chia sẻ cùng một phiên bản luồng với nhiều 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 
+0

Trợ giúp tuyệt vời! Cảm ơn bạn –

Các vấn đề liên quan