1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/nowplayingpage.js

43 lines
1.2 KiB
JavaScript
Raw Normal View History

define(['jQuery'], function ($) {
2014-04-27 18:51:07 -04:00
2015-09-08 13:06:38 -04:00
pageIdOn('pageinit', "nowPlayingPage", function () {
2014-04-27 18:51:07 -04:00
var page = this;
require(['components/remotecontrol'], function (remotecontrolFactory) {
page.remoteControl = new remotecontrolFactory();
page.remoteControl.init(page.querySelector('.remoteControlContent'));
page.remoteControl.onShow();
page.remoteControlInitComplete = true;
2015-09-26 10:51:26 -04:00
});
2015-09-08 13:06:38 -04:00
});
2015-09-08 13:06:38 -04:00
pageIdOn('pagebeforeshow', "nowPlayingPage", function () {
2014-04-28 23:56:20 -04:00
var page = this;
document.body.classList.add('hiddenViewMenuBar');
document.body.classList.add('hiddenNowPlayingBar');
2015-03-18 00:09:31 -04:00
if (page.remoteControl) {
2015-09-26 10:56:11 -04:00
if (!page.remoteControlInitComplete) {
page.remoteControlInitComplete = true;
} else {
page.remoteControl.onShow();
}
2015-09-26 10:56:11 -04:00
}
2014-04-27 18:51:07 -04:00
});
pageIdOn('pagebeforehide', "nowPlayingPage", function () {
2014-05-09 15:43:06 -04:00
var page = this;
2014-05-09 15:43:06 -04:00
if (page.remoteControl) {
page.remoteControl.destroy();
}
document.body.classList.remove('hiddenViewMenuBar');
document.body.classList.remove('hiddenNowPlayingBar');
});
});