Fix: Implement CastMediaRouteController to enable Google Cast functionality#3505
Open
OsirisLord wants to merge 1 commit into
Open
Fix: Implement CastMediaRouteController to enable Google Cast functionality#3505OsirisLord wants to merge 1 commit into
OsirisLord wants to merge 1 commit into
Conversation
|
You tested this, huh? It's a blob of base64. And the Java that does exist in the decoded blob: does it work? I wouldn't hold my breath. It takes .1 seconds of looking at the diff to be like "wait... this doesn't look right." Probably slop. |
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.
Summary
This PR fixes Google Cast (Chromecast) functionality in microG by implementing the previously stubbed
CastMediaRouteControllermethods. The cast button has been showing discovered devices, but selecting a device did nothing becauseonSelect(),onControlRequest(),onRelease(), and other methods were empty stubs.Changes
CastMediaRouteController.java- All methods implemented:onSelect(): Connects to the Chromecast device via TCP/TLS using the existingsu.litvak.chromecastlibrary (which handles the TLS certificate exchange and pairing internally). Queries device status after connection.onControlRequest(): DispatchesMediaControlIntentactions to specific handlers:ACTION_START_SESSION: Launches the requested Cast receiver app (or defaultCC1AD845)ACTION_PLAY: Loads media by URL/mime type on the receiverACTION_PAUSE/ACTION_RESUME: Pauses/resumes playbackACTION_SEEK: Seeks to a specified positionACTION_STOP: Stops current mediaACTION_GET_STATUS/ACTION_SYNC_STATUS: Queries device and session statusACTION_END_SESSION: Stops the running sessiononRelease()/onUnselect(): Cleanly disconnects from the deviceonSetVolume()/onUpdateVolume(): Forwards volume changes to the deviceAsyncTaskto avoid blocking the UI threadScope
This is strictly scoped to the Cast v1 MediaRouteProvider → RouteController pathway. It does not include:
CastDeviceControllerImplorCastDeviceControllerService(Binder pathway was already functional)Testing
Manual testing is required on a device running microG:
GmsCastRouteControllertagsFixes #580