DASH support

This commit is contained in:
Brahim Hadriche committed 2022-11-22 15:55:46 -05:00
1 parent adfcfabad1
commit b113fcfe7e
3 files changed
+23 -19

No files matched your search

+1 -12
View File
@@ -75,18 +75,7 @@ namespace Invidious
' TODO: handle 500 {"error":"This video is unavailable"}
if response.statuscode = 200
videoMetadata = response.json
lastItag = videoMetadata.formatStreams[videoMetadata.formatStreams.Count() - 1].itag
' GetVideoUrl returns a url that redirects to the video stream
' TODO: is this reliable?
videoUrl = Invidious.GetVideoUrl(videoId, lastItag, false)
videoMetadata.formatStreams.push({
itag: lastItag,
url: videoUrl
})
return videoMetadata
return response.json
end if
return invalid
end function