feat: add "Start mix" — radio-style infinite playback from any video#5791
Open
bluegate-studio wants to merge 5 commits into
Open
feat: add "Start mix" — radio-style infinite playback from any video#5791bluegate-studio wants to merge 5 commits into
bluegate-studio wants to merge 5 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds a "Start mix" feature that triggers YouTube's algorithmic radio (mix) from any video, via two entry points:
RD-prefixed playlist ID, and opens fresh playback.How it works
YouTube serves mix playlists when
playlistId = "RD" + videoIdwithplaylistIndex = 0andplaylistParams = null. This is the same mechanism the official app uses for "Start Radio".Context menu path
VideoMenuPresenter→PlaybackPresenter.startMix()— clones the video, sets mix playlist fields, opens viaPlaybackPresenter.openVideo().Player button path
PlayerUIController.onStartMixClicked()— mutates the currently playingVideoobject in-place, callsloadSuggestions()to fetch the mix chain. No playback restart — the current stream continues while suggestions load asynchronously.Changes
VideoMenuPresenter— new "Start mix" menu item with guardPlaybackPresenter—startMix()method (clone + open)PlayerUIController—onStartMixClicked()handler (mutate + reload)PlayerSettingsPresenter— toggle for the player buttonMainUIData—MENU_ITEM_START_MIXconstant + default menu orderPlayerTweaksData—PLAYER_BUTTON_START_MIXconstant, enabled by defaultStartMixAction— newTwoStateActionsubclassVideoPlayerGlue— wires the action into the toolbaraction_start_mix.png(192×192, white on transparent), string, IDNotes
TwoStateActioncasts toBitmapDrawable— vectors crash at runtime.