David Schulte
ac12e5aef5
Added an optional mode setting to force a custom worker mode.
...
Handled browser specific edge cases for older WebOS versions.
2024-09-13 22:33:02 +02:00
David Schulte
f0586396ae
Added polyfills for older browser.
2024-09-13 22:33:02 +02:00
David Schulte
1a62bf35bb
Implemented a fallback main thread loader and renderer to support for legacy browsers.
2024-09-13 22:33:02 +02:00
David Schulte
525e011c9b
Bump version to 0.5.0.
v0.5.0
2024-08-18 00:38:13 +02:00
David Schulte
b1b5062e08
Split loading and rendering into separate classes.
...
Added a fallback implementation if `transferControlToOffscreen` is not supported.
Subtitle rendering now uses `putImageData`. This is faster, but replaces all pixels at this location and disallows overlays. Not sure if overlapping multiple PGS windows is even allowed.
2024-08-18 00:38:13 +02:00
David Schulte
4f342ba3e8
Bump version to 0.4.1.
v0.4.1
2024-07-15 18:13:54 +02:00
David Schulte
7f12adc38a
Pre-compile the next subtitle change after the current subtitle was rendered.
2024-07-15 18:13:54 +02:00
David Schulte
7ddf8c77de
Refactored renderer to return pre-compiled render data without rendering it. Will be used for caching.
2024-07-15 18:13:54 +02:00
David Schulte
a9bf6dd604
Fixed spelling in README.md.
2024-07-15 18:13:54 +02:00
David Schulte
8ccec2504e
Implemented async pgs loading. This enables the renderer to parse the subtitle stream while it's still downloading. All display sets in the completed download range can already be rendered and don't have to wait until the whole file is completed.
2024-07-15 18:13:54 +02:00
David Schulte
728e0345c5
Improve the run-length-encoding performance:
...
- Avoid using slow callbacks
- Copy and storing the rgba value as one 32bit value instead of four single bytes.
- Store rgba data in one buffer and not objects
2024-07-15 18:13:54 +02:00
David Schulte
7037d5dff2
Only clearing the used area on the canvas, because clearing the whole area every frame is slow.
2024-07-15 18:13:54 +02:00
David Schulte
a552563179
Bump version to 0.4.0.
v0.4.0
v4.0
2024-07-07 18:27:50 +02:00
David Schulte
3daac947a3
Replaces webpack with rollup to support outputting as es5 module.
2024-07-07 18:27:50 +02:00
David Schulte
b31e4a8e14
Fix equal warning in renderer.
2024-07-07 18:27:50 +02:00
David Schulte
f7817d3625
Bump version to 0.3.3.
2024-06-16 01:20:57 +02:00
David Schulte
54c118e8ac
Added a test to verify PGS loading and rendering by comparing it to an example result.
2024-06-16 01:20:57 +02:00
David Schulte
01b4c954fb
Only load PGS timestamps from the PCS. Some tools write 0 into other segments.
2024-06-16 01:20:57 +02:00
David Schulte
ef52d0bc6e
Bump version to 0.3.2.
v0.3.2
2024-06-15 15:20:58 +02:00
David Schulte
9506dd347d
The PGS implementation now handles previous segments as intended.
2024-06-15 15:20:58 +02:00
David Schulte
8652176fc9
Bump version to 0.3.1.
v0.3.1
2024-06-13 21:26:13 +02:00
David Schulte
bae6d29f51
Fixed subtitle not be cleared when seeking to a position before the first subtitle.
2024-06-13 21:26:13 +02:00
David Schulte
037da7c564
Bump version to 0.3.0.
v0.3.0
2024-06-13 21:02:35 +02:00
David Schulte
1b574fe203
Loading and rendering subtitles is now done in a separate thread via a web-worker to optimize performance.
2024-06-13 21:02:35 +02:00
David Schulte
e0f5c2ef86
Added GitHub Action to run tests on pushes or pull requests.
2024-06-12 22:59:46 +02:00
David Schulte
1bd16eb205
Bump version to 0.2.2.
v0.2.2
2024-06-12 22:42:02 +02:00
David Schulte
fa6cd16339
Added GitHub Action to build and upload package to npmjs.
2024-06-12 22:42:02 +02:00
David Schulte
a6c0180ce7
Improved documentation and updated README.md.
2024-06-11 22:43:45 +02:00
David Schulte
9e280dc35e
Bump version to 0.2.1.
2024-06-09 21:27:29 +02:00
David Schulte
bb50820f0a
Added an optional timeOffset to synchronize the video and subtitle.
2024-06-09 21:27:21 +02:00
David Schulte
7bc9b71668
Bump version to 0.2.0.
2024-06-09 16:26:01 +02:00
David Schulte
052b6139c6
Updated README.md.
2024-06-09 16:23:52 +02:00
David Schulte
2489e53967
Renamed fileUrl to subUrl in PgsRendererOptions.
...
Refactored binary reader to reduce memory allocations.
Added tests.
2024-06-09 15:57:48 +02:00
David Schulte
9e149cdcae
Refactored comments and namings.
...
Allowed the use of a custom canvas element.
2024-06-08 00:43:52 +02:00
David Schulte
4cc048910d
Initial commit
2024-06-07 20:09:58 +02:00