Skip to content

fix(playback): preserve signed-in TV audio streams on slow connections - #60

Open
LuoH-AN wants to merge 5 commits into
maxrave-dev:multiplatformfrom
LuoH-AN:fix/youtube-authenticated-playback
Open

LuoH-AN wants to merge 5 commits into
maxrave-dev:multiplatformfrom
LuoH-AN:fix/youtube-authenticated-playback

Conversation

@LuoH-AN

@LuoH-AN LuoH-AN commented Nov 15, 2026 •

Copy link
Copy Markdown

Signed-in SimpMusic users on a VPN exit challenged by YouTube can fail to play tracks: anonymous extraction is rejected with LOGIN_REQUIRED, and later attempts can obtain audio URLs that return HTTP 403. The app reports these failures as ERROR_CODE_IO_UNSPECIFIED.

Use PipePipe's authenticated tv_samsung client when a login cookie is present, restoring visionos on logout. PipePipe scans the supplementary WEB_REMIX response before the configured player's streams and keeps the first similar format; restrict that supplementary response to Premium audio itags 141/774 so ordinary web formats cannot replace the TV audio URLs.

Accept audio-only extraction results and validate a standard audio stream with a one-byte range GET instead of randomly checking audio or video URLs. Remove the second random HEAD check after mapping the streams. Preserve decoder fallback for definitive URL rejection, while allowing the player to attempt playback after an inconclusive network check. Raise PipePipe's five-second extraction deadline and downloader timeouts to 30 seconds for slower routes. Add diagnostics without logging full media URLs or cookies.

Follow-up recovery from the reporter's latest Release log: PipePipe can stop at Could not get name before extracting audio, and a single TV audio rendition can return HTTP 403 while Brave falls back anonymously and receives LOGIN_REQUIRED. Fetch audio streams directly without requiring StreamInfo metadata (the app already has metadata from its WEB_REMIX response). If an audio rendition is definitively rejected, try the remaining supported audio renditions before changing decoder tiers; when recovering this way, retain only the accepted audio rendition so downstream format selection cannot pick a rejected or unverified alternative. Preserve Brave fallback login using the saved cookie and origin-bound SAPISIDHASH, restricted to the exact HTTPS YouTube hosts even across redirects. Set Brave connection/read timeouts to 30 seconds as well.

When the preferred Premium format and its codec twin are both absent, select available audio before the generic format fallback; this prevents a recovered lower-quality audio stream from being replaced by a video-only URL.

Related reports: maxrave-dev/SimpMusic#2889 and maxrave-dev/SimpMusic#2861.

Validation:

  • Android Full Release APK (R8 and resource shrinking enabled) built and passed APK signature verification in GitHub Actions. The package and certificate match the final debug candidate, so it can update in place. The fork-only packaging configuration recognizes its own retained package/certificate at startup; this core PR does not alter upstream official-build checks. The reporter tested the Release APK and confirmed many tracks play; a later log identified remaining per-track extraction failures, addressed by the follow-up changes below. The new r4 candidate still needs on-device playback validation.
  • Android Full debug APK built successfully in GitHub Actions.
  • The reporter installed the final debug candidate and confirmed playback works with their existing VPN setup. Their routing records show the YouTube API and media hosts using the same proxy node.
  • Desktop behavior and logout have not been tested; no automated test suite was run.

After merging, SimpMusic needs to update its core submodule pin to include these commits.

Companion app PR: maxrave-dev/SimpMusic#2891 updates the core pin and completes Chinese localization in the app repository. Translation-process acceptance and human source review remain pending; the localization files are outside this core repository.

The companion Android Full Release APK with Chinese localization also built successfully in GitHub Actions, using the same core commit as this PR.

Release r4 built successfully in GitHub Actions, including the final audio-quality fallback change. CI verified the retained APK signature, package name and non-debuggable status. The downloaded APK passed ZIP integrity checks, and both packaged Chinese resource assets match the reporter-approved r3 exactly. The new playback changes still need on-device validation with the previously failing tracks. The original log and login credentials are not attached to this PR.

@LuoH-AN LuoH-AN changed the title fix(playback): send the login session when extracting signed-in streams fix(playback): preserve signed-in TV audio streams on slow connections Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant