user1026605
user1026605

Reputation: 1430

How to use a Drive hosted css to customize the receiver?

I have published an android Chromecast app. My receiver app is using the default receiver. Now I'm trying to customize the receiver using a css. I followed the developper guide (https://developers.google.com/cast/docs/styled_receiver) and I tried to host this css file on my drive account as it's explained here https://support.google.com/drive/answer/2881970?hl=en But something must be wrong because after having updated my receiver app with the CSS url and restarted my chromecast I don't see any modification. I guess the way I shared the drive hosted css file must be wrong.

Here's my css :

.logo {
  background-image: url(logo.png);
}

.progressBar {
  background-color: rgb(244, 132, 45);
}

.watermark {
  background-image: url(watermark.png);
  background-size: 57px 57px;
}

both images have also been shared publicly. BTW looking at Google documentation, it looks like there should be a preview button in the chromecast console, but I don't see it.

Any idea what's going on ?

Upvotes: 1

Views: 676

Answers (1)

user1026605
user1026605

Reputation: 1430

I finally got it to work. The default url when sharing the css file was

https://drive.google.com/file/d/XXXXXXXXXX/edit?usp=sharing

In fact I just needed to change it into

https://googledrive.com/host/XXXXXXXXXX

To make it work

Then in my css file I had to change both logo.png and watermark.png into absolute url, both hosted on drive in my case so i had to use their shared url (https://googledrive.com/host/yyy)

Upvotes: 4

Related Questions