0

Similar to this question, my custom CSS styling for my Styled Media Receiver (SMR) doesn't get loaded on my Chromecast 2 device. Yet, the CSS is loaded and displayed correctly in the preview in the Cast SDK console.

I have saved the app in the console and waited for it so switch from "Publishing" to "Published". My Chromecast's serial number is also registered and shown in the console as "Ready for testing". I have double-checked that I'm using the correct App ID in my app. The Styled Media Receiver app just loads on the Chromecast device with the stock styling, i.e. it only shows my app's name.

The content of my very simple CSS file:

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

.background{
    background: rgb(6, 3, 46);
}

My CSS file is hosted on my website (hosted by InfinityFree), with a SSL certificate signed by Let's Encrypt Authority X3. I even left it overnight, but nothing. Yet, the Cast SDK Console loads and displays the CSS ok.

grolschie
  • 2,163
  • 2
  • 12
  • 29

2 Answers2

1

My workaround:

Upload the .css and image file to Google Drive - this already exists as a Cast SDK user. Share the files publicly. Generate direct links to the files using an online tool. Edit the .css file to use the direct link to the image file. Add the direct link to the .css file in the Cast SDK console. Success! Preview and re-save the SMR app in the Cast SDK console each time changes are made to the files.

grolschie
  • 2,163
  • 2
  • 12
  • 29
0

Fix your background height and width as you are adding the logo as a background.. better to add logo in html file instead of background image.

Taqi Raza Khan
  • 662
  • 6
  • 13
  • 1
    Thanks. It works if I upload the files to Google Drive instead of my own website. – grolschie Aug 24 '20 at 06:38
  • even its work if you upload on your own website with propper image path – Taqi Raza Khan Aug 24 '20 at 07:35
  • There must be something wrong with my web host. The first preview works and then the preview won't refresh in the console unless I rename the file on the webserver. Whereas when hosting on Google Drive, it refreshes instantly pretty much. Its like the first hit on the file hosted by my webhost does work and subsequent hits on the URL fail. – grolschie Aug 24 '20 at 19:25