简体   繁体   中英

How to send webcam stream to wowzaurl using webrtc

I have to send stream to wowza url using webrtc. I am able to display webcam stream to browser but for going further I have no Idea about this.

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(){

    })

Update:

You can't. As @Aleks pointed out in the comments there is now a preview of Wowza WebRTC support available.

Original:

You can't.

Wowza does not currently have any support for WebRTC ( wowza forums post ). Even if you were to wire up your own RTSP or RTMP signalling in the browser the Wowza RTP stack will still not be able to carry out the required ICE and STUN checks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM