(filePath: string)
| 136 | } |
| 137 | |
| 138 | function 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 | |
| 152 | function inspectTopLevelAtoms(filePath: string): string[] { |
| 153 | try { |
no test coverage detected