jellyfin-web/dashboard-ui/scripts/nowplayingpage.js
Luke Pulverenti 88d6c63263 use strict
2016-10-23 01:11:46 -04:00

31 lines
919 B
JavaScript

define(['components/remotecontrol', 'emby-tabs', 'emby-button'], function (remotecontrolFactory) {
'use strict';
return function (view, params) {
var self = this;
var remoteControl = new remotecontrolFactory();
remoteControl.init(view, view.querySelector('.remoteControlContent'));
view.addEventListener('viewbeforeshow', function (e) {
document.body.classList.add('hiddenViewMenuBar');
document.body.classList.add('hiddenNowPlayingBar');
if (remoteControl) {
remoteControl.onShow();
}
});
view.addEventListener('viewbeforehide', function (e) {
if (remoteControl) {
remoteControl.destroy();
}
document.body.classList.remove('hiddenViewMenuBar');
document.body.classList.remove('hiddenNowPlayingBar');
});
};
});