@pneuma-craft/video 0.4.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/CHANGELOG.md ADDED
@@ -0,0 +1,29 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@pneuma-craft/video` will be documented in this file.
4
+
5
+ ## 0.4.0
6
+
7
+ ### Fixed
8
+
9
+ - **Video clips with embedded audio now play and export with sound.** Previously the audio scheduler, audio preload, and offline audio renderer all hard-filtered to `track.type === 'audio'`, so any video clip dropped on a `video` track was silent in both preview and export — only clips on dedicated audio tracks produced sound. All three paths now include `video` tracks and attempt `decodeAudio` on every clip; clips whose asset has no audio stream (images, silent videos) are silently skipped. Mute gate is `track.muted` for both track types, matching standard NLE semantics.
10
+
11
+ ### Peer dependency
12
+
13
+ - Requires `@pneuma-craft/timeline >= 0.3.0` for the split `muted` (audio) / `visible` (picture) semantics. Pinning an older timeline still works but muting a video track will also hide its picture.
14
+
15
+ ## 0.3.0
16
+
17
+ ### Added
18
+
19
+ - `SubtitleRenderer` injection point shared by preview (`createPlaybackEngine`) and export (`createExportEngine`). See commit `3b014c5` for details.
20
+
21
+ ## 0.2.0
22
+
23
+ ### Fixed
24
+
25
+ - Preserve alpha channel end-to-end for transparent layers (Canvas2D + WebGPU compositors, image letterbox, mediabunny CanvasSink `alpha: true`).
26
+
27
+ ## 0.1.0
28
+
29
+ - Initial release.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pandazki
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @pneuma-craft/video
2
+
3
+ Video engine for pneuma-craft — decode, composite, preview, and export. Built on [MediaBunny](https://mediabunny.dev) (WebCodecs) for I/O, with self-built Canvas 2D compositor and Web Audio scheduler for playback.
4
+
5
+ ```bash
6
+ bun add @pneuma-craft/video
7
+ ```
8
+
9
+ ## What's in here
10
+
11
+ - **Decoder** — MediaBunny `Input` + `CanvasSink` / `AudioBufferSink`
12
+ - **Compositor** — Canvas 2D layer compositor with transforms, opacity, blend modes
13
+ - **Audio scheduler** — Web Audio graph with `AudioContext.currentTime` as master clock; drift-corrected against video
14
+ - **Preview engine** — drives a rAF loop to play a `@pneuma-craft/timeline` composition
15
+ - **Exporter** — renders frame-by-frame via WebCodecs `VideoEncoder`, mixes audio via `OfflineAudioContext`, muxes via MediaBunny `Output`
16
+ - **Pluggable subtitle renderer** — shared between preview and export
17
+
18
+ ## Browser support
19
+
20
+ Requires WebCodecs (`VideoDecoder`/`VideoEncoder`) and modern Canvas 2D. Tested on Chromium-based browsers and Safari Tech Preview.
21
+
22
+ ## Documentation
23
+
24
+ See the [pneuma-craft repository](https://github.com/pandazki/pneuma-craft) for the full design spec, architecture, and usage examples.
25
+
26
+ ## License
27
+
28
+ MIT © Pandazki