mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge remote-tracking branch 'upstream/master' into media-session
This commit is contained in:
commit
81dffa3a93
189 changed files with 4537 additions and 2301 deletions
|
@ -44,24 +44,15 @@ define(['connectionManager', 'globalize', 'userSettings', 'apphost'], function (
|
|||
}
|
||||
|
||||
function showBlurayMessage() {
|
||||
|
||||
var message =
|
||||
'Playback of Bluray folders in this app is experimental. Some titles may not work at all. For a better experience, consider converting to mkv video files, or use an Jellyfin app with native Bluray folder support.';
|
||||
return showMessage(message, 'blurayexpirementalinfo', 'nativeblurayplayback');
|
||||
return showMessage(globalize.translate("UnsupportedPlayback"), 'blurayexpirementalinfo', 'nativeblurayplayback');
|
||||
}
|
||||
|
||||
function showDvdMessage() {
|
||||
|
||||
var message =
|
||||
'Playback of Dvd folders in this app is experimental. Some titles may not work at all. For a better experience, consider converting to mkv video files, or use an Jellyfin app with native Dvd folder support.';
|
||||
return showMessage(message, 'dvdexpirementalinfo', 'nativedvdplayback');
|
||||
return showMessage(globalize.translate("UnsupportedPlayback"), 'dvdexpirementalinfo', 'nativedvdplayback');
|
||||
}
|
||||
|
||||
function showIsoMessage() {
|
||||
|
||||
var message =
|
||||
'Playback of ISO files in this app is experimental. Some titles may not work at all. For a better experience, consider converting to mkv video files, or use an Jellyfin app with native ISO support.';
|
||||
return showMessage(message, 'isoexpirementalinfo', 'nativeisoplayback');
|
||||
return showMessage(globalize.translate("UnsupportedPlayback"), 'isoexpirementalinfo', 'nativeisoplayback');
|
||||
}
|
||||
|
||||
function ExpirementalPlaybackWarnings() {
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'playQueueManager', 'userSettings', 'globalize', 'connectionManager', 'loading', 'apphost', 'fullscreenManager'], function (events, datetime, appSettings, itemHelper, pluginManager, PlayQueueManager, userSettings, globalize, connectionManager, loading, apphost, fullscreenManager) {
|
||||
define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'playQueueManager', 'userSettings', 'globalize', 'connectionManager', 'loading', 'apphost', 'screenfull'], function (events, datetime, appSettings, itemHelper, pluginManager, PlayQueueManager, userSettings, globalize, connectionManager, loading, apphost, screenfull) {
|
||||
'use strict';
|
||||
|
||||
/** Delay time in ms for reportPlayback logging */
|
||||
const reportPlaybackLogDelay = 1e3;
|
||||
|
||||
function enableLocalPlaylistManagement(player) {
|
||||
|
||||
if (player.getPlaylist) {
|
||||
|
@ -17,9 +20,11 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
}
|
||||
|
||||
function bindToFullscreenChange(player) {
|
||||
events.on(fullscreenManager, 'fullscreenchange', function () {
|
||||
events.trigger(player, 'fullscreenchange');
|
||||
});
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.on('change', function () {
|
||||
events.trigger(player, 'fullscreenchange');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function triggerPlayerChange(playbackManagerInstance, newPlayer, newTarget, previousPlayer, previousTargetInfo) {
|
||||
|
@ -38,6 +43,12 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
events.trigger(playbackManagerInstance, 'playerchange', [newPlayer, newTarget, previousPlayer]);
|
||||
}
|
||||
|
||||
/** Last invoked method */
|
||||
let reportPlaybackLastMethod;
|
||||
|
||||
/** Last invoke time of method */
|
||||
let reportPlaybackLastTime;
|
||||
|
||||
function reportPlayback(playbackManagerInstance, state, player, reportPlaylist, serverId, method, progressEventName) {
|
||||
|
||||
if (!serverId) {
|
||||
|
@ -57,7 +68,14 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
addPlaylistToPlaybackReport(playbackManagerInstance, info, player, serverId);
|
||||
}
|
||||
|
||||
console.debug(method + '-' + JSON.stringify(info));
|
||||
const now = (new Date).getTime();
|
||||
|
||||
if (method !== reportPlaybackLastMethod || now - (reportPlaybackLastTime || 0) >= reportPlaybackLogDelay) {
|
||||
console.debug(method + '-' + JSON.stringify(info));
|
||||
reportPlaybackLastMethod = method;
|
||||
reportPlaybackLastTime = now;
|
||||
}
|
||||
|
||||
var apiClient = connectionManager.getApiClient(serverId);
|
||||
apiClient[method](info);
|
||||
}
|
||||
|
@ -1518,7 +1536,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
return player.isFullscreen();
|
||||
}
|
||||
|
||||
return fullscreenManager.isFullScreen();
|
||||
return screenfull.isFullscreen;
|
||||
};
|
||||
|
||||
self.toggleFullscreen = function (player) {
|
||||
|
@ -1528,10 +1546,8 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
return player.toggleFulscreen();
|
||||
}
|
||||
|
||||
if (fullscreenManager.isFullScreen()) {
|
||||
fullscreenManager.exitFullscreen();
|
||||
} else {
|
||||
fullscreenManager.requestFullscreen();
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.toggle();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -3378,7 +3394,6 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
pluginManager.ofType('mediaplayer').map(initMediaPlayer);
|
||||
|
||||
function sendProgressUpdate(player, progressEventName, reportPlaylist) {
|
||||
|
||||
if (!player) {
|
||||
throw new Error('player cannot be null');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue