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

30 lines
901 B
JavaScript
Raw Normal View History

2016-08-14 15:58:13 -04:00
define(['components/remotecontrol', 'emby-tabs', 'emby-button'], function (remotecontrolFactory) {
2014-04-27 18:51:07 -04:00
2016-05-11 10:36:28 -04:00
return function (view, params) {
2014-04-27 18:51:07 -04:00
2016-05-11 10:36:28 -04:00
var self = this;
2014-04-27 18:51:07 -04:00
2016-05-11 10:36:28 -04:00
var remoteControl = new remotecontrolFactory();
remoteControl.init(view, view.querySelector('.remoteControlContent'));
2015-03-18 00:09:31 -04:00
2016-05-11 10:36:28 -04:00
view.addEventListener('viewbeforeshow', function (e) {
document.body.classList.add('hiddenViewMenuBar');
document.body.classList.add('hiddenNowPlayingBar');
2015-09-26 10:56:11 -04:00
2016-05-11 10:36:28 -04:00
if (remoteControl) {
remoteControl.onShow();
}
2016-05-11 10:36:28 -04:00
});
2014-04-27 18:51:07 -04:00
2016-05-11 10:36:28 -04:00
view.addEventListener('viewbeforehide', function (e) {
2014-05-09 15:43:06 -04:00
2016-05-11 10:36:28 -04:00
if (remoteControl) {
remoteControl.destroy();
}
2014-05-09 15:43:06 -04:00
2016-05-11 10:36:28 -04:00
document.body.classList.remove('hiddenViewMenuBar');
document.body.classList.remove('hiddenNowPlayingBar');
});
};
});