mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-19 20:08:20 -07:00
Merge remote-tracking branch 'upstream/master' into modern-osd
This commit is contained in:
commit
4fcf7f1805
@ -52,7 +52,7 @@
|
|||||||
"stylelint-order": "^4.1.0",
|
"stylelint-order": "^4.1.0",
|
||||||
"webpack": "^4.44.1",
|
"webpack": "^4.44.1",
|
||||||
"webpack-merge": "^4.2.2",
|
"webpack-merge": "^4.2.2",
|
||||||
"webpack-stream": "^5.2.1"
|
"webpack-stream": "^6.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"alameda": "^1.4.0",
|
"alameda": "^1.4.0",
|
||||||
@ -79,7 +79,7 @@
|
|||||||
"resize-observer-polyfill": "^1.5.1",
|
"resize-observer-polyfill": "^1.5.1",
|
||||||
"screenfull": "^5.0.2",
|
"screenfull": "^5.0.2",
|
||||||
"sortablejs": "^1.10.2",
|
"sortablejs": "^1.10.2",
|
||||||
"swiper": "^5.4.5",
|
"swiper": "^6.1.1",
|
||||||
"webcomponents.js": "^0.7.24",
|
"webcomponents.js": "^0.7.24",
|
||||||
"whatwg-fetch": "^3.4.0"
|
"whatwg-fetch": "^3.4.0"
|
||||||
},
|
},
|
||||||
|
@ -60,8 +60,8 @@ _define('resize-observer-polyfill', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// swiper
|
// swiper
|
||||||
const swiper = require('swiper/js/swiper');
|
const swiper = require('swiper/swiper-bundle');
|
||||||
require('swiper/css/swiper.min.css');
|
require('swiper/swiper-bundle.css');
|
||||||
_define('swiper', function() {
|
_define('swiper', function() {
|
||||||
return swiper;
|
return swiper;
|
||||||
});
|
});
|
||||||
|
@ -701,7 +701,7 @@ import 'emby-ratingbutton';
|
|||||||
|
|
||||||
const player = this;
|
const player = this;
|
||||||
currentRuntimeTicks = playbackManager.duration(player);
|
currentRuntimeTicks = playbackManager.duration(player);
|
||||||
updateTimeDisplay(playbackManager.currentTime(player), currentRuntimeTicks, playbackManager.getBufferedRanges(player));
|
updateTimeDisplay(playbackManager.currentTime(player) * 10000, currentRuntimeTicks, playbackManager.getBufferedRanges(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
function releaseCurrentPlayer() {
|
function releaseCurrentPlayer() {
|
||||||
|
@ -1618,11 +1618,7 @@ class PlaybackManager {
|
|||||||
|
|
||||||
player = player || self._currentPlayer;
|
player = player || self._currentPlayer;
|
||||||
if (player && !enableLocalPlaylistManagement(player)) {
|
if (player && !enableLocalPlaylistManagement(player)) {
|
||||||
if (player.isLocalPlayer) {
|
return player.seek(ticks);
|
||||||
return player.seek((ticks || 0) / 10000);
|
|
||||||
} else {
|
|
||||||
return player.seek(ticks);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
changeStream(player, ticks);
|
changeStream(player, ticks);
|
||||||
@ -1631,11 +1627,7 @@ class PlaybackManager {
|
|||||||
self.seekRelative = function (offsetTicks, player) {
|
self.seekRelative = function (offsetTicks, player) {
|
||||||
player = player || self._currentPlayer;
|
player = player || self._currentPlayer;
|
||||||
if (player && !enableLocalPlaylistManagement(player) && player.seekRelative) {
|
if (player && !enableLocalPlaylistManagement(player) && player.seekRelative) {
|
||||||
if (player.isLocalPlayer) {
|
return player.seekRelative(ticks);
|
||||||
return player.seekRelative((ticks || 0) / 10000);
|
|
||||||
} else {
|
|
||||||
return player.seekRelative(ticks);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const ticks = getCurrentTicks(player) + offsetTicks;
|
const ticks = getCurrentTicks(player) + offsetTicks;
|
||||||
@ -3219,7 +3211,7 @@ class PlaybackManager {
|
|||||||
return player.currentTime();
|
return player.currentTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.getCurrentTicks(player);
|
return this.getCurrentTicks(player) / 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
nextItem(player = this._currentPlayer) {
|
nextItem(player = this._currentPlayer) {
|
||||||
|
@ -619,7 +619,7 @@ export default function () {
|
|||||||
lastUpdateTime = now;
|
lastUpdateTime = now;
|
||||||
const player = this;
|
const player = this;
|
||||||
currentRuntimeTicks = playbackManager.duration(player);
|
currentRuntimeTicks = playbackManager.duration(player);
|
||||||
updateTimeDisplay(playbackManager.currentTime(player), currentRuntimeTicks);
|
updateTimeDisplay(playbackManager.currentTime(player) * 10000, currentRuntimeTicks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('notificationclick', function (event) {
|
/* eslint-disable-next-line no-restricted-globals -- self is valid in a serviceworker environment */
|
||||||
|
self.addEventListener('notificationclick', function (event) {
|
||||||
var notification = event.notification;
|
var notification = event.notification;
|
||||||
notification.close();
|
notification.close();
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ export default function (options) {
|
|||||||
/**
|
/**
|
||||||
* Handles zoom changes.
|
* Handles zoom changes.
|
||||||
*/
|
*/
|
||||||
function onZoomChange(scale, imageEl, slideEl) {
|
function onZoomChange(swiper, scale, imageEl, slideEl) {
|
||||||
const zoomImage = slideEl.querySelector('.swiper-zoom-fakeimg');
|
const zoomImage = slideEl.querySelector('.swiper-zoom-fakeimg');
|
||||||
|
|
||||||
if (zoomImage) {
|
if (zoomImage) {
|
||||||
|
@ -741,7 +741,7 @@ class SyncPlayManager {
|
|||||||
|
|
||||||
const playAtTime = this.lastCommand.When;
|
const playAtTime = this.lastCommand.When;
|
||||||
|
|
||||||
const currentPositionTicks = playbackManager.currentTime();
|
const currentPositionTicks = playbackManager.currentTime() * 10000;
|
||||||
// Estimate PositionTicks on server
|
// Estimate PositionTicks on server
|
||||||
const serverPositionTicks = this.lastCommand.PositionTicks + ((currentTime - playAtTime) + this.timeOffsetWithServer) * 10000;
|
const serverPositionTicks = this.lastCommand.PositionTicks + ((currentTime - playAtTime) + this.timeOffsetWithServer) * 10000;
|
||||||
// Measure delay that needs to be recovered
|
// Measure delay that needs to be recovered
|
||||||
|
@ -178,7 +178,7 @@ import 'flexStyles';
|
|||||||
const runtimeTicks = playbackManager.duration(options.player);
|
const runtimeTicks = playbackManager.duration(options.player);
|
||||||
|
|
||||||
if (runtimeTicks) {
|
if (runtimeTicks) {
|
||||||
const timeRemainingTicks = runtimeTicks - playbackManager.currentTime(options.player);
|
const timeRemainingTicks = runtimeTicks - playbackManager.currentTime(options.player) * 10000;
|
||||||
|
|
||||||
return Math.round(timeRemainingTicks / 10000);
|
return Math.round(timeRemainingTicks / 10000);
|
||||||
}
|
}
|
||||||
|
@ -586,7 +586,7 @@ import 'css!assets/css/videoosd';
|
|||||||
lastUpdateTime = now;
|
lastUpdateTime = now;
|
||||||
const player = this;
|
const player = this;
|
||||||
currentRuntimeTicks = playbackManager.duration(player);
|
currentRuntimeTicks = playbackManager.duration(player);
|
||||||
const currentTime = playbackManager.currentTime(player);
|
const currentTime = playbackManager.currentTime(player) * 10000;
|
||||||
updateTimeDisplay(currentTime, currentRuntimeTicks, playbackManager.playbackStartTime(player), playbackManager.getBufferedRanges(player));
|
updateTimeDisplay(currentTime, currentRuntimeTicks, playbackManager.playbackStartTime(player), playbackManager.getBufferedRanges(player));
|
||||||
const item = currentItem;
|
const item = currentItem;
|
||||||
refreshProgramInfoIfNeeded(player, item);
|
refreshProgramInfoIfNeeded(player, item);
|
||||||
|
34
src/legacy/vendorStyles.js
Normal file
34
src/legacy/vendorStyles.js
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// Polyfill for vendor prefixed style properties
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
const vendorProperties = {
|
||||||
|
'transform': ['webkitTransform'],
|
||||||
|
'transition': ['webkitTransition']
|
||||||
|
};
|
||||||
|
|
||||||
|
const elem = document.createElement('div');
|
||||||
|
|
||||||
|
function polyfillProperty(name) {
|
||||||
|
if (!(name in elem.style)) {
|
||||||
|
(vendorProperties[name] || []).every((vendorName) => {
|
||||||
|
if (vendorName in elem.style) {
|
||||||
|
console.debug(`polyfill '${name}' with '${vendorName}'`);
|
||||||
|
|
||||||
|
Object.defineProperty(CSSStyleDeclaration.prototype, name, {
|
||||||
|
get: function () { return this[vendorName]; },
|
||||||
|
set: function (val) { this[vendorName] = val; }
|
||||||
|
});
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (elem.style instanceof CSSStyleDeclaration) {
|
||||||
|
polyfillProperty('transform');
|
||||||
|
polyfillProperty('transition');
|
||||||
|
}
|
||||||
|
})();
|
@ -950,12 +950,12 @@ class ChromecastPlayer {
|
|||||||
|
|
||||||
currentTime(val) {
|
currentTime(val) {
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
return this.seek(val);
|
return this.seek(val * 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
let state = this.lastPlayerData || {};
|
let state = this.lastPlayerData || {};
|
||||||
state = state.PlayState || {};
|
state = state.PlayState || {};
|
||||||
return state.PositionTicks;
|
return state.PositionTicks / 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
duration() {
|
duration() {
|
||||||
|
@ -132,10 +132,7 @@ class HtmlAudioPlayer {
|
|||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
requireHlsPlayer(function () {
|
requireHlsPlayer(function () {
|
||||||
const hls = new Hls({
|
const hls = new Hls({
|
||||||
manifestLoadingTimeOut: 20000,
|
manifestLoadingTimeOut: 20000
|
||||||
xhrSetup: function (xhr, url) {
|
|
||||||
xhr.withCredentials = true;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
hls.loadSource(val);
|
hls.loadSource(val);
|
||||||
hls.attachMedia(elem);
|
hls.attachMedia(elem);
|
||||||
|
@ -393,10 +393,7 @@ function tryRemoveElement(elem) {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
requireHlsPlayer(() => {
|
requireHlsPlayer(() => {
|
||||||
const hls = new Hls({
|
const hls = new Hls({
|
||||||
manifestLoadingTimeOut: 20000,
|
manifestLoadingTimeOut: 20000
|
||||||
xhrSetup(xhr) {
|
|
||||||
xhr.withCredentials = true;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
hls.loadSource(url);
|
hls.loadSource(url);
|
||||||
hls.attachMedia(elem);
|
hls.attachMedia(elem);
|
||||||
|
@ -322,12 +322,12 @@ class SessionPlayer {
|
|||||||
|
|
||||||
currentTime(val) {
|
currentTime(val) {
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
return this.seek(val);
|
return this.seek(val * 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
let state = this.lastPlayerData || {};
|
let state = this.lastPlayerData || {};
|
||||||
state = state.PlayState || {};
|
state = state.PlayState || {};
|
||||||
return state.PositionTicks;
|
return state.PositionTicks / 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
duration() {
|
duration() {
|
||||||
|
@ -35,7 +35,8 @@
|
|||||||
// Promise() being missing on some legacy browser, and a funky one
|
// Promise() being missing on some legacy browser, and a funky one
|
||||||
// is Promise() present but buggy on WebOS 2
|
// is Promise() present but buggy on WebOS 2
|
||||||
window.Promise = undefined;
|
window.Promise = undefined;
|
||||||
window.Promise = undefined;
|
/* eslint-disable-next-line no-restricted-globals -- Explicit check on self needed */
|
||||||
|
self.Promise = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!window.Promise) {
|
if (!window.Promise) {
|
||||||
|
@ -222,6 +222,7 @@ function initClient() {
|
|||||||
});
|
});
|
||||||
require(['mouseManager']);
|
require(['mouseManager']);
|
||||||
require(['focusPreventScroll']);
|
require(['focusPreventScroll']);
|
||||||
|
require(['vendorStyles']);
|
||||||
require(['autoFocuser'], function(autoFocuser) {
|
require(['autoFocuser'], function(autoFocuser) {
|
||||||
autoFocuser.enable();
|
autoFocuser.enable();
|
||||||
});
|
});
|
||||||
@ -655,6 +656,7 @@ function initClient() {
|
|||||||
});
|
});
|
||||||
define('slideshow', [componentsPath + '/slideshow/slideshow'], returnFirstDependency);
|
define('slideshow', [componentsPath + '/slideshow/slideshow'], returnFirstDependency);
|
||||||
define('focusPreventScroll', ['legacy/focusPreventScroll'], returnFirstDependency);
|
define('focusPreventScroll', ['legacy/focusPreventScroll'], returnFirstDependency);
|
||||||
|
define('vendorStyles', ['legacy/vendorStyles'], returnFirstDependency);
|
||||||
define('userdataButtons', [componentsPath + '/userdatabuttons/userdatabuttons'], returnFirstDependency);
|
define('userdataButtons', [componentsPath + '/userdatabuttons/userdatabuttons'], returnFirstDependency);
|
||||||
define('listView', [componentsPath + '/listview/listview'], returnFirstDependency);
|
define('listView', [componentsPath + '/listview/listview'], returnFirstDependency);
|
||||||
define('indicators', [componentsPath + '/indicators/indicators'], returnFirstDependency);
|
define('indicators', [componentsPath + '/indicators/indicators'], returnFirstDependency);
|
||||||
|
44
yarn.lock
44
yarn.lock
@ -3499,12 +3499,12 @@ dom-serializer@0:
|
|||||||
domelementtype "^2.0.1"
|
domelementtype "^2.0.1"
|
||||||
entities "^2.0.0"
|
entities "^2.0.0"
|
||||||
|
|
||||||
dom7@^2.1.5:
|
dom7@^3.0.0-alpha.7:
|
||||||
version "2.1.5"
|
version "3.0.0-alpha.7"
|
||||||
resolved "https://registry.yarnpkg.com/dom7/-/dom7-2.1.5.tgz#a79411017800b31d8400070cdaebbfc92c1f6377"
|
resolved "https://registry.yarnpkg.com/dom7/-/dom7-3.0.0-alpha.7.tgz#3b4ba156a83fa37fb3fa34b8ab40a1a41a56feb1"
|
||||||
integrity sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==
|
integrity sha512-3epkQPsKsbk2Dixqqgm2DT/KzhiAPByjDK7emu6owwFLbM5UoiqWKgdsH+6PpMEgoeR6Ex/bW1UbOe0FWZU0zg==
|
||||||
dependencies:
|
dependencies:
|
||||||
ssr-window "^2.0.0"
|
ssr-window "^3.0.0-alpha.1"
|
||||||
|
|
||||||
domain-browser@^1.1.1:
|
domain-browser@^1.1.1:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
@ -10395,10 +10395,10 @@ sshpk@^1.7.0:
|
|||||||
safer-buffer "^2.0.2"
|
safer-buffer "^2.0.2"
|
||||||
tweetnacl "~0.14.0"
|
tweetnacl "~0.14.0"
|
||||||
|
|
||||||
ssr-window@^2.0.0:
|
ssr-window@^3.0.0-alpha.1, ssr-window@^3.0.0-alpha.4:
|
||||||
version "2.0.0"
|
version "3.0.0-alpha.4"
|
||||||
resolved "https://registry.yarnpkg.com/ssr-window/-/ssr-window-2.0.0.tgz#98c301aef99523317f8d69618f0010791096efc4"
|
resolved "https://registry.yarnpkg.com/ssr-window/-/ssr-window-3.0.0-alpha.4.tgz#0c69a18c4305ecccdd8e11596155ca07b635f345"
|
||||||
integrity sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A==
|
integrity sha512-+dBRP/pZ+VyITxTzD0lMDzDwN/BmfUl8xi2e6t5Nz4+FqUphfcBLB1OOUSYCRNFB25rD3c8AJRYpY5rHTbL+kg==
|
||||||
|
|
||||||
ssri@^6.0.1:
|
ssri@^6.0.1:
|
||||||
version "6.0.1"
|
version "6.0.1"
|
||||||
@ -10918,7 +10918,7 @@ supports-color@^3.2.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
has-flag "^1.0.0"
|
has-flag "^1.0.0"
|
||||||
|
|
||||||
supports-color@^5.3.0, supports-color@^5.5.0:
|
supports-color@^5.3.0:
|
||||||
version "5.5.0"
|
version "5.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
||||||
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
|
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
|
||||||
@ -10971,13 +10971,13 @@ svgo@^1.0.0, svgo@^1.3.2:
|
|||||||
unquote "~1.1.1"
|
unquote "~1.1.1"
|
||||||
util.promisify "~1.0.0"
|
util.promisify "~1.0.0"
|
||||||
|
|
||||||
swiper@^5.4.5:
|
swiper@^6.1.1:
|
||||||
version "5.4.5"
|
version "6.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/swiper/-/swiper-5.4.5.tgz#a350f654bf68426dbb651793824925512d223c0f"
|
resolved "https://registry.yarnpkg.com/swiper/-/swiper-6.1.1.tgz#1246f28557dd33968dc43e926bc6e9e9a7b3850d"
|
||||||
integrity sha512-7QjA0XpdOmiMoClfaZ2lYN6ICHcMm72LXiY+NF4fQLFidigameaofvpjEEiTQuw3xm5eksG5hzkaRsjQX57vtA==
|
integrity sha512-w6rmEUnpuSWvzuIDJ+nTi7YQ4+pvr++zUnBO2VxkzOZbzQzcMNKNw1yj0RFEok682IHDPCs3LXSl8zSQ+zDEdw==
|
||||||
dependencies:
|
dependencies:
|
||||||
dom7 "^2.1.5"
|
dom7 "^3.0.0-alpha.7"
|
||||||
ssr-window "^2.0.0"
|
ssr-window "^3.0.0-alpha.4"
|
||||||
|
|
||||||
symbol-observable@1.0.1:
|
symbol-observable@1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
@ -11939,17 +11939,17 @@ webpack-sources@^1.4.0, webpack-sources@^1.4.1:
|
|||||||
source-list-map "^2.0.0"
|
source-list-map "^2.0.0"
|
||||||
source-map "~0.6.1"
|
source-map "~0.6.1"
|
||||||
|
|
||||||
webpack-stream@^5.2.1:
|
webpack-stream@^6.0.0:
|
||||||
version "5.2.1"
|
version "6.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/webpack-stream/-/webpack-stream-5.2.1.tgz#35c992161399fe8cad9c10d4a5c258f022629b39"
|
resolved "https://registry.yarnpkg.com/webpack-stream/-/webpack-stream-6.0.0.tgz#0524b739a3c3a487362ee2e97522d0b8d366a510"
|
||||||
integrity sha512-WvyVU0K1/VB1NZ7JfsaemVdG0PXAQUqbjUNW4A58th4pULvKMQxG+y33HXTL02JvD56ko2Cub+E2NyPwrLBT/A==
|
integrity sha512-bYv7apmGB1j0JBpa5Fgyky/1mWyzHOnUPXv+RmkgpK4FXPWCMBspgnYFmhE7Ly68JSp77eonFzm6WArWy4afpQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
fancy-log "^1.3.3"
|
fancy-log "^1.3.3"
|
||||||
lodash.clone "^4.3.2"
|
lodash.clone "^4.3.2"
|
||||||
lodash.some "^4.2.2"
|
lodash.some "^4.2.2"
|
||||||
memory-fs "^0.4.1"
|
memory-fs "^0.5.0"
|
||||||
plugin-error "^1.0.1"
|
plugin-error "^1.0.1"
|
||||||
supports-color "^5.5.0"
|
supports-color "^7.1.0"
|
||||||
through "^2.3.8"
|
through "^2.3.8"
|
||||||
vinyl "^2.1.0"
|
vinyl "^2.1.0"
|
||||||
webpack "^4.26.1"
|
webpack "^4.26.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user