We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c60d9ff commit a337de7Copy full SHA for a337de7
src/utils/getLiveVideoInfo.ts
@@ -37,8 +37,12 @@ export const getLiveVideoInfo = async (
37
if (videoMeta) videoInfo = getVideoInfoByVideoMeta(videoMeta);
38
}
39
40
+ // A VOD is published about 5-20 seconds after a stream starts
41
+ // Wait at least 30 seconds before trying to recover the playlist
42
+ const checkPrivateVod = startTimestampMs + 30_000 < Date.now();
43
+
44
// private VOD
- if (formats.length === 0) {
45
+ if (checkPrivateVod && formats.length === 0) {
46
console.warn('[live-from-start] Recovering the playlist');
47
const startTimestamp = startTimestampMs / 1000;
48
const vodPath = `${channelLogin}_${streamMeta.stream.id}_${startTimestamp}`;
0 commit comments