jassub icon indicating copy to clipboard operation
jassub copied to clipboard

Firefox: Adding subtitle before playback throw an error of Offset renderer

Open zoriya opened this issue 2 years ago • 1 comments

When the offset renderer is enabled, and you run new Jassub(...) with a video that as not started playing, this error is thrown:

Uncaught DOMException: OffscreenCanvas.width setter: Cannot set width of placeholder canvas transferred to worker.
    _render jassub.js:681
    _onmessage jassub.js:783
    onmessage jassub.js:120
    JASSUB jassub.js:120

This is my new call:

new Jassub({
	video: player.current,
	workerUrl: "/_next/static/chunks/jassub-worker.js",
	wasmUrl: "/_next/static/chunks/jassub-worker.wasm",
	legacyWasmUrl: "/_next/static/chunks/jassub-worker.wasm.js",
	subUrl: value.link,
	fonts: fonts,
});

(Since September 2023, OffscreenCanvas is stable in FF, so this is not like #10)

zoriya avatar Oct 14 '23 13:10 zoriya

just firefox things, feel free to disable offscreen canvas in ff, i cba fixing this for firefox for the 5th time, they simply can't implement it properly

ThaUnknown avatar Oct 14 '23 19:10 ThaUnknown