Search code examples
androidchromecast

Android: show chromcast media controller NOT in full screen


Per the chromcast android docs found here, an expanded media controller is actually provided by the api.

The issue is that I don't want a full screen controller. I'm looking to set the controller inside the smaller play window in portrait mode (like in youtube). Any clues on where I can find documentation on doing this?

Here's the image example from the docs:

enter image description here

Here's what I'm trying to accomplish:

enter image description here


Solution

  • The easiest would be to define your own activity, based on what you'd like it to look like, and set that in your CastMediaOptions, to be opened when needed. If you do that, you then need to implement the required functionality yourself but given the UIMediaController and ControlButtonsContainer, it shouldn't be too difficult to do that.