borellini
borellini

Reputation: 422

How to successfully inject the Chromecast library to a Chromecast sender Chrome app?

I've been trying to create an application as trivial as possible for trying out possibilities of Chromecast. I decided to use Chrome as platform for my sender app. However I got into trouble immediately.

I followed Google's tutorials on whitelisting a Chrome app and creating a sender app for Chrome (https://developers.google.com/cast/whitelisting, https://developers.google.com/cast/chrome_sender).

  1. I am running latest stable Google Chrome on Linux (I tried Mac, too) with the latest Google Cast extension
  2. I have developer mode enabled in Chrome
  3. I have specified multiple URIs as additional domains in Google Cast extension: the extension URI beginning with chrome-extension, file URI, http://localhost/ and http://192.168.0.x/, all of which have contained the Chrome app / webpage at the time.
  4. My sender app has data-cast-api-enabled attribute set (<html data-cast-api-enabled="true"></html>)

So, I think I am doing exactly what tutorials are telling me to do. However, I will not get cast defined in Javascript console, and nothing is logged there either.

Has someone succeeded in getting the sender API to their Chrome app or website?

Upvotes: 2

Views: 1164

Answers (2)

Jason Nelson
Jason Nelson

Reputation: 454

I had this problem as well. What I found out was that when I copy-pasted the html tag from their example, it contained the wrong kind of double-quotes around "true"... they were high-ansi double quotes.

Upvotes: 4

Ali Naddaf
Ali Naddaf

Reputation: 19034

The whitelisting of the web apps should be just the domain, without any "http://" or "https://" at the beginning or any path at the end, so please try to whitelist just "localhost" (if you can access your app on your domain via localhost), for example. Although it was not explicitly mentioned in your post, I presume you have already whitelisted your device, and had checked the box "Send serial number to Google" during the set up (and have power-cycled your dongle afterward), correct?

Upvotes: 0

Related Questions