Skip to content

Commit 8df6d6f

Browse files
committed
QBWEBSDK-204
1 parent 5ccede8 commit 8df6d6f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

samples/webrtc/app.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@
372372
classesName = [],
373373
activeClass = [];
374374

375-
if( app.currentSession.peerConnections[userID].stream ) {
375+
if( app.currentSession.peerConnections[userID].stream && !_.isEmpty( $that.attr('src')) ) {
376376
if( $that.hasClass('active') ) {
377377
$that.removeClass('active');
378378

@@ -461,7 +461,7 @@
461461
ui.showCallBtn();
462462

463463
if(session.opponentsIDs.length > 1) {
464-
ui.updateMsg({msg: 'p2p_call_stop', obj: {name: app.caller.full_name}});
464+
ui.updateMsg({msg: 'call_stop', obj: {name: app.caller.full_name}});
465465
}
466466

467467
/** delete blob from myself video */
@@ -663,6 +663,10 @@
663663

664664
if(app.mainVideo === userID) {
665665
$('#remote_video_' + userID).removeClass('active');
666+
667+
ui.changeFilter('#main_video', 'no');
668+
app.currentSession.detachMediaStream('main_video');
669+
app.mainVideo = 0;
666670
}
667671

668672
if( !_.isEmpty(app.currentSession) ) {

0 commit comments

Comments
 (0)