有没有办法使用 JSON 对象创建自己的 mediaStreamTrack? [英] Is there a way to create your own mediaStreamTrack using say, JSON objects?

查看:51
本文介绍了有没有办法使用 JSON 对象创建自己的 mediaStreamTrack?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

webRTC 上的 mediaStream 接口允许多个 MediaStreamTracks,这些不需要是来自您的相机/麦克风的音频和/或视频流.

The mediaStream interface on webRTC allows multiple MediaStreamTracks and these don't necessary need to be audio and/or video streams from your camera/microphone.

如何使用 JSON 对象创建 MediaStreamTrack?

How can I create a MediaStreamTrack using lets say JSON objects?

推荐答案

在最近的一次会议中 该主题 已在讨论中,将来可能会出现.这可用于允许应用程序使用多个相同类型的设备.

In one of the recent meetings the subject was on the table, and it may be possible in the future. This can be used to allow the application to use more than one device of the same type.

我们将能够创建流轨道的对象,但媒体流始终由浏览器提供.要么是本地媒体流,您可以从 getUserMedia() 方法获取,要么是远程媒体流,您从对等连接接收.

We will be able to create the object of the streams tracks, but the Media Stream is always provided by the browser. Either it is a local Media Stream and you get it from the getUserMedia() method, or it's a remote Media Stream and you receive it from the peer connection.

MediaStreamTrack 是由浏览器 API 创建的对象,其中的媒体(本地或远程)始终由浏览器提供,使用麦克风/摄像头或 PeerConnection 中的媒体.

The MediaStreamTrack is an object created by the browser API and the media in it (local or remote) is always provided by the browser, using microphones/cameras or media from the PeerConnection.

这篇关于有没有办法使用 JSON 对象创建自己的 mediaStreamTrack?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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