jassub 1.8.6 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -205
- package/dist/jassub.d.ts +71 -0
- package/dist/jassub.js +278 -0
- package/dist/jassub.js.map +1 -0
- package/dist/wasm/jassub-worker-modern.wasm +0 -0
- package/dist/wasm/jassub-worker.d.ts +2 -0
- package/dist/wasm/jassub-worker.js +1017 -0
- package/dist/wasm/jassub-worker.js.map +1 -0
- package/dist/wasm/jassub-worker.wasm +0 -0
- package/dist/wasm/types.d.ts +118 -0
- package/dist/worker/util.d.ts +5 -0
- package/dist/worker/util.js +30 -0
- package/dist/worker/util.js.map +1 -0
- package/dist/worker/webgpu-renderer.d.ts +54 -0
- package/dist/worker/webgpu-renderer.js +434 -0
- package/dist/worker/webgpu-renderer.js.map +1 -0
- package/dist/worker/worker.d.ts +59 -0
- package/dist/worker/worker.js +215 -0
- package/dist/worker/worker.js.map +1 -0
- package/package.json +21 -16
- package/dist/COPYRIGHT +0 -951
- package/dist/default.woff2 +0 -0
- package/dist/jassub-worker-modern.wasm +0 -0
- package/dist/jassub-worker.js +0 -15
- package/dist/jassub-worker.wasm +0 -0
- package/dist/jassub-worker.wasm.js +0 -2
- package/dist/jassub.es.js +0 -552
- package/dist/jassub.umd.js +0 -1
- package/index.d.ts +0 -122
- package/src/jassub.js +0 -860
package/dist/jassub.js
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import 'rvfc-polyfill';
|
|
2
|
+
import { proxy, releaseProxy } from 'abslink';
|
|
3
|
+
import { wrap } from 'abslink/w3c';
|
|
4
|
+
const webYCbCrMap = {
|
|
5
|
+
rgb: 'RGB',
|
|
6
|
+
bt709: 'BT709',
|
|
7
|
+
// these might not be exactly correct? oops?
|
|
8
|
+
bt470bg: 'BT601', // alias BT.601 PAL... whats the difference?
|
|
9
|
+
smpte170m: 'BT601' // alias BT.601 NTSC... whats the difference?
|
|
10
|
+
};
|
|
11
|
+
export default class JASSUB {
|
|
12
|
+
timeOffset;
|
|
13
|
+
prescaleFactor;
|
|
14
|
+
prescaleHeightLimit;
|
|
15
|
+
maxRenderHeight;
|
|
16
|
+
debug;
|
|
17
|
+
renderer;
|
|
18
|
+
ready;
|
|
19
|
+
busy = false;
|
|
20
|
+
_video;
|
|
21
|
+
_videoWidth = 0;
|
|
22
|
+
_videoHeight = 0;
|
|
23
|
+
_videoColorSpace = null;
|
|
24
|
+
_canvas;
|
|
25
|
+
_canvasParent;
|
|
26
|
+
_ctrl = new AbortController();
|
|
27
|
+
_ro = new ResizeObserver(() => this.resize());
|
|
28
|
+
_destroyed = false;
|
|
29
|
+
_lastDemandTime;
|
|
30
|
+
_skipped = false;
|
|
31
|
+
_worker;
|
|
32
|
+
constructor(opts) {
|
|
33
|
+
if (!globalThis.Worker)
|
|
34
|
+
throw new Error('Worker not supported');
|
|
35
|
+
if (!opts)
|
|
36
|
+
throw new Error('No options provided');
|
|
37
|
+
if (!opts.video && !opts.canvas)
|
|
38
|
+
throw new Error('You should give video or canvas in options.');
|
|
39
|
+
JASSUB._test();
|
|
40
|
+
this.timeOffset = opts.timeOffset ?? 0;
|
|
41
|
+
this._video = opts.video;
|
|
42
|
+
this._canvas = opts.canvas ?? document.createElement('canvas');
|
|
43
|
+
if (this._video && !opts.canvas) {
|
|
44
|
+
this._canvasParent = document.createElement('div');
|
|
45
|
+
this._canvasParent.className = 'JASSUB';
|
|
46
|
+
this._canvasParent.style.position = 'relative';
|
|
47
|
+
this._canvas.style.display = 'block';
|
|
48
|
+
this._canvas.style.position = 'absolute';
|
|
49
|
+
this._canvas.style.pointerEvents = 'none';
|
|
50
|
+
this._canvasParent.appendChild(this._canvas);
|
|
51
|
+
this._video.insertAdjacentElement('afterend', this._canvasParent);
|
|
52
|
+
}
|
|
53
|
+
const ctrl = this._canvas.transferControlToOffscreen();
|
|
54
|
+
this.debug = !!opts.debug;
|
|
55
|
+
this.prescaleFactor = opts.prescaleFactor ?? 1.0;
|
|
56
|
+
this.prescaleHeightLimit = opts.prescaleHeightLimit ?? 1080;
|
|
57
|
+
this.maxRenderHeight = opts.maxRenderHeight ?? 0; // 0 - no limit.
|
|
58
|
+
this._worker = new Worker(opts.workerUrl ?? new URL('./worker/worker.ts', import.meta.url), { name: 'jassub-worker', type: 'module' });
|
|
59
|
+
const Renderer = wrap(this._worker);
|
|
60
|
+
const modern = opts.modernWasmUrl ?? new URL('./wasm/jassub-worker-modern.wasm', import.meta.url).href;
|
|
61
|
+
const fallback = opts.wasmUrl ?? new URL('./wasm/jassub-worker.wasm', import.meta.url).href;
|
|
62
|
+
this.ready = (async () => {
|
|
63
|
+
this.renderer = await new Renderer({
|
|
64
|
+
wasmUrl: JASSUB._supportsSIMD ? modern : fallback,
|
|
65
|
+
width: ctrl.width,
|
|
66
|
+
height: ctrl.height,
|
|
67
|
+
subUrl: opts.subUrl,
|
|
68
|
+
subContent: opts.subContent ?? null,
|
|
69
|
+
fonts: opts.fonts ?? [],
|
|
70
|
+
availableFonts: opts.availableFonts ?? { 'liberation sans': './default.woff2' },
|
|
71
|
+
fallbackFont: opts.fallbackFont ?? 'liberation sans',
|
|
72
|
+
debug: !!opts.debug,
|
|
73
|
+
libassMemoryLimit: opts.libassMemoryLimit ?? 0,
|
|
74
|
+
libassGlyphLimit: opts.libassGlyphLimit ?? 0,
|
|
75
|
+
// @ts-expect-error TS doesn't know about queryLocalFonts
|
|
76
|
+
useLocalFonts: typeof queryLocalFonts !== 'undefined' && (opts.useLocalFonts ?? true)
|
|
77
|
+
}, proxy(font => this._getLocalFont(font)));
|
|
78
|
+
await this.renderer.ready();
|
|
79
|
+
})();
|
|
80
|
+
if (this._video)
|
|
81
|
+
this.setVideo(this._video);
|
|
82
|
+
this._worker.postMessage({ name: 'offscreenCanvas', ctrl }, [ctrl]);
|
|
83
|
+
}
|
|
84
|
+
static _supportsSIMD;
|
|
85
|
+
static _test() {
|
|
86
|
+
if (JASSUB._supportsSIMD != null)
|
|
87
|
+
return;
|
|
88
|
+
try {
|
|
89
|
+
JASSUB._supportsSIMD = WebAssembly.validate(Uint8Array.of(0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 123, 3, 2, 1, 0, 10, 10, 1, 8, 0, 65, 0, 253, 15, 253, 98, 11));
|
|
90
|
+
}
|
|
91
|
+
catch (e) {
|
|
92
|
+
JASSUB._supportsSIMD = false;
|
|
93
|
+
}
|
|
94
|
+
const module = new WebAssembly.Module(Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00));
|
|
95
|
+
if (!(module instanceof WebAssembly.Module) || !(new WebAssembly.Instance(module) instanceof WebAssembly.Instance))
|
|
96
|
+
throw new Error('WASM not supported');
|
|
97
|
+
}
|
|
98
|
+
async resize(force = !!this._video?.paused, width = 0, height = 0, top = 0, left = 0) {
|
|
99
|
+
await this.ready;
|
|
100
|
+
if ((!width || !height) && this._video) {
|
|
101
|
+
const videoSize = this._getVideoPosition();
|
|
102
|
+
let renderSize = null;
|
|
103
|
+
// support anamorphic video
|
|
104
|
+
if (this._videoWidth) {
|
|
105
|
+
const widthRatio = this._video.videoWidth / this._videoWidth;
|
|
106
|
+
const heightRatio = this._video.videoHeight / this._videoHeight;
|
|
107
|
+
renderSize = this._computeCanvasSize((videoSize.width || 0) / widthRatio, (videoSize.height || 0) / heightRatio);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
renderSize = this._computeCanvasSize(videoSize.width || 0, videoSize.height || 0);
|
|
111
|
+
}
|
|
112
|
+
width = renderSize.width;
|
|
113
|
+
height = renderSize.height;
|
|
114
|
+
if (this._canvasParent) {
|
|
115
|
+
top = videoSize.y - (this._canvasParent.getBoundingClientRect().top - this._video.getBoundingClientRect().top);
|
|
116
|
+
left = videoSize.x;
|
|
117
|
+
}
|
|
118
|
+
this._canvas.style.width = videoSize.width + 'px';
|
|
119
|
+
this._canvas.style.height = videoSize.height + 'px';
|
|
120
|
+
}
|
|
121
|
+
this._canvas.style.top = top + 'px';
|
|
122
|
+
this._canvas.style.left = left + 'px';
|
|
123
|
+
await this.renderer._canvas(width, height, (this._videoWidth || this._video?.videoWidth) ?? width, (this._videoHeight || this._video?.videoHeight) ?? height);
|
|
124
|
+
if (force && this._lastDemandTime)
|
|
125
|
+
this._demandRender();
|
|
126
|
+
}
|
|
127
|
+
_getVideoPosition(width = this._video.videoWidth, height = this._video.videoHeight) {
|
|
128
|
+
const videoRatio = width / height;
|
|
129
|
+
const { offsetWidth, offsetHeight } = this._video;
|
|
130
|
+
const elementRatio = offsetWidth / offsetHeight;
|
|
131
|
+
width = offsetWidth;
|
|
132
|
+
height = offsetHeight;
|
|
133
|
+
if (elementRatio > videoRatio) {
|
|
134
|
+
width = Math.floor(offsetHeight * videoRatio);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
height = Math.floor(offsetWidth / videoRatio);
|
|
138
|
+
}
|
|
139
|
+
const x = (offsetWidth - width) / 2;
|
|
140
|
+
const y = (offsetHeight - height) / 2;
|
|
141
|
+
return { width, height, x, y };
|
|
142
|
+
}
|
|
143
|
+
_computeCanvasSize(width = 0, height = 0) {
|
|
144
|
+
const scalefactor = this.prescaleFactor <= 0 ? 1.0 : this.prescaleFactor;
|
|
145
|
+
const ratio = self.devicePixelRatio || 1;
|
|
146
|
+
if (height <= 0 || width <= 0) {
|
|
147
|
+
width = 0;
|
|
148
|
+
height = 0;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
const sgn = scalefactor < 1 ? -1 : 1;
|
|
152
|
+
let newH = height * ratio;
|
|
153
|
+
if (sgn * newH * scalefactor <= sgn * this.prescaleHeightLimit) {
|
|
154
|
+
newH *= scalefactor;
|
|
155
|
+
}
|
|
156
|
+
else if (sgn * newH < sgn * this.prescaleHeightLimit) {
|
|
157
|
+
newH = this.prescaleHeightLimit;
|
|
158
|
+
}
|
|
159
|
+
if (this.maxRenderHeight > 0 && newH > this.maxRenderHeight)
|
|
160
|
+
newH = this.maxRenderHeight;
|
|
161
|
+
width *= newH / height;
|
|
162
|
+
height = newH;
|
|
163
|
+
}
|
|
164
|
+
return { width, height };
|
|
165
|
+
}
|
|
166
|
+
async setVideo(video) {
|
|
167
|
+
await this.ready;
|
|
168
|
+
if (video instanceof HTMLVideoElement) {
|
|
169
|
+
this._removeListeners();
|
|
170
|
+
this._video = video;
|
|
171
|
+
this._video.requestVideoFrameCallback((now, data) => this._handleRVFC(data));
|
|
172
|
+
// everything else is unreliable for this, loadedmetadata and loadeddata included.
|
|
173
|
+
if ('VideoFrame' in globalThis) {
|
|
174
|
+
video.addEventListener('loadedmetadata', () => this._updateColorSpace(), { signal: this._ctrl.signal });
|
|
175
|
+
if (video.readyState > 2)
|
|
176
|
+
this._updateColorSpace();
|
|
177
|
+
}
|
|
178
|
+
if (video.videoWidth > 0)
|
|
179
|
+
this.resize();
|
|
180
|
+
this._ro.observe(video);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
throw new Error('Video element invalid!');
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
async _sendLocalFont(name) {
|
|
187
|
+
try {
|
|
188
|
+
// @ts-expect-error ts doesnt know
|
|
189
|
+
const fontData = await queryLocalFonts();
|
|
190
|
+
// @ts-expect-error ts doesnt know
|
|
191
|
+
const font = fontData?.find(obj => obj.fullName.toLowerCase() === name);
|
|
192
|
+
if (font) {
|
|
193
|
+
const blob = await font.blob();
|
|
194
|
+
this.renderer.addFont(new Uint8Array(await blob.arrayBuffer()));
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
catch (e) {
|
|
198
|
+
console.warn('Local fonts API:', e);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
async _getLocalFont(font) {
|
|
202
|
+
try {
|
|
203
|
+
// electron by default has all permissions enabled, and it doesn't have perm query
|
|
204
|
+
// if this happens, just send it
|
|
205
|
+
if (navigator?.permissions?.query) {
|
|
206
|
+
// @ts-expect-error TS doesn't know about local-fonts
|
|
207
|
+
const permission = await navigator.permissions.query({ name: 'local-fonts' });
|
|
208
|
+
if (permission.state === 'granted') {
|
|
209
|
+
await this._sendLocalFont(font);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
await this._sendLocalFont(font);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
catch (e) {
|
|
217
|
+
console.warn('Local fonts API:', e);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
_handleRVFC(data) {
|
|
221
|
+
if (this._destroyed)
|
|
222
|
+
return;
|
|
223
|
+
this._lastDemandTime = data;
|
|
224
|
+
this._demandRender();
|
|
225
|
+
this._video.requestVideoFrameCallback((now, data) => this._handleRVFC(data));
|
|
226
|
+
}
|
|
227
|
+
async _demandRender() {
|
|
228
|
+
const { mediaTime, width, height } = this._lastDemandTime;
|
|
229
|
+
if (width !== this._videoWidth || height !== this._videoHeight) {
|
|
230
|
+
this._videoWidth = width;
|
|
231
|
+
this._videoHeight = height;
|
|
232
|
+
this.resize(false);
|
|
233
|
+
}
|
|
234
|
+
if (this.busy) {
|
|
235
|
+
this._skipped = true;
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
this.busy = true;
|
|
239
|
+
this._skipped = false;
|
|
240
|
+
await this.renderer._draw(mediaTime + this.timeOffset);
|
|
241
|
+
this.busy = false;
|
|
242
|
+
if (this._skipped)
|
|
243
|
+
this._demandRender();
|
|
244
|
+
}
|
|
245
|
+
async _updateColorSpace() {
|
|
246
|
+
await this.ready;
|
|
247
|
+
this._video.requestVideoFrameCallback(async () => {
|
|
248
|
+
try {
|
|
249
|
+
const frame = new VideoFrame(this._video);
|
|
250
|
+
frame.close();
|
|
251
|
+
await this.renderer._setColorSpace(webYCbCrMap[frame.colorSpace.matrix]);
|
|
252
|
+
}
|
|
253
|
+
catch (e) {
|
|
254
|
+
// sources can be tainted
|
|
255
|
+
console.warn(e);
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
_removeListeners() {
|
|
260
|
+
if (this._video) {
|
|
261
|
+
if (this._ro)
|
|
262
|
+
this._ro.unobserve(this._video);
|
|
263
|
+
this._ctrl.abort();
|
|
264
|
+
this._ctrl = new AbortController();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
async destroy() {
|
|
268
|
+
if (this._destroyed)
|
|
269
|
+
return;
|
|
270
|
+
this._destroyed = true;
|
|
271
|
+
if (this._video && this._canvasParent)
|
|
272
|
+
this._video.parentNode?.removeChild(this._canvasParent);
|
|
273
|
+
this._removeListeners();
|
|
274
|
+
await this.renderer[releaseProxy]();
|
|
275
|
+
this._worker.terminate();
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=jassub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jassub.js","sourceRoot":"","sources":["../src/jassub.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAA;AAEtB,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAKlC,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;IACd,4CAA4C;IAC5C,OAAO,EAAE,OAAO,EAAE,4CAA4C;IAC9D,SAAS,EAAE,OAAO,CAAA,6CAA6C;CACvD,CAAA;AA2BV,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,UAAU,CAAA;IACV,cAAc,CAAA;IACd,mBAAmB,CAAA;IACnB,eAAe,CAAA;IACf,KAAK,CAAA;IACL,QAAQ,CAAsB;IAC9B,KAAK,CAAA;IACL,IAAI,GAAG,KAAK,CAAA;IACZ,MAAM,CAAA;IACN,WAAW,GAAG,CAAC,CAAA;IACf,YAAY,GAAG,CAAC,CAAA;IAChB,gBAAgB,GAAkB,IAAI,CAAA;IACtC,OAAO,CAAA;IACP,aAAa,CA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