1
votes

After finding out that the Cordova plugin I use to work with Chromecast doesn't send the MediaInfo.Metadata I provide (see How to set/change album art?), I've decided to implement it myself. But this brings me to the following question:

Can I change the album art image after I loaded the media using RemoteMediaPlayer.load()?

The thing is that I'm using the chromecast to play a radio stream, so it would be nice if I could change the 'now playing' info without reloading the entire stream. I only want to set the title and image(s).

This is, of course, possible when I build my own Custom Receiver app but I hope that the default Styled Media Receiver already provides some method for this.

I think I would need to use sendMessage(), and the Chromecast Developer site does mention sending messages and images, but it only says that 'media messages' have a predefined namespace (urn:x-cast:com.google.cast.media) and then nothing. It says images have three properties (url, width, height) but not what the syntax of the message should be.

So can anyone help me with this?

1

1 Answers

1
votes

The styled or default receiver use the current media's metadata to show an album art, so you cannot change the album art without loading a new media.If you want to do that, you need to write your own custom receiver and use a custom namespace to send messages; since that will be a custom namespace, you can decide what the content for the textual payload should be; SDK doesn't enforce one vs the other.