From b1d1cee634dcf76ebc3f3ce53992a034c015f333 Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Mon, 2 Mar 2020 19:54:29 +0100 Subject: [PATCH] Use forked version of JavascriptSubtitlesOctopus The fork contains an asm.js compatibility patch that we need for older client. This commit switched to using our forked version while we wait for an upstream merge. --- package.json | 2 +- src/components/htmlvideoplayer/plugin.js | 3 ++- webpack.common.js | 5 ++++- yarn.lock | 7 +++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 726823208..dbc6c8fa8 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "jellyfin-noto": "https://github.com/jellyfin/jellyfin-noto", "jquery": "^3.4.1", "jstree": "^3.3.7", - "libass-wasm": "^2.1.1", + "libass-wasm": "https://github.com/jellyfin/JavascriptSubtitlesOctopus", "libjass": "^0.11.0", "material-design-icons-iconfont": "^5.0.1", "native-promise-only": "^0.8.0-a", diff --git a/src/components/htmlvideoplayer/plugin.js b/src/components/htmlvideoplayer/plugin.js index 3ac45aabb..d19187c9e 100644 --- a/src/components/htmlvideoplayer/plugin.js +++ b/src/components/htmlvideoplayer/plugin.js @@ -1056,8 +1056,9 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa return i.DeliveryUrl; }), workerUrl: appRouter.baseUrl() + "/libraries/subtitles-octopus-worker.js", + legacyWorkerUrl: appRouter.baseUrl() + "/libraries/subtitles-octopus-worker-legacy.js", onError: function() { - htmlMediaHelper.onErrorInternal(self, 'mediadecodeerror') + htmlMediaHelper.onErrorInternal(self, 'mediadecodeerror'); } }; require(['JavascriptSubtitlesOctopus'], function(SubtitlesOctopus) { diff --git a/webpack.common.js b/webpack.common.js index 0809fc01b..bff1f5f4e 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -8,7 +8,10 @@ const Assets = [ "native-promise-only/npo.js", "libass-wasm/dist/subtitles-octopus-worker.js", "libass-wasm/dist/subtitles-octopus-worker.data", - "libass-wasm/dist/subtitles-octopus-worker.wasm" + "libass-wasm/dist/subtitles-octopus-worker.wasm", + "libass-wasm/dist/subtitles-octopus-worker-legacy.js", + "libass-wasm/dist/subtitles-octopus-worker-legacy.data", + "libass-wasm/dist/subtitles-octopus-worker-legacy.js.mem" ]; module.exports = { diff --git a/yarn.lock b/yarn.lock index 669d31a4a..f156002c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3683,10 +3683,9 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -libass-wasm@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/libass-wasm/-/libass-wasm-2.1.1.tgz#f12f4fdb9579dd422dcbc348bc3bd61097f4d07d" - integrity sha512-d45bHQ7tFVsLW3QstQDrDog2m+0D6Cja4GTrkGi70R9A5+aeLunPSUz3G4CVB+sKffNgiWjK4QI5NZLHQKZ9oQ== +"libass-wasm@https://github.com/jellyfin/JavascriptSubtitlesOctopus": + version "3.0.2" + resolved "https://github.com/jellyfin/JavascriptSubtitlesOctopus#7f331237026db75af2441717a4132d2398e96735" libjass@^0.11.0: version "0.11.0"