【发布时间】:2017-12-19 19:22:09
【问题描述】:
我必须使用 webrtc 将流发送到 wowza url。我能够将网络摄像头流显示到浏览器,但为了更进一步,我对此一无所知。
var videoContainer = document.getElementById('video'),
vendorUrl = window.URL || window.webkitURL;
navigator.getMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
var code;
navigator.getMedia({
video:true,
audio:false
}, function (stream){
code = vendorUrl.createObjectURL(stream);
console.log(code);
videoContainer.src = code;
videoContainer.play();
}, function (error){
console.log(error);
})
myAppService.createLiveVideo(user).then(function(response){
var streamUrl = code.substring(code.lastIndexOf("/")+1);
var url = 'rtmp://' + response.data.data.liveVideoInfo.unicastBasePath + '/'+ streamUrl;
}, function(){
})
【问题讨论】:
-
您应该查阅 wowza 文档或支持。您不能只使用 WebRTC 将视频发送到 url。
-
你找到解决办法了吗?
标签: javascript webrtc