File tree Expand file tree Collapse file tree 4 files changed +34
-38
lines changed Expand file tree Collapse file tree 4 files changed +34
-38
lines changed Original file line number Diff line number Diff line change @@ -450,7 +450,22 @@ var connectsdk = (function () {
450
450
}
451
451
} ,
452
452
453
- handleServiceCommand : nop
453
+ handleServiceCommand : function ( msgData ) {
454
+ var serviceCommand = msgData . message . serviceCommand ;
455
+ if ( ! serviceCommand ) {
456
+ return ;
457
+ }
458
+
459
+ var commandType = serviceCommand . type ;
460
+ console . log ( 'processing serviceCommand ' + JSON . stringify ( serviceCommand ) + ' of type ' + commandType ) ;
461
+
462
+ switch ( commandType ) {
463
+ case "close" :
464
+ // this is a hack to circumvent the fact that window.close() doesn't work with the webOS app type
465
+ window . open ( window . location , '_self' ) . close ( ) ;
466
+ break ;
467
+ }
468
+ }
454
469
} ;
455
470
456
471
// webOS
@@ -497,23 +512,6 @@ var connectsdk = (function () {
497
512
this . emit ( ConnectManager . EventType . STOP ) ;
498
513
break ;
499
514
}
500
- } ,
501
-
502
- handleServiceCommand : function ( msgData ) {
503
- var serviceCommand = msgData . message . serviceCommand ;
504
- if ( ! serviceCommand ) {
505
- return ;
506
- }
507
-
508
- var commandType = serviceCommand . type ;
509
- console . log ( 'processing serviceCommand ' + JSON . stringify ( serviceCommand ) + ' of type ' + commandType ) ;
510
-
511
- switch ( commandType ) {
512
- case "close" :
513
- // this is a hack to circumvent the fact that window.close() doesn't work with the webOS app type
514
- window . open ( window . location , '_self' ) . close ( ) ;
515
- break ;
516
- }
517
515
}
518
516
} , BaseMediaPlayer ) ;
519
517
You can’t perform that action at this time.
0 commit comments