1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/src/controllers/playback/nowplaying.js

23 lines
752 B
JavaScript
Raw Normal View History

2020-05-04 12:44:12 +02:00
define(['components/remotecontrol/remotecontrol', 'libraryMenu', 'emby-button'], function (remotecontrolFactory, libraryMenu) {
'use strict';
return function (view, params) {
var remoteControl = new remotecontrolFactory();
2020-05-04 12:44:12 +02:00
remoteControl.init(view, view.querySelector('.remoteControlContent'));
view.addEventListener('viewshow', function (e) {
libraryMenu.setTransparentMenu(true);
if (remoteControl) {
remoteControl.onShow();
}
});
2020-05-04 12:44:12 +02:00
view.addEventListener('viewbeforehide', function (e) {
libraryMenu.setTransparentMenu(false);
if (remoteControl) {
remoteControl.destroy();
}
});
};
});