Search code examples
google-castchromecastgoogle-chrome-app

chromecast on chrome packaged app


I would like to add the ability to cast my chrome packaged app to a google chromecast device. So far google states that all you have to do is add to your page and the API will inject itself. For me that doesn't happen. No code is injected.

Am I doing something wrong? There doesn't seem to be a demo showing this type of capability.

EDIT: I just wanted to clarify a bit. All that I would like to do is display my app to a screen. I have no media. I simply want to display it exactly as the chrome extension in the chrome browser would.Therefore I would follow the directions for a sender only. The app is packaged so it is running only CSS/JS/HTML5 code. The app is designed to run offline. Steps I've taken to cast: 1. I've added the extra bit to the HTML line: 2. I've followed the whitelisting, to the best of my understanding, by adding my "website address" to the chrome extension. So I've added the only two address that should matter. 127.0.0.1 192.168.1.106


Solution

  • There is a good chance Content Security Policy is blocking the implementation of the cast API being injected. I see that you've filed Issue 287254: Google cast (chromecast) ability for packaged apps, and suspect we will need to wait for it to be implemented in a packaged apps compliant way.