These are chat archives for andyet/SimpleWebRTC

2nd
May 2017
StudioInteractive
@StudioInteractive
May 02 2017 09:21
@notasgoodasyou How to you stop video/audio ? And why, what is the scenario ?
if you only want to disable video during chat, why not pause hte cam
this.pauseCam = function () {
      webrtc.pauseVideo();
    };
@notasgoodasyou this are the basic methods to react to changes on peer
webrtc.on('peerStreamRemoved',function (peer) {
       // ("PeerStrem Removed from " +peer.id);
});

webrtc.on('videoRemoved', function (video, peer) {
        if (peer !== undefined) {
           //Remove the video element from the dom
        }
});
ali705
@asifalikhan
May 02 2017 23:05

how to show the remote video on 'videoAdded' event i tried demo as show on simpewebrtc site but i did't work for me.

'''var webrtc = new SimpleWebRTC({
localVideoEl: 'localVideo',
remoteVideoEl: '',
url: 'http://localhost:9191',
autoRequestMedia: true

});
webrtc.on('videoAdded', function (video, peer) {
console.log('peer video added ' + video + ' ' + peer);

var remotes = document.getElementById('call-page');
if (remotes) {
    var container = document.createElement('div');
    container.className = 'videoContainer';
    container.id = 'container_' + webrtc.getDomId(peer);
    container.appendChild(video);
    remotes.appendChild(container);
}

});'''