fix: update JASSUB
This commit is contained in:
parent
2e6f5c6dbf
commit
a737bbb523
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.3",
|
"hls.js": "1.4.3",
|
||||||
"intersection-observer": "0.12.2",
|
"intersection-observer": "0.12.2",
|
||||||
"jassub": "1.5.13",
|
"jassub": "1.7.0",
|
||||||
"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",
|
||||||
|
@ -10431,9 +10431,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jassub": {
|
"node_modules/jassub": {
|
||||||
"version": "1.5.13",
|
"version": "1.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jassub/-/jassub-1.5.13.tgz",
|
"resolved": "https://registry.npmjs.org/jassub/-/jassub-1.7.0.tgz",
|
||||||
"integrity": "sha512-mQM88BcYgppvpPG6VE+DPQm7r6QS65EBedbm13RE4lRIhdrnQ+ihWhBOZXYZe3SlGhg+ROIDRK8uY4dm9ER2XQ==",
|
"integrity": "sha512-ILno/cvF36lEbBIqdO2rbX8RC0H249nr0FyS1VPOhm6jfeJZODXdH0tOJSgKnKB50sxtLl44IeA0ge72LdZVPw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"rvfc-polyfill": "^1.0.4"
|
"rvfc-polyfill": "^1.0.4"
|
||||||
}
|
}
|
||||||
|
@ -27838,9 +27838,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"jassub": {
|
"jassub": {
|
||||||
"version": "1.5.13",
|
"version": "1.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jassub/-/jassub-1.5.13.tgz",
|
"resolved": "https://registry.npmjs.org/jassub/-/jassub-1.7.0.tgz",
|
||||||
"integrity": "sha512-mQM88BcYgppvpPG6VE+DPQm7r6QS65EBedbm13RE4lRIhdrnQ+ihWhBOZXYZe3SlGhg+ROIDRK8uY4dm9ER2XQ==",
|
"integrity": "sha512-ILno/cvF36lEbBIqdO2rbX8RC0H249nr0FyS1VPOhm6jfeJZODXdH0tOJSgKnKB50sxtLl44IeA0ge72LdZVPw==",
|
||||||
"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.3",
|
"hls.js": "1.4.3",
|
||||||
"intersection-observer": "0.12.2",
|
"intersection-observer": "0.12.2",
|
||||||
"jassub": "1.5.13",
|
"jassub": "1.7.0",
|
||||||
"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",
|
||||||
|
|
|
@ -1252,6 +1252,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),
|
||||||
|
@ -1262,17 +1268,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,
|
||||||
|
@ -1280,9 +1290,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