cancel
Showing results for 
Search instead for 
Did you mean: 
Replies are disabled for this topic. Start a new one or visit our Help Center.

Android Chromecast Sender won't update title and images

braud94
Community Member

I've followed the instruction from https://developers.google.com/cast/docs/android_sender/integrate/about on how to cast media metadata to chromecast, the initial loading is fine, it will show the title, image and play the stream, but my problem is that I am streaming a live audio stream and need to update the metadata from time to time without having to buffer the audio again. This is a sample of my code: override fun loadMediaLoadRequestData(request: PlatformBridgeApis.MediaLoadRequestData?) { if (request == null) return val remoteMediaClient: RemoteMediaClient = remoteMediaClient ?: return val mediaLoadRequest = getMediaLoadRequestData(request) remoteMediaClient.load(mediaLoadRequest) } fun getMediaLoadRequestData(request: PlatformBridgeApis.MediaLoadRequestData): MediaLoadRequestData { val mediaInfo = getMediaInfo(request.mediaInfo) return MediaLoadRequestData.Builder() .setMediaInfo(mediaInfo) .setAutoplay(request.shouldAutoplay) .setCurrentTime(request.currentTime) .build() } fun getMediaInfo(mediaInfo: PlatformBridgeApis.MediaInfo?): MediaInfo? { if (mediaInfo == null) return null val streamType = getStreamType(mediaInfo.streamType) val metadata = getMediaMetadata(mediaInfo.mediaMetadata) val mediaTracks = mediaInfo.mediaTracks.map { getMediaTrack(it) } val customData = JSONObject(mediaInfo.customDataAsJson ?: "{}") return MediaInfo.Builder(mediaInfo.contentId) .setStreamType(streamType) .setContentType(mediaInfo.contentType) .setMetadata(metadata) .setMediaTracks(mediaTracks) .setStreamDuration(mediaInfo.streamDuration) .setCustomData(customData) .build() } Does anyone have any suggestion on how to modify loadMediaLoadRequestData in order to trigger the Chromecast receiver to update only the MediaMetadata and not have the stream buffer again

3 REPLIES 3

JenniferV
Community Specialist
Community Specialist

Hi braud94,

 

Thanks for reaching out. For developer concerns, I'd suggest you join the Google Developer Groups or Community for further help.

 

Thanks,

Jennifer

Jeran
Community Specialist
Community Specialist

Hey there braud94,

Did you have any more questions or need any additional help? 

Thank you,
Jeran
 

JenniferV
Community Specialist
Community Specialist

Hello braud94,

 

We haven't heard from you in a while so we’ll be locking this thread if there’s no update within 24 hours. If you still have other questions and concerns, please feel free to start a new thread and we'll be happy to help.

 

Thanks for the help, Jeran.


Thanks,

Jennifer