These are chat archives for andyet/SimpleWebRTC

12th
Oct 2017
WadonLiu
@WadonLiu
Oct 12 2017 07:16
i need a iOS demo , but https://github.com/otalk/iOS-demo is too old, i can not run , i want to know is there a better demo for iOS , thanks
StudioInteractive
@StudioInteractive
Oct 12 2017 08:22
@karaokeresearch You can't stop a comminication, because all of your peer(TVSender/TvReciever) are in the same room, and they have to talk with each other. But you can stop/remove the stream in the TVSenders for all TVSenders Peers after they connected to each other. So you can save a lot of Bandwidth . Pseudo code would be something like: simplewebrtc.on('videoAdded', function(video,peer){}) on the TVSender Side : foreach peer that have nick: TVSender . peer.pc.pc.removeStream(simplewebrtc.webrtc.localstreams[0]). after this you have to send a new offer to the peer with peer.pc.offer(config,function(err,expandedOffer){//react on error});
Better Pseudocode: simplewebrtc.on('videoAdded', function(video,peer){ peer.pc.pc.removeStream(simplewebrtc.webrtc.localstreams[0]); peer.pc.offer(config,function(err,expandedOffer){//react on error});})
StudioInteractive
@StudioInteractive
Oct 12 2017 08:31
and you have to check peer.nick = "TVSender"