Use /ipfs-ts/ path for HLS segments to get correct MIME type
This commit is contained in:
@@ -399,7 +399,9 @@ class GPUHLSOutput:
|
|||||||
for seg_num in sorted(self.segment_cids.keys()):
|
for seg_num in sorted(self.segment_cids.keys()):
|
||||||
cid = self.segment_cids[seg_num]
|
cid = self.segment_cids[seg_num]
|
||||||
lines.append(f"#EXTINF:{self.segment_duration:.3f},")
|
lines.append(f"#EXTINF:{self.segment_duration:.3f},")
|
||||||
lines.append(f"{self.ipfs_gateway}/{cid}")
|
# Use /ipfs-ts/ path for segments to get correct MIME type (video/mp2t)
|
||||||
|
segment_gateway = self.ipfs_gateway.replace("/ipfs", "/ipfs-ts")
|
||||||
|
lines.append(f"{segment_gateway}/{cid}")
|
||||||
|
|
||||||
playlist_content = "\n".join(lines) + "\n"
|
playlist_content = "\n".join(lines) + "\n"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user