Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 39c40be

Browse files
committed
MediaPlayer: add keyboard handler (Ctrl+Shift+Alt+v) to display MediaPlayer version and plugins versions
1 parent acc3a30 commit 39c40be

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/js/streaming/MediaPlayer.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,17 @@ MediaPlayer = function () {
297297
this.addEventListener('timeupdate', _onTimeupdate.bind(this));
298298
};
299299

300+
// Keyboard handler to display version
301+
var _handleKeyPressedEvent = function(e) {
302+
// If Ctrl+Alt+Shift+d is pressed then display MediaPlayer version and plugins versions
303+
if (e.altKey === true && e.ctrlKey === true && e.shiftKey === true && e.keyCode === 86) {
304+
console.log('[MediaPlayer] Version: ' + this.getVersion() + ' - ' + this.getBuildDate());
305+
for (var plugin in plugins) {
306+
console.log('[' + plugins[plugin].getName() + '] Version: ' + plugins[plugin].getVersion() + ' - ' + plugins[plugin].getBuildDate());
307+
}
308+
309+
}
310+
};
300311

301312
/// Private playback functions ///
302313
var _resetAndPlay = function (reason) {
@@ -536,6 +547,8 @@ MediaPlayer = function () {
536547
// create DebugController
537548
debugController = system.getObject('debugController');
538549
debugController.init(VERSION);
550+
551+
window.addEventListener('keydown', _handleKeyPressedEvent.bind(this));
539552
},
540553
//#endregion
541554

0 commit comments

Comments
 (0)