MCPcopy Index your code
hub / github.com/callstack/agent-device / hasLikelyPlayableVideoContainer

Function hasLikelyPlayableVideoContainer

src/utils/video.ts:138–150  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

136}
137
138function hasLikelyPlayableVideoContainer(filePath: string): boolean {
139 try {
140 const stats = fs.statSync(filePath);
141 if (!stats.isFile() || stats.size <= 0) {
142 return false;
143 }
144 } catch {
145 return false;
146 }
147
148 const atoms = inspectTopLevelAtoms(filePath);
149 return atoms.includes('ftyp') && atoms.includes('moov');
150}
151
152function inspectTopLevelAtoms(filePath: string): string[] {
153 try {

Callers 1

isPlayableVideoFunction · 0.85

Calls 1

inspectTopLevelAtomsFunction · 0.85

Tested by

no test coverage detected