Skip to content

Commit

Permalink
Update janus.d.ts (#3255)
Browse files Browse the repository at this point in the history
janus.d.ts: add missing RemoteTrackMetadata parameter and definition

Co-authored-by: Fabian Bernhard <[email protected]>
  • Loading branch information
veeting and fbernhard committed Aug 9, 2023
1 parent 70c2383 commit fd153e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion npm/janus.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ declare namespace JanusJS {
error?: (error: string) => void;
}

interface RemoteTrackMetadata {
reason: "created" | "ended" | "mute" | "unmute";
}

enum MessageType {
Recording = 'recording',
Starting = 'starting',
Expand Down Expand Up @@ -152,7 +156,7 @@ declare namespace JanusJS {
slowLink?: (uplink: boolean, lost: number, mid: string) => void;
onmessage?: (message: Message, jsep?: JSEP) => void;
onlocaltrack?: (track: MediaStreamTrack, on: boolean) => void;
onremotetrack?: (track: MediaStreamTrack, mid: string, on: boolean) => void;
onremotetrack?: (track: MediaStreamTrack, mid: string, on: boolean, metadata?: RemoteTrackMetadata) => void;
ondataopen?: Function;
ondata?: Function;
oncleanup?: Function;
Expand Down

0 comments on commit fd153e3

Please sign in to comment.