@hyperframes/producer 0.4.34 → 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.
- package/dist/index.js +10 -1
- package/dist/index.js.map +2 -2
- package/dist/public-server.js +10 -1
- package/dist/public-server.js.map +2 -2
- package/dist/services/htmlCompiler.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/public-server.js
CHANGED
|
@@ -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
|
-
|
|
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;
|