Open lishidetainan opened 5 years ago
hi i think i found the issue;
beacuse of this line in nextrtc.js
remoteConnection.ontrack = e => this.onRemoteStream(connectionName, e.streams);
the ontrack event handler fires twice, if the remotestream has both audio and video (so i assume that you changed the audio:false
to audio:true
:) just like me )
but as the orijinal git example has audio: false i think msolarez has missed this situation. so i think thats the problem but how to resolve this?
Maybe this could be;
nextRTC.on('remoteStream', function (stream) {
var dest = $('#'+stream.member);
if(dest.length==0 ) {
dest = $("#template").clone().addClass('remotestream').prop({id: stream.member});
$("#container").append(dest);
dest[0].srcObject = stream.stream;
} else {
dest[0].srcObject = stream.stream;
}
});
when I open more than four web client, I join the same conversation, the last client show the video number more than four.