Skip to content

Commit

Permalink
chore(docs): added timeout threshold option and example of no-media e…
Browse files Browse the repository at this point in the history
…vent (#32)
  • Loading branch information
birme authored Feb 18, 2023
1 parent 2c4ab95 commit cade849
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,20 @@ ICE_SERVERS=turn:<USERNAME>:<SECRET>@turn.eyevinn.technology:3478 npm run dev
await player.load(new URL(channelUrl));
player.unmute();

player.on("no-media", () => {
console.log("media timeout occured");
});
player.on("media-recovered", () => {
console.log("media recovered");
});

// Subscribe for RTC stats: `stats:${RTCStatsType}`
player.on("stats:inbound-rtp", (report) => {
if (report.kind === "video") {
console.log(report);
}
});

```

## Options
Expand All @@ -57,6 +65,7 @@ ICE_SERVERS=turn:<USERNAME>:<SECRET>@turn.eyevinn.technology:3478 npm run dev
adapterFactory: AdapterFactoryFunction; // provide a custom adapter factory when adapter type is "custom"
vmapUrl?: string; // url to endpoint to obtain VMAP XML (ads)
statsTypeFilter?: string; // regexp to match what RTC stats events will be emitted
timeoutThreshold?: number; // timeout in ms until no-media event is emitted (default 30000 ms)
}
```

Expand Down

0 comments on commit cade849

Please sign in to comment.