Javascript 创建一个<;视频>;以及向其附加媒体流
我正在制作一个Javascript 创建一个<;视频>;以及向其附加媒体流,javascript,jquery,webrtc,Javascript,Jquery,Webrtc,我正在制作一个WebRTC应用程序 基本上我有这个代码: rtc.onremotestream = function(event) { //Want code to create a video tag in a specific <div> and then do this: attachMediaStream([THAT NEW VIDEO TAG], event.stream); } rtc.onremotestream=函数(事件){ //希望代码以特定格式
WebRTC
应用程序
基本上我有这个代码:
rtc.onremotestream = function(event) {
//Want code to create a video tag in a specific <div> and then do this:
attachMediaStream([THAT NEW VIDEO TAG], event.stream);
}
rtc.onremotestream=函数(事件){
//希望代码以特定格式创建视频标记,然后执行以下操作:
attachMediaStream([那个新的视频标签],event.stream);
}
我怎么能这样做呢<代码>自动播放必须为真
rtc.onremotestream = function(event) {
var videoTag = document.createElement('video');
document.getElementById('specific_div').appendChild(videoTag);
attachMediaStream(videoTag, event.stream);
}
Works?attachMediaStream(视频标签、事件流)@莫阿霍瓦里哈!真的@MoathHowari你为什么删除你的答案??