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

Migration of nowplaying and videoosd to ES6 modules

This commit is contained in:
Cameron 2020-07-19 10:40:41 +01:00
parent d7142955f9
commit eb7d8faf98
3 changed files with 201 additions and 176 deletions

View file

@ -1,22 +1,22 @@
define(['components/remotecontrol/remotecontrol', 'libraryMenu', 'emby-button'], function (remotecontrolFactory, libraryMenu) {
'use strict';
import remotecontrolFactory from 'components/remotecontrol/remotecontrol';
import libraryMenu from 'libraryMenu';
import 'emby-button';
return function (view, params) {
var remoteControl = new remotecontrolFactory();
remoteControl.init(view, view.querySelector('.remoteControlContent'));
view.addEventListener('viewshow', function (e) {
libraryMenu.setTransparentMenu(true);
export default function (view, params) {
const remoteControl = new remotecontrolFactory();
remoteControl.init(view, view.querySelector('.remoteControlContent'));
view.addEventListener('viewshow', function (e) {
libraryMenu.setTransparentMenu(true);
if (remoteControl) {
remoteControl.onShow();
}
});
view.addEventListener('viewbeforehide', function (e) {
libraryMenu.setTransparentMenu(false);
if (remoteControl) {
remoteControl.onShow();
}
});
view.addEventListener('viewbeforehide', function (e) {
libraryMenu.setTransparentMenu(false);
if (remoteControl) {
remoteControl.destroy();
}
});
};
});
if (remoteControl) {
remoteControl.destroy();
}
});
}