@hyperframes/producer 0.4.35 → 0.4.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -109732,7 +109732,16 @@ async function resolveMediaDuration(src, mediaStart, baseDir, downloadDir, tagNa
109732
109732
  if (!existsSync15(filePath)) {
109733
109733
  return { duration: 0, resolvedPath: filePath };
109734
109734
  }
109735
- const metadata = tagName19 === "video" ? await extractMediaMetadata(filePath) : await extractAudioMetadata(filePath);
109735
+ let metadata;
109736
+ if (tagName19 === "video") {
109737
+ metadata = await extractMediaMetadata(filePath);
109738
+ } else {
109739
+ try {
109740
+ metadata = await extractAudioMetadata(filePath);
109741
+ } catch {
109742
+ return { duration: 0, resolvedPath: filePath };
109743
+ }
109744
+ }
109736
109745
  const fileDuration = metadata.durationSeconds;
109737
109746
  const effectiveDuration = fileDuration - mediaStart;
109738
109747
  const duration = effectiveDuration > 0 ? effectiveDuration : fileDuration;