2

How would one stream a local media file(video file) to peers?( i am using janus-gateway - videoroom plugin for this ).

For audio there is webAudio, but what about the video?

Thanks!

Update: Maybe someone has an example? Or a small code snippet? Maybe a link to some lib?

4

1 回答 1

4

在 Canvas 上渲染本地视频并从 Canvas 元素创建流对象。然后您可以将流添加到 PeerConnection。然后流将被发送到远程对等点(Janus/浏览器/任何服务器)。

演示: https ://webrtc.github.io/samples/src/content/capture/canvas-pc/

来源: https ://github.com/webrtc/samples/blob/gh-pages/src/content/capture/canvas-pc/js/main.js#L45

于 2016-11-02T07:29:42.207 回答