2012-12-18 14 views
5

Come si invia il flusso video locale a più peer remoti? Devo istanziare uno PeerConnection per peer remoto? Oppure è possibile utilizzare lo stesso PeerConnection per tutti i peer remoti contemporaneamente?Invio di uno stream locale a più peer remoti

risposta

12

Secondo l'utente dom su #webrtc on irc.w3.org, ogni PeerConnection è associato a un singolo peer remoto. Lo sviluppatore è responsabile della condivisione della stessa istanza di streaming con più 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

Grande aiuto! Grazie –

Problemi correlati