vimeo: use playlists directly instead of using master playlist

This commit is contained in:
dumbmoron 2024-05-28 08:52:26 +00:00
parent eeec0837f7
commit 115152eb27
No known key found for this signature in database

View File

@ -89,11 +89,14 @@ export default async function(obj) {
bestVideo = masterJSON_Video.find(i => resolutionMatch[i.width] === quality) bestVideo = masterJSON_Video.find(i => resolutionMatch[i.width] === quality)
} }
let masterM3U8 = `${masterJSONURL.split("/sep/")[0]}/sep/video/${bestVideo.id}/master.m3u8`; const playlistTemplate = `${masterJSONURL.split("/sep/")[0]}/sep/{type}/${bestVideo.id}/playlist.m3u8`;
const fallbackResolution = bestVideo.height > bestVideo.width ? bestVideo.width : bestVideo.height; const fallbackResolution = bestVideo.height > bestVideo.width ? bestVideo.width : bestVideo.height;
return { return {
urls: masterM3U8, urls: [
playlistTemplate.replace('{type}', 'video'),
playlistTemplate.replace('{type}', 'audio')
],
isM3U8: true, isM3U8: true,
fileMetadata: fileMetadata, fileMetadata: fileMetadata,
filenameAttributes: { filenameAttributes: {