mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
30 lines
873 B
JavaScript
30 lines
873 B
JavaScript
define(['components/remotecontrol'], function (remotecontrolFactory) {
|
|
|
|
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');
|
|
});
|
|
};
|
|
|
|
}); |