From 763cb64ba7cdf77566a01df1ec04efb07564735e Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Fri, 21 Apr 2023 12:47:57 -0400 Subject: [PATCH] Revert to using DASH (#71) --- CHANGELOG.md | 1 + .../src/components/VideoPlayer/VideoPlayer.bs | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36f5dc00..cbe38707 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - A crash where the metadata of a video is not validated [#57](https://github.com/iBicha/playlet/issues/57) - A crash where the video details in home screen are null [#56](https://github.com/iBicha/playlet/issues/56) - A crash where the video details are not returned in json [#63](https://github.com/iBicha/playlet/issues/63) +- Revert to using DASH instead of 720p by default ## [0.8.0] - 2023-03-02 ### Added diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index 1e77ae93..94878ebc 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -117,14 +117,6 @@ function OnVideoDetailsTaskResults(output as object) as void end if playletStreamUrls.push(hlsUrlLocal) else - if metadata.formatStreams.Count() > 0 - stream = metadata.formatStreams[metadata.formatStreams.Count() - 1] - itag = stream.itag - - playletStreamUrls.push(Invidious.GetVideoUrl(videoId, itag, false)) - playletStreamUrls.push(Invidious.GetVideoUrl(videoId, itag, true)) - end if - if metadata.dashUrl <> invalid #if DASH_THUMBNAILS @@ -143,6 +135,13 @@ function OnVideoDetailsTaskResults(output as object) as void playletStreamUrls.push(dashUrlLocal) end if + if metadata.formatStreams.Count() > 0 + stream = metadata.formatStreams[metadata.formatStreams.Count() - 1] + itag = stream.itag + + playletStreamUrls.push(Invidious.GetVideoUrl(videoId, itag, false)) + playletStreamUrls.push(Invidious.GetVideoUrl(videoId, itag, true)) + end if end if metadata.playletStreamUrls = playletStreamUrls