Allow legacy formats to be used even when dash and audio-only are unavailable #6977
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow legacy formats to be used even when dash and audio-only are unavailable
Pull Request Type
Description
Currently when FreeTube receives a SABR-only response from YouTube we get a
No valid URL to decipher
error from the local API and then try falling back to the Invidious API which will fail unless the user is running their own Invidious instance and has configured it in the FreeTube settings. As the legacy format 360p stream is still available in those responses, this pull request makes sure that it can still be used even when the URLs are missing for the DASH streams.While the goal is still to add SABR support to FreeTube, this allows people to still watch videos in the mean time, even if it is at a low quality.
Testing
You can replicate a SABR-only response by adding
info.streaming_data.adaptive_formats.forEach(f => { f.url = undefined })
just inside theif (info.streaming_data) {
line insrc/renderer/helpers/api/local.js
.Check that the legacy formats get selected automatically, you can't switch to DASH or audio-only and the downloads menu only lists the subtitles and the legacy format stream.
Desktop