user3853858
user3853858

Reputation: 245

Chromecast Custom Receiver styling

I created a custom receiver for my Chromecast app to receive media. However, I want to add a background picture, watermark, logo etc before the media I am casting is loaded. That functionality is currently available in the Styled Media Receiver and according to this Google site (https://developers.google.com/cast/docs/styled_receiver) I can do that in the css field with .background and .logo etc.But I try to add that into my css portion of the custom receiver, nothing shows up, just skips to the media I am trying to stream from Sender app. What am I doing wrong? Can I not put those classes? I am already importing the following scripts:

<script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script>
<script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/mediaplayer/0.7.0/media_player.js"></script>

Upvotes: 0

Views: 1840

Answers (2)

Ali Naddaf
Ali Naddaf

Reputation: 19044

I am not sure I am following you. Did you create your own custom receiver or you are using the Styled receiver? If you are using your own, then you are in charge of all the styling yourself as any other web page that you can write, there is no styling done by google for your own custom receiver.

Upvotes: 0

Leon Nicholls
Leon Nicholls

Reputation: 4656

Those CSS classes are specific to the way the Styled Media Receiver works.

For you own custom receiver, you need to define the CSS styles you want to use. The Styled Media Receiver classes won't just work for you.

Take a look at this sample app on how to create a receiver that complies with the Google Cast Design Checklist: https://github.com/googlecast/Cast-Player-Sample

Upvotes: 1

Related Questions