feat(recording): add output format options and MP4 conversion support

- Introduced `outputFormat` state in `WccRecordingPanel` for selecting between MP4 and WebM formats.
- Updated `RecorderService` to handle MP4 conversion using mediabunny.
- Added type stubs for `MediaStreamAudioTrack` and `MediaStreamVideoTrack` to ensure type safety.
- Updated documentation to reflect changes in output format handling.
This commit is contained in:
2026-04-12 23:17:21 +00:00
parent d9330a5fa1
commit 3eeb9dc46f
10 changed files with 160 additions and 21 deletions

View File

@@ -0,0 +1,12 @@
// Minimal type stubs for MediaCapture Transform API types not yet in lib.dom.d.ts.
// These specialize MediaStreamTrack for audio/video so mediabunny's API is type-safe.
interface MediaStreamAudioTrack extends MediaStreamTrack {
readonly kind: 'audio';
clone(): MediaStreamAudioTrack;
}
interface MediaStreamVideoTrack extends MediaStreamTrack {
readonly kind: 'video';
clone(): MediaStreamVideoTrack;
}

View File

@@ -0,0 +1,6 @@
{
"name": "@types/dom-mediacapture-transform",
"version": "0.0.0",
"description": "Minimal stub providing MediaStreamVideoTrack/MediaStreamAudioTrack for TS 6",
"types": "index.d.ts"
}

View File

@@ -0,0 +1,2 @@
// Empty stub: TypeScript 6 includes WebCodecs types in lib.dom.d.ts natively.
// This prevents @types/dom-webcodecs from conflicting with the built-in types.

View File

@@ -0,0 +1,6 @@
{
"name": "@types/dom-webcodecs",
"version": "0.0.0",
"description": "Empty stub — TypeScript 6 provides WebCodecs types natively in lib.dom.d.ts",
"types": "index.d.ts"
}