MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / shouldUseVp9AlphaDecoder

Function shouldUseVp9AlphaDecoder

packages/cli/src/commands/snapshot.ts:390–399  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

388 }
389 const alphaDecoderCache = new Map<string, Promise<boolean>>();
390 const shouldUseVp9AlphaDecoder = (filePath: string): Promise<boolean> => {
391 if (!extractMediaMetadata) return Promise.resolve(false);
392 const cached = alphaDecoderCache.get(filePath);
393 if (cached) return cached;
394 const pending = extractMediaMetadata(filePath)
395 .then((meta) => meta.hasAlpha && meta.videoCodec === "vp9")
396 .catch(() => false);
397 alphaDecoderCache.set(filePath, pending);
398 return pending;
399 };
400
401 const hasPlayer = await page.evaluate(() => !!(window as any).__player);
402 if (!hasPlayer) {

Callers 1

captureSnapshotsFunction · 0.85

Calls 3

extractMediaMetadataFunction · 0.85
getMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected