Skip to content

Commit 9a975cd

Browse files
author
Jeremy White
committed
Fixed issue with extending handleServiceCommand method from BaseMediaPlayer
1 parent 2aeb3db commit 9a975cd

File tree

4 files changed

+34
-38
lines changed

4 files changed

+34
-38
lines changed

dist/connect_bridge.js

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,22 @@ var connectsdk = (function () {
450450
}
451451
},
452452

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+
}
454469
};
455470

456471
// webOS
@@ -497,23 +512,6 @@ var connectsdk = (function () {
497512
this.emit(ConnectManager.EventType.STOP);
498513
break;
499514
}
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-
}
517515
}
518516
}, BaseMediaPlayer);
519517

0 commit comments

Comments
 (0)