webcodecs-examples 0.1.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/LICENSE +21 -0
- package/README.md +105 -0
- package/dist/assets/file-DCgsDVsh.js +22251 -0
- package/dist/assets/file-DCgsDVsh.js.map +1 -0
- package/dist/assets/video.worker-DrxbiAg9.js +22579 -0
- package/dist/assets/video.worker-DrxbiAg9.js.map +1 -0
- package/dist/index.js +468 -0
- package/dist/index.js.map +1 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sam Bhattacharyya
|
|
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,105 @@
|
|
|
1
|
+
# WebCodecs Examples
|
|
2
|
+
|
|
3
|
+
Complete, production-ready WebCodecs implementation examples for [WebCodecs Fundamentals](https://webcodecsfundamentals.org).
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
### 🎬 [Video Player](./player) *(in progress)*
|
|
8
|
+
Full-featured video player demonstrating:
|
|
9
|
+
- Play/pause/seek controls
|
|
10
|
+
- Audio-video synchronization
|
|
11
|
+
- Worker-based decoding
|
|
12
|
+
- GPU rendering
|
|
13
|
+
- Timeline UI
|
|
14
|
+
- Volume & playback speed controls
|
|
15
|
+
|
|
16
|
+
**Live Demo**: Coming soon
|
|
17
|
+
**Source**: [/player](./player)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### 🔄 [Video Transcoding](./transcoding) *(planned)*
|
|
22
|
+
Transcode videos with different codecs, resolutions, and quality settings:
|
|
23
|
+
- Input: MP4/WebM
|
|
24
|
+
- Output: MP4/WebM with custom settings
|
|
25
|
+
- Audio pass-through (no re-encoding)
|
|
26
|
+
- Progress reporting
|
|
27
|
+
|
|
28
|
+
**Live Demo**: Coming soon
|
|
29
|
+
**Source**: [/transcoding](./transcoding)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### ✂️ [Video Editing](./editing) *(planned)*
|
|
34
|
+
Timeline-based video editing with:
|
|
35
|
+
- Cut/trim operations
|
|
36
|
+
- Multiple video sources
|
|
37
|
+
- Transitions
|
|
38
|
+
- Audio mixing
|
|
39
|
+
|
|
40
|
+
**Live Demo**: Coming soon
|
|
41
|
+
**Source**: [/editing](./editing)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### 📡 [Live Streaming](./live-streaming) *(planned)*
|
|
46
|
+
Live video stream ingestion and playback
|
|
47
|
+
|
|
48
|
+
**Live Demo**: Coming soon
|
|
49
|
+
**Source**: [/live-streaming](./live-streaming)
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Purpose
|
|
54
|
+
|
|
55
|
+
These examples complement the [WebCodecs Fundamentals](https://webcodecsfundamentals.org) documentation by providing:
|
|
56
|
+
- **Working code** you can study and learn from
|
|
57
|
+
- **Live demos** you can interact with
|
|
58
|
+
- **Starter templates** you can clone for your own projects
|
|
59
|
+
|
|
60
|
+
The fundamentals docs teach concepts. These examples show production implementation.
|
|
61
|
+
|
|
62
|
+
## Quick Start
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Clone the repo
|
|
66
|
+
git clone https://github.com/sb2702/webcodecs-examples.git
|
|
67
|
+
cd webcodecs-examples
|
|
68
|
+
|
|
69
|
+
# Run the player example
|
|
70
|
+
cd player
|
|
71
|
+
npm install
|
|
72
|
+
npm run dev
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Related Projects
|
|
76
|
+
|
|
77
|
+
- **[WebCodecs Fundamentals](https://webcodecsfundamentals.org)** - Learn WebCodecs concepts
|
|
78
|
+
- **[webcodecs-utils](https://www.npmjs.com/package/webcodecs-utils)** - Utility library used in these examples
|
|
79
|
+
- **[MediaBunny](https://mediabunny.dev/)** - Full-featured WebCodecs library
|
|
80
|
+
|
|
81
|
+
## Browser Support
|
|
82
|
+
|
|
83
|
+
These examples require:
|
|
84
|
+
- **Chrome 94+** or **Edge 94+** (full support)
|
|
85
|
+
- **Safari 17.4+** (partial support)
|
|
86
|
+
|
|
87
|
+
All examples include feature detection and graceful degradation.
|
|
88
|
+
|
|
89
|
+
## Contributing
|
|
90
|
+
|
|
91
|
+
Contributions welcome! Please:
|
|
92
|
+
1. Keep examples focused and production-quality
|
|
93
|
+
2. Follow existing code style
|
|
94
|
+
3. Include inline comments explaining WebCodecs patterns
|
|
95
|
+
4. Test in Chrome, Edge, and Safari
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
MIT
|
|
100
|
+
|
|
101
|
+
## Credits
|
|
102
|
+
|
|
103
|
+
Built for WebCodecs Fundamentals by Sam Bhattacharyya ([@sb2702](https://github.com/sb2702))
|
|
104
|
+
|
|
105
|
+
Created by the team at [Free.Upscaler.Video](https://free.upscaler.video)
|