This commit is contained in:
Fredrik Burmester
2024-09-27 17:35:51 +02:00
parent 41d209f3b7
commit a46737442d
4 changed files with 63 additions and 30 deletions

View File

@@ -134,6 +134,7 @@ async function createLocalM3U8File(segments: Segment[], directoryPath: string) {
localM3U8Content += "#EXT-X-MEDIA-SEQUENCE:0\n";
segments.forEach((segment, index) => {
console.log(segment.path.split(".")[1]);
localM3U8Content += `#EXTINF:${segment.duration.toFixed(3)},\n`;
localM3U8Content += `${directoryPath}/${index}.ts\n`;
});