Skip to content

Commit ac21d0f

Browse files
author
dimaspirit
committed
Keep it simple stupid
1 parent 841afdf commit ac21d0f

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

samples/webrtc/js/app.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -544,24 +544,8 @@
544544

545545
if(!inboundrtp || !isBytesReceivedChanges(userId, inboundrtp)) {
546546
if(!_.isEmpty(app.currentSession)) {
547-
var isCallEnded = _.every(session.peerConnections, function(i) {
548-
return i.iceConnectionState === 'closed';
549-
});
550-
551547
notifyIfUserLeaveCall(session, userId, 'disconnected', 'Disconnected');
552-
ui.toggleRemoteVideoView(userId, 'clear');
553-
554-
if (session.currentUserID === session.initiatorID && !isCallEnded) {
555-
/** get array if users without user who ends call */
556-
takedCallCallee = _.reject(takedCallCallee, function(num){ return num.id === +userId; });
557-
qbApp.MsgBoard.update('accept_call', {users: takedCallCallee});
558-
}
559-
560-
if(app.mainVideo === userId) {
561-
app.currentSession.detachMediaStream('main_video');
562-
ui.changeFilter('#remote_video_' + userId, 'no');
563-
$('#remote_video_' + userId).removeClass('active');
564-
}
548+
session.closeConnection(userId);
565549
}
566550
}
567551
}

0 commit comments

Comments
 (0)