Skip to content

Commit

Permalink
refactor: update FlvStreamer initialization with new options in recor…
Browse files Browse the repository at this point in the history
…d.js
  • Loading branch information
Hazi7 committed Jan 19, 2025
1 parent 90173f1 commit 38c2f51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion examples/record/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ const writable = new WritableStream({
},
});

const flvMuxer = new MyBundle.FlvStreamer(writable);
const flvMuxer = new MyBundle.FlvStreamer(writable, {
video: 1920,
videocodecid: 7,
framerate: 30,
audio: true,
audiocodecid: 10,
});

const videoEncoder = new VideoEncoder({
output: (chunk, metadata) => {
Expand Down
3 changes: 1 addition & 2 deletions src/core/flv-streamer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import console, { error } from "console";
import { SoundFormat } from "../constants/audio-type";
import { CodeId } from "../constants/video-type";
import { FlvWriter } from "./flv-writer";
Expand All @@ -10,7 +9,7 @@ export interface MuxerOptions {
framerate: number;
audio: boolean;
audiocodecid: SoundFormat;
stereo: boolean;
stereo: boolean
}

/**
Expand Down

0 comments on commit 38c2f51

Please sign in to comment.