akarisub 0.2.2 → 1.0.1
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 +198 -167
- package/THIRD_PARTY_NOTICES.md +55 -163
- package/dist/COPYRIGHT +56 -164
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -147
- package/dist/index.js.map +1 -0
- package/dist/ts/akarisub.d.ts +323 -0
- package/dist/ts/akarisub.d.ts.map +1 -0
- package/dist/ts/akarisub.js +2235 -0
- package/dist/ts/akarisub.js.map +1 -0
- package/dist/ts/timing.d.ts +63 -0
- package/dist/ts/timing.d.ts.map +1 -0
- package/dist/ts/timing.js +219 -0
- package/dist/ts/timing.js.map +1 -0
- package/dist/ts/{ts/types.d.ts → types.d.ts} +176 -78
- package/dist/ts/types.d.ts.map +1 -0
- package/dist/ts/types.js +2 -0
- package/dist/ts/{ts/types.js.map → types.js.map} +1 -1
- package/dist/ts/{ts/utils.d.ts → utils.d.ts} +24 -37
- package/dist/ts/utils.d.ts.map +1 -0
- package/dist/ts/{ts/utils.js → utils.js} +12 -56
- package/dist/ts/utils.js.map +1 -0
- package/dist/ts/wasm.d.ts +12 -0
- package/dist/ts/wasm.d.ts.map +1 -0
- package/dist/ts/wasm.js +46 -0
- package/dist/ts/wasm.js.map +1 -0
- package/dist/ts/{ts/webgl2-renderer.d.ts → webgl2-renderer.d.ts} +17 -12
- package/dist/ts/webgl2-renderer.d.ts.map +1 -0
- package/dist/ts/{ts/webgl2-renderer.js → webgl2-renderer.js} +17 -27
- package/dist/ts/webgl2-renderer.js.map +1 -0
- package/dist/ts/webgpu-renderer.d.ts +88 -0
- package/dist/ts/webgpu-renderer.d.ts.map +1 -0
- package/dist/ts/{ts/webgpu-renderer.js → webgpu-renderer.js} +173 -71
- package/dist/ts/webgpu-renderer.js.map +1 -0
- package/dist/ts/worker.d.ts +2 -0
- package/dist/ts/{ts/worker.d.ts.map → worker.d.ts.map} +1 -1
- package/dist/ts/{ts/worker.js → worker.js} +1064 -264
- package/dist/ts/worker.js.map +1 -0
- package/dist/wrapper.d.ts +8 -0
- package/dist/wrapper.d.ts.map +1 -0
- package/dist/{ts/index.js → wrapper.js} +4 -14
- package/dist/wrapper.js.map +1 -0
- package/package.json +24 -22
- package/pkg/akarisub.js +53 -0
- package/{dist/akarisub-worker.wasm → pkg/akarisub.wasm} +0 -0
- package/src/wrapper.ts +46 -0
- package/dist/akarisub-worker.js +0 -39
- package/dist/akarisub.umd.js +0 -159
- package/dist/ts/index.d.ts +0 -14
- package/dist/ts/index.d.ts.map +0 -1
- package/dist/ts/index.js.map +0 -1
- package/dist/ts/ts/akarisub.d.ts +0 -225
- package/dist/ts/ts/akarisub.d.ts.map +0 -1
- package/dist/ts/ts/akarisub.js +0 -1073
- package/dist/ts/ts/akarisub.js.map +0 -1
- package/dist/ts/ts/types.d.ts.map +0 -1
- package/dist/ts/ts/types.js +0 -5
- package/dist/ts/ts/utils.d.ts.map +0 -1
- package/dist/ts/ts/utils.js.map +0 -1
- package/dist/ts/ts/webgl2-renderer.d.ts.map +0 -1
- package/dist/ts/ts/webgl2-renderer.js.map +0 -1
- package/dist/ts/ts/webgpu-renderer.d.ts +0 -62
- package/dist/ts/ts/webgpu-renderer.d.ts.map +0 -1
- package/dist/ts/ts/webgpu-renderer.js.map +0 -1
- package/dist/ts/ts/worker.d.ts +0 -6
- package/dist/ts/ts/worker.js.map +0 -1
- package/dist/ts/wrapper.d.ts +0 -8
- package/dist/ts/wrapper.d.ts.map +0 -1
- package/dist/ts/wrapper.js +0 -9
- package/dist/ts/wrapper.js.map +0 -1
- package/src/ts/akarisub.ts +0 -1272
- package/src/ts/types.ts +0 -397
- package/src/ts/utils.ts +0 -512
- package/src/ts/webgl2-renderer.ts +0 -426
- package/src/ts/webgpu-renderer.ts +0 -691
- package/src/ts/worker.ts +0 -2052
- /package/{dist → assets}/default.woff2 +0 -0
|
@@ -1,48 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions for AkariSub TypeScript implementation.
|
|
3
|
-
*/
|
|
4
|
-
/** ASS Event (dialogue/subtitle entry) */
|
|
1
|
+
/** A single Dialogue or Comment event from an ASS/SSA track. */
|
|
5
2
|
export interface ASSEvent {
|
|
6
|
-
/** Start
|
|
3
|
+
/** Start time in seconds. */
|
|
7
4
|
Start: number;
|
|
8
|
-
/** Duration
|
|
5
|
+
/** Duration in seconds. */
|
|
9
6
|
Duration: number;
|
|
10
|
-
/** Style name */
|
|
7
|
+
/** Style name referenced by this event. */
|
|
11
8
|
Style: string;
|
|
12
9
|
/** Character name (for information only) */
|
|
13
10
|
Name: string;
|
|
14
|
-
/** Left
|
|
11
|
+
/** Left margin in script pixels. */
|
|
15
12
|
MarginL: number;
|
|
16
|
-
/** Right
|
|
13
|
+
/** Right margin in script pixels. */
|
|
17
14
|
MarginR: number;
|
|
18
|
-
/**
|
|
15
|
+
/** Vertical margin in script pixels. */
|
|
19
16
|
MarginV: number;
|
|
20
|
-
/** Transition
|
|
17
|
+
/** Transition or karaoke effect string. */
|
|
21
18
|
Effect: string;
|
|
22
|
-
/**
|
|
19
|
+
/** Dialogue text, including override tags. */
|
|
23
20
|
Text: string;
|
|
24
|
-
/**
|
|
21
|
+
/** libass read order used to break timestamp ties. */
|
|
25
22
|
ReadOrder: number;
|
|
26
|
-
/**
|
|
23
|
+
/** Collision layer. */
|
|
27
24
|
Layer: number;
|
|
28
|
-
/**
|
|
25
|
+
/** Original event index in the loaded track, when known. */
|
|
29
26
|
_index?: number;
|
|
30
27
|
}
|
|
31
|
-
/** ASS
|
|
28
|
+
/** A named style from an ASS/SSA `[V4+ Styles]` section. */
|
|
32
29
|
export interface ASSStyle {
|
|
33
30
|
/** Style name (case sensitive) */
|
|
34
31
|
Name: string;
|
|
35
|
-
/**
|
|
32
|
+
/** Typeface family used when the event does not override `\\fn`. */
|
|
36
33
|
FontName: string;
|
|
37
|
-
/** Font size */
|
|
34
|
+
/** Font size in script pixels. */
|
|
38
35
|
FontSize: number;
|
|
39
|
-
/**
|
|
36
|
+
/** RGBA packed as uint32 */
|
|
40
37
|
PrimaryColour: number;
|
|
41
|
-
/**
|
|
38
|
+
/** RGBA packed as uint32 */
|
|
42
39
|
SecondaryColour: number;
|
|
43
|
-
/**
|
|
40
|
+
/** RGBA packed as uint32 */
|
|
44
41
|
OutlineColour: number;
|
|
45
|
-
/**
|
|
42
|
+
/** RGBA packed as uint32 */
|
|
46
43
|
BackColour: number;
|
|
47
44
|
/** Bold (-1 = true, 0 = false) */
|
|
48
45
|
Bold: number;
|
|
@@ -52,82 +49,107 @@ export interface ASSStyle {
|
|
|
52
49
|
Underline: number;
|
|
53
50
|
/** StrikeOut (-1 = true, 0 = false) */
|
|
54
51
|
StrikeOut: number;
|
|
55
|
-
/** Width scale
|
|
52
|
+
/** Width scale percent */
|
|
56
53
|
ScaleX: number;
|
|
57
|
-
/** Height scale
|
|
54
|
+
/** Height scale percent */
|
|
58
55
|
ScaleY: number;
|
|
59
|
-
/** Extra spacing
|
|
56
|
+
/** Extra glyph spacing in script pixels. */
|
|
60
57
|
Spacing: number;
|
|
61
|
-
/**
|
|
58
|
+
/** Z-axis rotation in degrees. */
|
|
62
59
|
Angle: number;
|
|
63
60
|
/** Border style (1 = outline + shadow, 3 = opaque box) */
|
|
64
61
|
BorderStyle: number;
|
|
65
|
-
/** Outline width
|
|
62
|
+
/** Outline width in script pixels. */
|
|
66
63
|
Outline: number;
|
|
67
|
-
/** Shadow
|
|
64
|
+
/** Shadow offset in script pixels. */
|
|
68
65
|
Shadow: number;
|
|
69
66
|
/** Alignment (1-9, numpad style) */
|
|
70
67
|
Alignment: number;
|
|
71
|
-
/** Left margin
|
|
68
|
+
/** Left margin in script pixels. */
|
|
72
69
|
MarginL: number;
|
|
73
|
-
/** Right margin
|
|
70
|
+
/** Right margin in script pixels. */
|
|
74
71
|
MarginR: number;
|
|
75
|
-
/** Vertical margin
|
|
72
|
+
/** Vertical margin in script pixels. */
|
|
76
73
|
MarginV: number;
|
|
77
|
-
/**
|
|
74
|
+
/** Windows charset / encoding id. */
|
|
78
75
|
Encoding: number;
|
|
79
|
-
/**
|
|
76
|
+
/** When non-zero, `FontName` is treated as a fontconfig pattern. */
|
|
80
77
|
treat_fontname_as_pattern: number;
|
|
81
|
-
/**
|
|
78
|
+
/** Gaussian blur strength. */
|
|
82
79
|
Blur: number;
|
|
83
|
-
/**
|
|
80
|
+
/** Horizontal justification used with some alignments. */
|
|
84
81
|
Justify: number;
|
|
85
82
|
}
|
|
86
|
-
/**
|
|
83
|
+
/** Snapshot of renderer throughput, latency, and worker mode. */
|
|
87
84
|
export interface PerformanceStats {
|
|
88
|
-
/**
|
|
85
|
+
/** Number of frames the worker finished. */
|
|
89
86
|
framesRendered: number;
|
|
90
|
-
/** Number of frames
|
|
87
|
+
/** Number of frames skipped because a newer demand arrived. */
|
|
91
88
|
framesDropped: number;
|
|
92
|
-
/**
|
|
89
|
+
/** Mean worker render time in milliseconds. */
|
|
93
90
|
avgRenderTime: number;
|
|
94
|
-
/**
|
|
91
|
+
/** Slowest worker render time in milliseconds. */
|
|
95
92
|
maxRenderTime: number;
|
|
96
|
-
/**
|
|
93
|
+
/** Fastest worker render time in milliseconds. */
|
|
97
94
|
minRenderTime: number;
|
|
98
|
-
/**
|
|
95
|
+
/** Most recent worker render time in milliseconds. */
|
|
99
96
|
lastRenderTime: number;
|
|
100
|
-
/**
|
|
97
|
+
/** Current automatically learned presentation-latency compensation in milliseconds */
|
|
98
|
+
timingCompensationMs?: number;
|
|
99
|
+
/** Number of image planes emitted by the last render */
|
|
100
|
+
lastImageCount?: number;
|
|
101
|
+
/** Total RGBA/raw image pixels emitted by the last render */
|
|
102
|
+
lastImagePixels?: number;
|
|
103
|
+
/** Estimated frames per second from `avgRenderTime`. */
|
|
101
104
|
renderFps: number;
|
|
102
|
-
/**
|
|
105
|
+
/** Always true for this renderer; kept for compatibility. */
|
|
103
106
|
usingWorker: boolean;
|
|
104
|
-
/** Whether
|
|
107
|
+
/** Whether worker-side raw ASS_Image WebGL2 composition is active */
|
|
108
|
+
rawAssImageGpu?: boolean;
|
|
109
|
+
/** Backend that composed the last frame. */
|
|
110
|
+
workerRenderer?: 'webgl2-raw-ass' | 'canvas2d' | 'hybrid' | 'main-thread';
|
|
111
|
+
/** Whether the worker owns an OffscreenCanvas. */
|
|
105
112
|
offscreenRender: boolean;
|
|
106
|
-
/** Whether
|
|
113
|
+
/** Whether `requestVideoFrameCallback` drives presentation. */
|
|
107
114
|
onDemandRender: boolean;
|
|
108
|
-
/**
|
|
115
|
+
/** Demand renders still in flight. */
|
|
109
116
|
pendingRenders: number;
|
|
110
|
-
/**
|
|
117
|
+
/** Dialogue events currently in the track. */
|
|
111
118
|
totalEvents: number;
|
|
112
|
-
/**
|
|
119
|
+
/** Worker bitmap-cache hits. */
|
|
113
120
|
cacheHits: number;
|
|
114
|
-
/**
|
|
121
|
+
/** Worker bitmap-cache misses. */
|
|
115
122
|
cacheMisses: number;
|
|
116
123
|
}
|
|
117
|
-
/**
|
|
124
|
+
/** Encoded-frame timestamps with optional media/subtitle clock offsets. */
|
|
125
|
+
export interface FrameTimeline extends ArrayLike<number> {
|
|
126
|
+
/** Origin subtracted from raw browser media timestamps when locating a frame. */
|
|
127
|
+
mediaTimeOrigin?: number;
|
|
128
|
+
/** Signed offset subtracted from frame time when sampling libass. */
|
|
129
|
+
subtitleTimeOffset?: number;
|
|
130
|
+
}
|
|
131
|
+
/** Construction options for {@linkcode AkariSub}. */
|
|
118
132
|
export interface AkariSubOptions {
|
|
119
|
-
/** Video element to
|
|
133
|
+
/** Video element to overlay. Either `video` or `canvas` is required. */
|
|
120
134
|
video?: HTMLVideoElement;
|
|
121
|
-
/**
|
|
135
|
+
/** Existing canvas to paint into instead of creating an overlay. */
|
|
122
136
|
canvas?: HTMLCanvasElement;
|
|
123
137
|
/** Image blending mode: 'js' for hardware acceleration, 'wasm' for software */
|
|
124
138
|
blendMode?: 'js' | 'wasm';
|
|
125
139
|
/** Use async rendering with ImageBitmap (default: true) */
|
|
126
140
|
asyncRender?: boolean;
|
|
127
|
-
/** Use offscreen canvas rendering (default: true) */
|
|
141
|
+
/** Use offscreen canvas rendering (default: true for video-managed canvases, false for custom canvases) */
|
|
128
142
|
offscreenRender?: boolean;
|
|
143
|
+
/** Use worker-side raw ASS_Image WebGL2 composition (default: false) */
|
|
144
|
+
rawAssImageGpu?: boolean;
|
|
129
145
|
/** Use requestVideoFrameCallback for precise sync (default: true) */
|
|
130
146
|
onDemandRender?: boolean;
|
|
147
|
+
/** Compensate measured render/presentation latency while playing (default: true) */
|
|
148
|
+
adaptiveTiming?: boolean;
|
|
149
|
+
/** Encoded video-frame timestamps and optional browser/subtitle clock offsets, in seconds */
|
|
150
|
+
frameTimeline?: FrameTimeline;
|
|
151
|
+
/** Number of exact subtitle frames to prepare ahead (default: 2) */
|
|
152
|
+
framePrefetch?: number;
|
|
131
153
|
/** Target FPS when not using onDemandRender (default: 24) */
|
|
132
154
|
targetFps?: number;
|
|
133
155
|
/** Time offset in seconds (default: 0) */
|
|
@@ -146,35 +168,46 @@ export interface AkariSubOptions {
|
|
|
146
168
|
dropAllBlur?: boolean;
|
|
147
169
|
/** Clamp \\pos values to script resolution (default: false) */
|
|
148
170
|
clampPos?: boolean;
|
|
149
|
-
/** URL to the worker
|
|
171
|
+
/** Optional worker script URL. Defaults to the package worker module URL. */
|
|
150
172
|
workerUrl?: string;
|
|
151
|
-
/** URL to the WASM
|
|
173
|
+
/** Optional WASM binary URL. Defaults to the package WASM URL resolved from import.meta.url. */
|
|
152
174
|
wasmUrl?: string;
|
|
153
|
-
/** URL to
|
|
175
|
+
/** Optional WASM glue script URL. Defaults to the package glue URL resolved from import.meta.url. */
|
|
176
|
+
glueUrl?: string;
|
|
177
|
+
/** HTTP(S) URL of an ASS/SSA file to load after init. */
|
|
154
178
|
subUrl?: string;
|
|
155
|
-
/**
|
|
179
|
+
/** Inline ASS/SSA text or bytes to load after init. */
|
|
156
180
|
subContent?: string | Uint8Array | ArrayBuffer;
|
|
157
181
|
/** Encrypted subtitle content decrypted inside the worker before loading into libass */
|
|
158
182
|
encryptedSubContent?: EncryptedSubtitleContent;
|
|
159
|
-
/**
|
|
183
|
+
/** Extra fonts as URLs or file bytes. */
|
|
160
184
|
fonts?: (string | Uint8Array)[];
|
|
161
|
-
/**
|
|
185
|
+
/** Map of font family name to URL or file bytes. */
|
|
162
186
|
availableFonts?: Record<string, string | Uint8Array>;
|
|
163
187
|
/** Fallback font families in order (default: ['liberation sans']). Fontconfig uses these for cascade. */
|
|
164
188
|
fallbackFonts?: string[];
|
|
165
|
-
/** Use Local Font Access API (default: true if available) */
|
|
189
|
+
/** Use Local Font Access API for OS font lookup (default: true if available) */
|
|
166
190
|
useLocalFonts?: boolean;
|
|
191
|
+
/** Use libass fontconfig provider for virtual/packaged font lookup (default: true) */
|
|
192
|
+
useFontconfigProvider?: boolean;
|
|
167
193
|
/** libass bitmap cache memory limit in MiB */
|
|
168
194
|
libassMemoryLimit?: number;
|
|
169
195
|
/** libass glyph cache limit */
|
|
170
196
|
libassGlyphLimit?: number;
|
|
171
197
|
/** Callback invoked when all GPU renderers (WebGPU, WebGL2) are unavailable and the renderer falls back to Canvas2D */
|
|
172
198
|
onCanvasFallback?: () => void;
|
|
173
|
-
/** Additional time in seconds to render subtitles ahead
|
|
199
|
+
/** Additional time in seconds to render subtitles ahead, on top of adaptive timing (default: 0) */
|
|
174
200
|
renderAhead?: number;
|
|
175
201
|
/** Pre-render early track windows after load to warm libass caches (default: false) */
|
|
176
202
|
fullTrackWarmup?: boolean;
|
|
203
|
+
/** Wait for fullTrackWarmup to finish before ready (default: false) */
|
|
204
|
+
blockingFullTrackWarmup?: boolean;
|
|
205
|
+
/** Step in seconds for fullTrackWarmup; lower values warm more frames (default: 1) */
|
|
206
|
+
fullTrackWarmupStep?: number;
|
|
207
|
+
/** Allow adaptive CPU preblend layouts for text-heavy frames (default: false) */
|
|
208
|
+
adaptiveBlendLayouts?: boolean;
|
|
177
209
|
}
|
|
210
|
+
/** AES-GCM subtitle payload decrypted inside the worker. */
|
|
178
211
|
export interface EncryptedSubtitleContent {
|
|
179
212
|
/** Non-extractable AES-GCM content key from akari-crypto's v2 transport flow */
|
|
180
213
|
contentKey: CryptoKey;
|
|
@@ -191,24 +224,47 @@ export type ASSStyleCallback = (error: Error | null, styles: ASSStyle[]) => void
|
|
|
191
224
|
export type PerformanceStatsCallback = (error: Error | null, stats: PerformanceStats | null) => void;
|
|
192
225
|
/** @deprecated Use Promise-based resetStats() instead */
|
|
193
226
|
export type ResetStatsCallback = (error: Error | null) => void;
|
|
194
|
-
/**
|
|
227
|
+
/** One blended subtitle bitmap or GPU plane to composite. */
|
|
195
228
|
export interface RenderImage {
|
|
229
|
+
/** Destination X in canvas pixels. */
|
|
196
230
|
x: number;
|
|
231
|
+
/** Destination Y in canvas pixels. */
|
|
197
232
|
y: number;
|
|
233
|
+
/** Bitmap width in pixels. */
|
|
198
234
|
w: number;
|
|
235
|
+
/** Bitmap height in pixels. */
|
|
199
236
|
h: number;
|
|
237
|
+
/** Premultiplied RGBA bitmap, or a WASM pointer when using raw GPU composition. */
|
|
200
238
|
image: ImageBitmap | ArrayBuffer | Uint8Array | Uint8ClampedArray | number;
|
|
201
239
|
}
|
|
202
|
-
/**
|
|
240
|
+
/** Raw libass ASS_Image plane exposed directly from WASM for GPU mask composition. */
|
|
241
|
+
export interface RawASSImage {
|
|
242
|
+
dst_x: number;
|
|
243
|
+
dst_y: number;
|
|
244
|
+
w: number;
|
|
245
|
+
h: number;
|
|
246
|
+
/** Pointer to ASS_Image.bitmap in WASM memory */
|
|
247
|
+
bitmap: number;
|
|
248
|
+
/** ASS_Image.color packed as RRGGBBAA */
|
|
249
|
+
color: number;
|
|
250
|
+
stride: number;
|
|
251
|
+
type: number;
|
|
252
|
+
}
|
|
253
|
+
/** Timing breakdown for a single worker render, in milliseconds. */
|
|
203
254
|
export interface RenderTimes {
|
|
255
|
+
/** libass raster time. */
|
|
204
256
|
WASMRenderTime?: number;
|
|
257
|
+
/** Time spent copying WASM bitmaps into JS. */
|
|
205
258
|
WASMBitmapDecodeTime?: number;
|
|
259
|
+
/** Main-thread composite time. */
|
|
206
260
|
JSRenderTime?: number;
|
|
261
|
+
/** ImageBitmap construction time. */
|
|
207
262
|
JSBitmapGenerationTime?: number;
|
|
263
|
+
/** Worker-to-main postMessage latency. */
|
|
208
264
|
IPCTime?: number;
|
|
265
|
+
/** Number of bitmaps in this frame. */
|
|
209
266
|
bitmaps?: number;
|
|
210
267
|
}
|
|
211
|
-
/** Worker -> Main thread message for rendering */
|
|
212
268
|
export interface RenderMessage {
|
|
213
269
|
target: 'render';
|
|
214
270
|
asyncRender: boolean;
|
|
@@ -217,14 +273,20 @@ export interface RenderMessage {
|
|
|
217
273
|
width: number;
|
|
218
274
|
height: number;
|
|
219
275
|
colorSpace: string | null;
|
|
276
|
+
requestId?: number;
|
|
277
|
+
renderEpoch?: number;
|
|
278
|
+
presentationId?: number;
|
|
220
279
|
}
|
|
221
|
-
/** Worker -> Main thread messages */
|
|
222
280
|
export type WorkerOutboundMessage = {
|
|
223
281
|
target: 'ready';
|
|
224
282
|
} | {
|
|
225
283
|
target: 'trackReady';
|
|
226
284
|
} | {
|
|
227
285
|
target: 'unbusy';
|
|
286
|
+
requestId?: number;
|
|
287
|
+
renderEpoch?: number;
|
|
288
|
+
presentationId?: number;
|
|
289
|
+
painted?: boolean;
|
|
228
290
|
} | {
|
|
229
291
|
target: 'console';
|
|
230
292
|
command: string;
|
|
@@ -255,14 +317,21 @@ export type WorkerOutboundMessage = {
|
|
|
255
317
|
target: 'getStyleCount';
|
|
256
318
|
count: number;
|
|
257
319
|
} | RenderMessage;
|
|
258
|
-
/** Main thread -> Worker init message */
|
|
259
320
|
export interface WorkerInitMessage {
|
|
260
321
|
target: 'init';
|
|
261
322
|
wasmUrl: string;
|
|
323
|
+
glueUrl?: string;
|
|
262
324
|
asyncRender: boolean;
|
|
263
325
|
fullTrackWarmup: boolean;
|
|
326
|
+
blockingFullTrackWarmup: boolean;
|
|
327
|
+
fullTrackWarmupStep: number;
|
|
328
|
+
adaptiveBlendLayouts: boolean;
|
|
329
|
+
rawAssImageGpu: boolean;
|
|
264
330
|
onDemandRender: boolean;
|
|
265
331
|
initialTime: number;
|
|
332
|
+
initialIsPaused: boolean;
|
|
333
|
+
initialPlaybackRate: number;
|
|
334
|
+
initialTimeSnapshotAtMs: number;
|
|
266
335
|
width: number;
|
|
267
336
|
height: number;
|
|
268
337
|
blendMode: 'js' | 'wasm';
|
|
@@ -274,17 +343,21 @@ export interface WorkerInitMessage {
|
|
|
274
343
|
fallbackFonts: string[];
|
|
275
344
|
debug: boolean;
|
|
276
345
|
targetFps: number;
|
|
346
|
+
renderAhead: number;
|
|
347
|
+
adaptiveTiming: boolean;
|
|
348
|
+
frameTimelineMode: boolean;
|
|
277
349
|
dropAllAnimations?: boolean;
|
|
278
350
|
dropAllBlur?: boolean;
|
|
279
351
|
clampPos?: boolean;
|
|
280
352
|
libassMemoryLimit?: number;
|
|
281
353
|
libassGlyphLimit?: number;
|
|
282
354
|
useLocalFonts: boolean;
|
|
355
|
+
useFontconfigProvider: boolean;
|
|
283
356
|
hasBitmapBug: boolean;
|
|
284
357
|
}
|
|
285
|
-
/** Main thread -> Worker messages */
|
|
286
358
|
export type WorkerInboundMessage = WorkerInitMessage | {
|
|
287
359
|
target: 'offscreenCanvas';
|
|
360
|
+
rawAssImageGpu?: boolean;
|
|
288
361
|
transferable: [OffscreenCanvas];
|
|
289
362
|
} | {
|
|
290
363
|
target: 'detachOffscreen';
|
|
@@ -300,6 +373,7 @@ export type WorkerInboundMessage = WorkerInitMessage | {
|
|
|
300
373
|
currentTime?: number;
|
|
301
374
|
isPaused?: boolean;
|
|
302
375
|
rate?: number;
|
|
376
|
+
renderAhead?: number;
|
|
303
377
|
colorSpace?: string | null;
|
|
304
378
|
} | {
|
|
305
379
|
target: 'setTrack';
|
|
@@ -315,6 +389,26 @@ export type WorkerInboundMessage = WorkerInitMessage | {
|
|
|
315
389
|
} | {
|
|
316
390
|
target: 'demand';
|
|
317
391
|
time: number;
|
|
392
|
+
force?: boolean;
|
|
393
|
+
requestId?: number;
|
|
394
|
+
renderEpoch?: number;
|
|
395
|
+
presentationId?: number;
|
|
396
|
+
} | {
|
|
397
|
+
target: 'prepare';
|
|
398
|
+
time: number;
|
|
399
|
+
prepareId: number;
|
|
400
|
+
renderEpoch: number;
|
|
401
|
+
force?: boolean;
|
|
402
|
+
} | {
|
|
403
|
+
target: 'presentation';
|
|
404
|
+
presentationId: number;
|
|
405
|
+
} | {
|
|
406
|
+
target: 'presentFrame';
|
|
407
|
+
bitmap: ImageBitmap;
|
|
408
|
+
presentationId: number;
|
|
409
|
+
} | {
|
|
410
|
+
target: 'frameTimelineMode';
|
|
411
|
+
enabled: boolean;
|
|
318
412
|
} | {
|
|
319
413
|
target: 'destroy';
|
|
320
414
|
} | {
|
|
@@ -363,39 +457,42 @@ export type WorkerInboundMessage = WorkerInitMessage | {
|
|
|
363
457
|
} | {
|
|
364
458
|
target: 'getColorSpace';
|
|
365
459
|
};
|
|
366
|
-
/** requestVideoFrameCallback
|
|
460
|
+
/** Metadata passed to `HTMLVideoElement.requestVideoFrameCallback`. */
|
|
367
461
|
export interface VideoFrameCallbackMetadata {
|
|
368
|
-
/**
|
|
462
|
+
/** Media time of the presented frame, in seconds. */
|
|
369
463
|
mediaTime: number;
|
|
370
|
-
/**
|
|
464
|
+
/** Presented frame width in CSS pixels. */
|
|
371
465
|
width: number;
|
|
372
|
-
/**
|
|
466
|
+
/** Presented frame height in CSS pixels. */
|
|
373
467
|
height: number;
|
|
374
|
-
/**
|
|
468
|
+
/** Count of frames presented since the callback was scheduled. */
|
|
375
469
|
presentedFrames?: number;
|
|
376
|
-
/** Time spent processing the frame
|
|
470
|
+
/** Time spent processing the frame, in milliseconds. */
|
|
377
471
|
processingDuration?: number;
|
|
378
|
-
/**
|
|
472
|
+
/** Predicted compositor display time, in milliseconds. */
|
|
379
473
|
expectedDisplayTime?: number;
|
|
380
|
-
/**
|
|
474
|
+
/** Capture timestamp, in milliseconds. */
|
|
381
475
|
presentationTime?: number;
|
|
382
476
|
}
|
|
477
|
+
/** Video YCbCr matrix used for subtitle color-space conversion. */
|
|
383
478
|
export type WebYCbCrColorSpace = 'BT709' | 'BT601';
|
|
479
|
+
/** libass YCbCr matrix, or `null` when the track does not declare one. */
|
|
384
480
|
export type SubtitleColorSpace = 'BT601' | 'BT709' | 'SMPTE240M' | 'FCC' | null;
|
|
385
|
-
/** Emscripten AkariSub Module (C ABI exports) */
|
|
386
481
|
export interface AkariSubModule extends EmscriptenModule {
|
|
387
482
|
_malloc: (size: number) => number;
|
|
388
483
|
_free: (ptr: number) => void;
|
|
389
484
|
_akarisub_create: (width: number, height: number, fallbackFontPtr: number, debug: number) => number;
|
|
390
485
|
_akarisub_destroy: (handle: number) => void;
|
|
391
486
|
_akarisub_set_drop_animations: (handle: number, value: number) => void;
|
|
487
|
+
_akarisub_set_adaptive_blend_layouts: (handle: number, value: number) => void;
|
|
392
488
|
_akarisub_create_track_mem: (handle: number, contentPtr: number) => void;
|
|
393
489
|
_akarisub_remove_track: (handle: number) => void;
|
|
394
490
|
_akarisub_resize_canvas: (handle: number, width: number, height: number, videoWidth: number, videoHeight: number) => void;
|
|
395
|
-
_akarisub_add_font: (handle: number, namePtr: number, dataPtr: number, size: number) =>
|
|
491
|
+
_akarisub_add_font: (handle: number, namePtr: number, dataPtr: number, size: number) => number;
|
|
396
492
|
_akarisub_reload_fonts: (handle: number) => void;
|
|
397
493
|
_akarisub_set_default_font: (handle: number, fontPtr: number) => void;
|
|
398
494
|
_akarisub_set_fallback_fonts: (handle: number, fontsPtr: number) => void;
|
|
495
|
+
_akarisub_set_use_fontconfig_provider: (handle: number, enabled: number) => void;
|
|
399
496
|
_akarisub_set_memory_limits: (handle: number, glyphLimit: number, memoryLimit: number) => void;
|
|
400
497
|
_akarisub_get_event_count: (handle: number) => number;
|
|
401
498
|
_akarisub_alloc_event: (handle: number) => number;
|
|
@@ -418,6 +515,7 @@ export interface AkariSubModule extends EmscriptenModule {
|
|
|
418
515
|
_akarisub_get_empty_window: (handle: number, tm: number, outPtr: number) => number;
|
|
419
516
|
_akarisub_render_blend_collect: (handle: number, time: number, force: number, outPtr: number, maxItems: number) => number;
|
|
420
517
|
_akarisub_render_image_collect: (handle: number, time: number, force: number, outPtr: number, maxItems: number) => number;
|
|
518
|
+
_akarisub_render_raw_collect: (handle: number, time: number, force: number, outPtr: number, maxItems: number) => number;
|
|
421
519
|
FS_createPath: (parent: string, path: string, canRead: boolean, canWrite: boolean) => void;
|
|
422
520
|
FS_createDataFile: (parent: string, name: string | null, data: Uint8Array, canRead: boolean, canWrite: boolean, canOwn?: boolean) => void;
|
|
423
521
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ts/types.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,MAAM,WAAW,QAAQ;IACvB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAA;IACf,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAA;IACjB,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,4DAA4D;AAC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AAA;IACX,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1F,iBAAiB,EAAE,CACjB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,OAAO,EACjB,MAAM,CAAC,EAAE,OAAO,KACb,IAAI,CAAA;CACV"}
|
package/dist/ts/types.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/ts/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility functions for AkariSub.
|
|
3
|
-
*/
|
|
4
1
|
import type { SubtitleColorSpace, WebYCbCrColorSpace } from './types';
|
|
5
|
-
/** Map
|
|
2
|
+
/** Map from HTMLVideoElement color-space names to {@linkcode WebYCbCrColorSpace}. */
|
|
6
3
|
export declare const webYCbCrMap: Record<string, WebYCbCrColorSpace>;
|
|
7
|
-
/**
|
|
4
|
+
/** feColorMatrix values that convert a subtitle matrix into a video matrix. */
|
|
8
5
|
export declare const colorMatrixConversionMap: Record<string, Record<string, string>>;
|
|
9
|
-
/** libass YCbCr
|
|
6
|
+
/** libass `YCbCr Matrix` header values indexed by the libass enum. */
|
|
10
7
|
export declare const libassYCbCrMap: (SubtitleColorSpace | null)[];
|
|
11
|
-
/**
|
|
12
|
-
* Generate SVG filter URL for color space conversion.
|
|
13
|
-
*/
|
|
8
|
+
/** SVG filter URL that converts `subtitleColorSpace` into `videoColorSpace`, or `null` when none is needed. */
|
|
14
9
|
export declare function getColorSpaceFilterUrl(subtitleColorSpace: SubtitleColorSpace, videoColorSpace: WebYCbCrColorSpace): string | null;
|
|
15
|
-
/**
|
|
16
|
-
* Compute canvas size with prescaling.
|
|
17
|
-
*/
|
|
10
|
+
/** Canvas pixel size after device-pixel-ratio and prescale limits. */
|
|
18
11
|
export declare function computeCanvasSize(width: number, height: number, prescaleFactor: number, prescaleHeightLimit: number, maxRenderHeight: number): {
|
|
19
12
|
width: number;
|
|
20
13
|
height: number;
|
|
21
14
|
};
|
|
22
|
-
/**
|
|
23
|
-
* Get video position and size accounting for aspect ratio.
|
|
24
|
-
*/
|
|
15
|
+
/** Letterboxed video rectangle inside the element's layout box. */
|
|
25
16
|
export declare function getVideoPosition(video: HTMLVideoElement, videoWidth?: number, videoHeight?: number): {
|
|
26
17
|
width: number;
|
|
27
18
|
height: number;
|
|
@@ -32,47 +23,43 @@ export declare function getVideoPosition(video: HTMLVideoElement, videoWidth?: n
|
|
|
32
23
|
* Fix alpha bug in some browsers (transparent pixels rendered as non-black).
|
|
33
24
|
*/
|
|
34
25
|
export declare function fixAlpha(uint8: Uint8ClampedArray, hasAlphaBug: boolean): Uint8ClampedArray;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
interface ASSBodyEntry {
|
|
26
|
+
/** One key/value or comment line inside an {@linkcode ASSSection}. */
|
|
27
|
+
export interface ASSBodyEntry {
|
|
28
|
+
/** Present for `;` comment lines. */
|
|
40
29
|
type?: 'comment';
|
|
30
|
+
/** ASS key such as `Dialogue` or `Format`. */
|
|
41
31
|
key?: string;
|
|
32
|
+
/** Raw string, format columns, or a Format-keyed record. */
|
|
42
33
|
value: string | string[] | Record<string, string>;
|
|
43
34
|
}
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*/
|
|
35
|
+
/** A `[Section]` block from an ASS/SSA file. */
|
|
36
|
+
export interface ASSSection {
|
|
37
|
+
/** Section title without brackets, for example `Events`. */
|
|
38
|
+
name: string;
|
|
39
|
+
/** Ordered lines in this section. */
|
|
40
|
+
body: ASSBodyEntry[];
|
|
41
|
+
}
|
|
42
|
+
/** Parse ASS/SSA text into named sections. Stops before `[Events]` when `stopAtEvents` is set. */
|
|
49
43
|
export declare function parseAss(content: string, stopAtEvents?: boolean): ASSSection[];
|
|
50
|
-
/**
|
|
51
|
-
* Remove all blur tags from subtitle content.
|
|
52
|
-
*/
|
|
44
|
+
/** Strip `\\blur` override tags from an ASS document. */
|
|
53
45
|
export declare function dropBlur(subContent: string): string;
|
|
54
46
|
/**
|
|
55
47
|
* Scale override tags in Events from detected source resolution to PlayRes.
|
|
56
48
|
* Only scales tags within override blocks {...} in the Events section.
|
|
57
49
|
*/
|
|
58
50
|
export declare function fixPlayRes(subContent: string): string;
|
|
59
|
-
/**
|
|
60
|
-
* Test for browser image bugs.
|
|
61
|
-
*/
|
|
51
|
+
/** Probe canvas `ImageData` and `ImageBitmap` bugs used by the renderer workarounds. */
|
|
62
52
|
export declare function testImageBugs(): Promise<{
|
|
63
53
|
hasAlphaBug: boolean;
|
|
64
54
|
hasBitmapBug: boolean;
|
|
65
55
|
}>;
|
|
66
|
-
/**
|
|
67
|
-
* Run all feature detection tests.
|
|
68
|
-
*/
|
|
56
|
+
/** Run canvas feature tests. Currently the same as {@linkcode testImageBugs}. */
|
|
69
57
|
export declare function runFeatureTests(): Promise<{
|
|
70
58
|
hasAlphaBug: boolean;
|
|
71
59
|
hasBitmapBug: boolean;
|
|
72
60
|
}>;
|
|
73
|
-
/**
|
|
61
|
+
/** Last {@linkcode testImageBugs} alpha-bug result, or `null` before the first probe. */
|
|
74
62
|
export declare function getAlphaBug(): boolean | null;
|
|
75
|
-
/**
|
|
63
|
+
/** Last {@linkcode testImageBugs} partial-bitmap-bug result, or `null` before the first probe. */
|
|
76
64
|
export declare function getBitmapBug(): boolean | null;
|
|
77
|
-
export {};
|
|
78
65
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src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