mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
3.0.5666.2
This commit is contained in:
parent
17a0f1578d
commit
8030454e19
13 changed files with 175 additions and 137 deletions
52
dashboard-ui/cordova/android/immersive.js
vendored
52
dashboard-ui/cordova/android/immersive.js
vendored
|
@ -32,51 +32,6 @@
|
|||
//// Hide system UI and keep it hidden (Android 4.4+ only)
|
||||
//AndroidFullScreen.immersiveMode(onSuccess, onError);
|
||||
|
||||
var currentPlayer;
|
||||
|
||||
function onPlaybackStart(e, state) {
|
||||
|
||||
var player = this;
|
||||
|
||||
if (player.isLocalPlayer && state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') {
|
||||
AndroidFullScreen.immersiveMode(onSuccess, onError);
|
||||
}
|
||||
}
|
||||
|
||||
function onPlaybackStopped(e, state) {
|
||||
|
||||
var player = this;
|
||||
|
||||
if (player.isLocalPlayer && state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') {
|
||||
|
||||
if (!AppSettings.enableFullScreen()) {
|
||||
AndroidFullScreen.showSystemUI(onSuccess, onError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function bindToPlayer(player) {
|
||||
|
||||
releaseCurrentPlayer();
|
||||
|
||||
currentPlayer = player;
|
||||
|
||||
if (!player.isLocalPlayer) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(player).on('playbackstart', onPlaybackStart)
|
||||
.on('playbackstop', onPlaybackStopped);
|
||||
}
|
||||
|
||||
function releaseCurrentPlayer() {
|
||||
|
||||
if (currentPlayer) {
|
||||
|
||||
$(currentPlayer).off('playbackstart', onPlaybackStart).off('playbackstop', onPlaybackStopped);
|
||||
}
|
||||
}
|
||||
|
||||
function updateFromSetting(leaveFullScreen) {
|
||||
|
||||
if (AppSettings.enableFullScreen()) {
|
||||
|
@ -91,13 +46,6 @@
|
|||
|
||||
Logger.log('binding fullscreen to MediaController');
|
||||
|
||||
$(MediaController).on('playerchange', function () {
|
||||
|
||||
bindToPlayer(MediaController.getCurrentPlayer());
|
||||
});
|
||||
|
||||
bindToPlayer(MediaController.getCurrentPlayer());
|
||||
|
||||
updateFromSetting(false);
|
||||
|
||||
$(AppSettings).on('settingupdated', function (e, key) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue