Search code examples
androidgoogle-cast

How do I set the image for VideoCastControllerActivity


I am using the default VideoCastControllerActivity when I am casting. I call it via videoCastManager.startVideoCastControllerActivity(activity, mediaInfo, 0, true); however when the VideoCastControllerActivity is visible the image is not set.

How do I populate that image?

VideoCastControllerActivity without image


Solution

  • The MediaInfo that you build for your media needs to have two images; the first one (index=0) will be a smaller one that can be used in, say, MiniController or notification, and the second image (index=1) is a larger one for that page and also the lock-screen for more recent versions of Android.