File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 121121 currentSession : { } ,
122122 mainVideo : 0
123123 } ,
124+ isDeviceAccess = true ,
124125 takedCallCallee = [ ] ,
125126 remoteStreamCounter = 0 ,
126127 authorizationing = false ,
298299
299300 $ ( ui . modal . income_call ) . modal ( 'hide' ) ;
300301
301- ui . hideCallBtn ( ) ;
302-
303302 document . getElementById ( ui . sounds . rington ) . pause ( ) ;
304303
305304 app . currentSession . getUserMedia ( mediaParams , function ( err , stream ) {
306305 if ( err ) {
307306 ui . updateMsg ( { msg : 'device_not_found' , obj : { name : app . caller . full_name } } ) ;
307+ isDeviceAccess = false ;
308+ app . currentSession . stop ( { } ) ;
308309 } else {
309310 var opponents = [ app . currentSession . initiatorID ] ,
310311 compiled = _ . template ( $ ( '#callee_video' ) . html ( ) ) ;
311312
313+ ui . hideCallBtn ( ) ;
314+
312315 /** get all opponents */
313316 app . currentSession . opponentsIDs . forEach ( function ( userID , i , arr ) {
314317 if ( userID != app . currentSession . currentUserID ) {
462465
463466 ui . showCallBtn ( ) ;
464467
465- if ( session . opponentsIDs . length > 1 ) {
466- ui . updateMsg ( { msg : 'call_stop' , obj : { name : app . caller . full_name } } ) ;
468+ if ( ! isDeviceAccess ) {
469+ isDeviceAccess = true ;
470+ } else {
471+ if ( session . opponentsIDs . length > 1 ) {
472+ ui . updateMsg ( { msg : 'call_stop' , obj : { name : app . caller . full_name } } ) ;
473+ }
467474 }
468475
476+
469477 /** delete blob from myself video */
470478 document . getElementById ( 'localVideo' ) . src = '' ;
471479
You can’t perform that action at this time.
0 commit comments