Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/studio-server/src/helpers/mediaCodecMap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ describe("BROWSER_HOSTILE_CODECS representative mimes", () => {
expect(typeof BROWSER_HOSTILE_CODECS[codecName]?.representativeMime).toBe("string");
});

it.each(["prores", "mpeg4", "mjpeg"])(
it.each(["prores", "mpeg4", "mjpeg", "mpeg2video", "dnxhd"])(
"has no representative mime for %s, which is never decodable",
(codecName) => {
expect(BROWSER_HOSTILE_CODECS[codecName]?.representativeMime).toBeNull();
Expand All @@ -244,7 +244,7 @@ describe("shouldPrewarmProxy", () => {
return { codecName, browserHostile: true, representativeMime: null, hasAlpha: false };
}

it.each(["hevc", "prores", "theora", "mpeg4", "mjpeg"])(
it.each(["hevc", "prores", "theora", "mpeg4", "mjpeg", "mpeg2video", "dnxhd"])(
"pre-warms %s, which has no cross-platform browser decode",
(codecName) => {
expect(shouldPrewarmProxy(facts(codecName))).toBe(true);
Expand Down
2 changes: 2 additions & 0 deletions packages/studio-server/src/helpers/mediaCodecMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export const BROWSER_HOSTILE_CODECS: Record<string, BrowserHostileCodec> = {
theora: { representativeMime: 'video/ogg; codecs="theora"', prewarm: true },
mpeg4: { representativeMime: null, prewarm: true },
mjpeg: { representativeMime: null, prewarm: true },
mpeg2video: { representativeMime: null, prewarm: true },
dnxhd: { representativeMime: null, prewarm: true },
// Every mainstream engine decodes AV1 and VP9, so canPlayType keeps the
// original and only the rare browser that cannot pays for a transcode.
av1: { representativeMime: 'video/mp4; codecs="av01.0.08M.08"', prewarm: false },
Expand Down
Loading