将本地流发送到多个远程对等点 [英] Sending a local stream to multiple remote peers

查看:21
本文介绍了将本地流发送到多个远程对等点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将我的本地视频流发送到多个远程对等点?我是否需要为每个远程对等点实例化一个 PeerConnection?或者同一个PeerConnection是否可以同时用于所有远程对等点?

How do I send my local video stream to multiple remote peers? Do I need to instantiate one PeerConnection per remote peer? Or can the same PeerConnection be used for all remote peers at the same time?

推荐答案

根据用户 dom on #webrtc on irc.w3.org,每个 PeerConnection 都与一个远程对等点相关联.开发者负责与多个PeerConnections共享同一个流实例:

According to user dom on #webrtc on irc.w3.org, each PeerConnection is associated with a single remote peer. The developer is responsible for sharing the same stream instance with multiple 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

这篇关于将本地流发送到多个远程对等点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆