Skip to content

Commit

Permalink
export datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyoshiaki committed Nov 18, 2023
1 parent 289f32d commit 71c1381
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/rtp/src/container/mp4/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as MP4 from "./mp4box";
type DecoderConfig = AudioDecoderConfig | VideoDecoderConfig;
type EncodedChunk = EncodedAudioChunk | EncodedVideoChunk;

export type DataType = "init" | "delta" | "key";

export class Mp4Container {
#mp4: MP4.ISOFile;
#audioFrame?: EncodedAudioChunk | EncodedVideoChunk;
Expand All @@ -16,7 +18,7 @@ export class Mp4Container {
onData = new Event<
[
{
type: "init" | "delta" | "key";
type: DataType;
timestamp: number;
duration: number;
data: Uint8Array;
Expand Down
3 changes: 2 additions & 1 deletion packages/rtp/src/processor/mp4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Event from "rx.mini";
import {
annexb2avcc,
buffer2ArrayBuffer,
DataType,
Mp4Container,
Mp4SupportedCodec,
OpusRtpPayload,
Expand All @@ -20,7 +21,7 @@ export type Mp4Input = {
};

export interface Mp4Output {
type: string;
type: DataType;
timestamp: number;
duration: number;
data: Uint8Array;
Expand Down

0 comments on commit 71c1381

Please sign in to comment.