Displaying an image on Chromecast Custom Receiver

I have downloaded the sample custom receiver available here. It works well for audio and video, but I can't seem to cast images. I added a IMAGE Type to the 'sampleplayer.Type' enum and tried adding a tag in the html file of the player ( just like the one for video ), but every time I try to display an image I get 'Load metadata error: [object Object]'.

I tried making a custom skin receiver since images get displayed with that one, but I can't seem to find any differences between the player.js that I have and the one that is loaded with the custom skin.

Can anyone give me a hint as to what i must do in order to display an image? Does it have to be handled like a video? Or what?

Upvotes: 2

Views: 785

Answers (1)

Ali Naddaf
Ali Naddaf

Reputation: 19044

The receiver that you mentioned doesn't support images. You have an option of using the default receiver or styled receiver (which means you don't need to code anything on the receiver side) or if you prefer to have your own receiver, then you need to write your own custom receiver; you can look at our documentations and guides and the reference receiver to see how things are working; in your case, you need to add an image element to your DOM to show the image and wire that to the receiver SDK. It might be easier to use one of the two receivers that I had mentioned if you don't need any custom behavior.

Upvotes: 1

Related Questions