mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
fix(studio-server): MPEG-2 and DNxHD videos get a playable preview copy (#7348)
This commit is contained in:
@@ -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();
|
||||
@@ -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);
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user