mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Add ResizeObserver polyfill for safari (#3142)
This commit is contained in:
@@ -66,6 +66,7 @@
|
|||||||
"react-select": "^4.0.2",
|
"react-select": "^4.0.2",
|
||||||
"react-slick": "^0.29.0",
|
"react-slick": "^0.29.0",
|
||||||
"remark-gfm": "^1.0.0",
|
"remark-gfm": "^1.0.0",
|
||||||
|
"resize-observer-polyfill": "^1.5.1",
|
||||||
"sass": "^1.32.5",
|
"sass": "^1.32.5",
|
||||||
"slick-carousel": "^1.8.1",
|
"slick-carousel": "^1.8.1",
|
||||||
"string.prototype.replaceall": "^1.0.4",
|
"string.prototype.replaceall": "^1.0.4",
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ import videojs from "video.js";
|
|||||||
export const VIDEO_PLAYER_ID = "VideoJsPlayer";
|
export const VIDEO_PLAYER_ID = "VideoJsPlayer";
|
||||||
|
|
||||||
export const getPlayerPosition = () =>
|
export const getPlayerPosition = () =>
|
||||||
videojs.getPlayer(VIDEO_PLAYER_ID).currentTime();
|
videojs.getPlayer(VIDEO_PLAYER_ID)?.currentTime();
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ async function checkPolyfills() {
|
|||||||
await import("@formatjs/intl-pluralrules/polyfill");
|
await import("@formatjs/intl-pluralrules/polyfill");
|
||||||
await import("@formatjs/intl-pluralrules/locale-data/en");
|
await import("@formatjs/intl-pluralrules/locale-data/en");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!("ResizeObserver" in window)) {
|
||||||
|
const ResizeObserver = await import("resize-observer-polyfill");
|
||||||
|
window.ResizeObserver = ResizeObserver.default;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const initPolyfills = async () => {
|
export const initPolyfills = async () => {
|
||||||
|
|||||||
@@ -6678,6 +6678,11 @@ resize-observer-polyfill@^1.5.0:
|
|||||||
resolved "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz"
|
resolved "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz"
|
||||||
integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==
|
integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==
|
||||||
|
|
||||||
|
resize-observer-polyfill@^1.5.1:
|
||||||
|
version "1.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464"
|
||||||
|
integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==
|
||||||
|
|
||||||
resolve-from@5.0.0, resolve-from@^5.0.0:
|
resolve-from@5.0.0, resolve-from@^5.0.0:
|
||||||
version "5.0.0"
|
version "5.0.0"
|
||||||
resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz"
|
resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz"
|
||||||
@@ -8174,4 +8179,4 @@ zen-observable@^0.8.14:
|
|||||||
zwitch@^1.0.0:
|
zwitch@^1.0.0:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz"
|
resolved "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz"
|
||||||
integrity sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==
|
integrity sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==
|
||||||
|
|||||||
Reference in New Issue
Block a user