Fix rss URLs for mp4s

This commit is contained in:
Thomas Zarebczan 2022-05-19 17:54:53 -04:00
parent 9a247d3c9f
commit 07b9b2feed
No known key found for this signature in database
GPG key ID: 767B41E1BB7346F2

View file

@ -72,7 +72,7 @@ async function generateEnclosureForClaimContent(claim) {
switch (value.stream_type) {
case 'video':
return {
url: (await fetchStreamUrl(claim.name, claim.claim_id)) + (fileExt || '.mp4'),
url: (await fetchStreamUrl(claim.name, claim.claim_id).replace('/v4/', '/v3/')) + (fileExt || '.mp4'), // v3 = mp4 always, v4 may redirect to m3u8
type: (value.source && value.source.media_type) || 'video/mp4',
size: (value.source && value.source.size) || 0, // Per spec, 0 is a valid fallback.
};