mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 19:28:29 +00:00
vimeo: use playlists directly instead of using master playlist
This commit is contained in:
parent
eeec0837f7
commit
115152eb27
@ -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: {
|
||||||
|
Loading…
Reference in New Issue
Block a user