WebRTC function Removestream don't launch event OnRemoveStream. JavaScript -


i have problem function removestream on webrtc api, says: called time mediastream removed remote peer. not in case. have created peer connection this:

var stun_or_turn = {"iceservers": [{"url": "stun:stun.l.google.com:19302"}]};  var pc_constraints = {"optional": [{"dtlssrtpkeyagreement": true}]};     pc = new webkitrtcpeerconnection(stun_or_turn, pc_constraints); 

i add stream this: pc.addstream(localstream);

and remove remote stream in client this:

pc.removestream(localstream); 

the function onaddstream called correctly , event succesfully not in case of onremovestream.

do have error in code?

thanks.

you have renegotiate peerconnection(offer , answer) call onremovestream.

demo


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -