mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4613 from ThaUnknown/update-jassub
fix: update JASSUB
This commit is contained in:
commit
478f81fecf
4 changed files with 44 additions and 37 deletions
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -36,7 +36,7 @@
|
||||||
"history": "5.3.0",
|
"history": "5.3.0",
|
||||||
"hls.js": "1.4.4",
|
"hls.js": "1.4.4",
|
||||||
"intersection-observer": "0.12.2",
|
"intersection-observer": "0.12.2",
|
||||||
"jassub": "1.5.13",
|
"jassub": "1.7.1",
|
||||||
"jellyfin-apiclient": "1.10.0",
|
"jellyfin-apiclient": "1.10.0",
|
||||||
"jquery": "3.7.0",
|
"jquery": "3.7.0",
|
||||||
"jstree": "3.3.15",
|
"jstree": "3.3.15",
|
||||||
|
@ -10522,9 +10522,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jassub": {
|
"node_modules/jassub": {
|
||||||
"version": "1.5.13",
|
"version": "1.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/jassub/-/jassub-1.5.13.tgz",
|
"resolved": "https://registry.npmjs.org/jassub/-/jassub-1.7.1.tgz",
|
||||||
"integrity": "sha512-mQM88BcYgppvpPG6VE+DPQm7r6QS65EBedbm13RE4lRIhdrnQ+ihWhBOZXYZe3SlGhg+ROIDRK8uY4dm9ER2XQ==",
|
"integrity": "sha512-xvrF/4/4ifJCxyF9wgmNW/fzvKuqrvU3OKl1B4373STaCPhblMHkRCHDN6DnRdeI9jUyriWDPcKT97cg38YbNw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"rvfc-polyfill": "^1.0.4"
|
"rvfc-polyfill": "^1.0.4"
|
||||||
}
|
}
|
||||||
|
@ -27952,9 +27952,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"jassub": {
|
"jassub": {
|
||||||
"version": "1.5.13",
|
"version": "1.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/jassub/-/jassub-1.5.13.tgz",
|
"resolved": "https://registry.npmjs.org/jassub/-/jassub-1.7.1.tgz",
|
||||||
"integrity": "sha512-mQM88BcYgppvpPG6VE+DPQm7r6QS65EBedbm13RE4lRIhdrnQ+ihWhBOZXYZe3SlGhg+ROIDRK8uY4dm9ER2XQ==",
|
"integrity": "sha512-xvrF/4/4ifJCxyF9wgmNW/fzvKuqrvU3OKl1B4373STaCPhblMHkRCHDN6DnRdeI9jUyriWDPcKT97cg38YbNw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"rvfc-polyfill": "^1.0.4"
|
"rvfc-polyfill": "^1.0.4"
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
"history": "5.3.0",
|
"history": "5.3.0",
|
||||||
"hls.js": "1.4.4",
|
"hls.js": "1.4.4",
|
||||||
"intersection-observer": "0.12.2",
|
"intersection-observer": "0.12.2",
|
||||||
"jassub": "1.5.13",
|
"jassub": "1.7.1",
|
||||||
"jellyfin-apiclient": "1.10.0",
|
"jellyfin-apiclient": "1.10.0",
|
||||||
"jquery": "3.7.0",
|
"jquery": "3.7.0",
|
||||||
"jstree": "3.3.15",
|
"jstree": "3.3.15",
|
||||||
|
|
|
@ -1255,6 +1255,12 @@ export class HtmlVideoPlayer {
|
||||||
const fallbackFontList = apiClient.getUrl('/FallbackFont/Fonts', {
|
const fallbackFontList = apiClient.getUrl('/FallbackFont/Fonts', {
|
||||||
api_key: apiClient.accessToken()
|
api_key: apiClient.accessToken()
|
||||||
});
|
});
|
||||||
|
// TODO: replace with `event-target-polyfill` once https://github.com/benlesh/event-target-polyfill/pull/12 or 11 is merged
|
||||||
|
import('event-target-polyfill').then(() => {
|
||||||
|
import('jassub').then(({ default: JASSUB }) => {
|
||||||
|
// test SIMD support
|
||||||
|
JASSUB._test();
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
video: videoElement,
|
video: videoElement,
|
||||||
subUrl: getTextTrackUrl(track, item),
|
subUrl: getTextTrackUrl(track, item),
|
||||||
|
@ -1265,17 +1271,21 @@ export class HtmlVideoPlayer {
|
||||||
// eslint-disable-next-line compat/compat
|
// eslint-disable-next-line compat/compat
|
||||||
workerUrl: new URL('jassub/dist/jassub-worker.js', import.meta.url),
|
workerUrl: new URL('jassub/dist/jassub-worker.js', import.meta.url),
|
||||||
// eslint-disable-next-line compat/compat
|
// eslint-disable-next-line compat/compat
|
||||||
legacyWorkerUrl: new URL('jassub/dist/jassub-worker-legacy.js', import.meta.url),
|
wasmUrl: new URL('jassub/dist/jassub-worker.wasm', import.meta.url),
|
||||||
|
// eslint-disable-next-line compat/compat
|
||||||
|
legacyWasmUrl: new URL('jassub/dist/jassub-worker.wasm.js', import.meta.url),
|
||||||
|
// eslint-disable-next-line compat/compat
|
||||||
|
modernWasmUrl : new URL('jassub/dist/jassub-worker-modern.wasm', import.meta.url),
|
||||||
timeOffset: (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000,
|
timeOffset: (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000,
|
||||||
// new jassub options; override all, even defaults
|
// new jassub options; override all, even defaults
|
||||||
blendMode: 'js',
|
blendMode: 'js',
|
||||||
asyncRender: true,
|
asyncRender: true,
|
||||||
// firefox implements offscreen canvas, but not according to spec which causes errors
|
offscreenRender: true,
|
||||||
offscreenRender: !browser.firefox,
|
|
||||||
// RVFC is polyfilled everywhere, but webOS 2 reports polyfill API's as functional even tho they aren't
|
// RVFC is polyfilled everywhere, but webOS 2 reports polyfill API's as functional even tho they aren't
|
||||||
onDemandRender: browser.web0sVersion !== 2,
|
onDemandRender: browser.web0sVersion !== 2,
|
||||||
useLocalFonts: true,
|
useLocalFonts: true,
|
||||||
dropAllAnimations: false,
|
dropAllAnimations: false,
|
||||||
|
dropAllBlur: !JASSUB._supportsSIMD,
|
||||||
libassMemoryLimit: 40,
|
libassMemoryLimit: 40,
|
||||||
libassGlyphLimit: 40,
|
libassGlyphLimit: 40,
|
||||||
targetFps: 24,
|
targetFps: 24,
|
||||||
|
@ -1283,9 +1293,7 @@ export class HtmlVideoPlayer {
|
||||||
prescaleHeightLimit: 1080,
|
prescaleHeightLimit: 1080,
|
||||||
maxRenderHeight: 2160
|
maxRenderHeight: 2160
|
||||||
};
|
};
|
||||||
// TODO: replace with `event-target-polyfill` once https://github.com/benlesh/event-target-polyfill/pull/12 or 11 is merged
|
|
||||||
import('event-target-polyfill').then(() => {
|
|
||||||
import('jassub').then(({ default: JASSUB }) => {
|
|
||||||
Promise.all([
|
Promise.all([
|
||||||
apiClient.getNamedConfiguration('encoding'),
|
apiClient.getNamedConfiguration('encoding'),
|
||||||
// Worker in Tizen 5 doesn't resolve relative path with async request
|
// Worker in Tizen 5 doesn't resolve relative path with async request
|
||||||
|
|
|
@ -12,7 +12,6 @@ const Assets = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const JassubWasm = [
|
const JassubWasm = [
|
||||||
'jassub/dist/jassub-worker.wasm',
|
|
||||||
'jassub/dist/default.woff2'
|
'jassub/dist/default.woff2'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue