mimeForCodec function
Last updated: 2026-03-05T10:53:28.864Z
Metrics
LOC: 10
Complexity: 3
Params: 1
Signature
mimeForCodec(codec: "vp8" | "vp9"): : string
Source Code
function mimeForCodec(codec: "vp8" | "vp9"): string {
const candidate = `video/webm;codecs=${codec}`;
if (
typeof MediaRecorder !== "undefined" &&
MediaRecorder.isTypeSupported(candidate)
) {
return candidate;
}
return "video/webm";
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| start | calls |
| startWithStreamId | calls |