Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support launching Chromecast SDK 2.0 apps. #13

Open
matbee-eth opened this issue Apr 1, 2014 · 10 comments
Open

Support launching Chromecast SDK 2.0 apps. #13

matbee-eth opened this issue Apr 1, 2014 · 10 comments

Comments

@matbee-eth
Copy link

I can't see this documented, how would we launch an app on the Chromecast w/ the new SDK?

@yocontra
Copy link
Owner

yocontra commented Apr 1, 2014

@acidhax Got link to a docs for the new SDK? I haven't heard about it

@matbee-eth
Copy link
Author

https://developers.google.com/cast/docs/chrome_sender
var sessionRequest = new chrome.cast.SessionRequest(chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID); // Here I would put my App ID

@vincentbernat
Copy link

Looking at the Tic Tac Toe example, I see that the application is able to launch on the ChromeCast without using port 8008. Everything seems to happen on port 8009. Using the ID (BFEBD3F1) instead of the name leads to 404.

Moreover, when the application is running, querying /apps/ gives a 204 instead of a 200 (and hence no content).

@vincentbernat
Copy link

It seems that Google changed the protocol with its 2.0 SDK: https://plus.google.com/+SebastianMauer/posts/83hTniKEDwN

@vincentbernat
Copy link

After digging a bit around, I didn't find any documentation about this new protocol. Here is what I discovered so far:

  1. The protocol is wrapped into TLSv1.1.
  2. The protocol is protobuf based. The definition can be found in Chromium source code in browser/extensions/api/cast_channel/cast_channel.proto
  3. It starts with an auth challenge. Hopefully for us, the auth challenge is here to authenticate the device, not us.
  4. Messages are then JSON message and the protocol can be observed by simply using the Chrome client and looking for debug messages in the developer tools.

@vincentbernat
Copy link

I have made some progress and put an experimental implementation in https://github.com/vincentbernat/nodecastor. This code only handles mDNS and the protobuf protocol. I don't intend to implement SSDP/DIAL. I would welcome an integration in nodecast.

@matbee-eth
Copy link
Author

Good to hear! I'll check it out :)

@yocontra
Copy link
Owner

yocontra commented Aug 6, 2018

@vincentbernat Does your library still work with the latest chromecasts? I'll replace our chromecast handling with your stuff if so.

@vincentbernat
Copy link

I can't say, I don't have any chromecast anymore. Nobody told me otherwise.

@yocontra
Copy link
Owner

yocontra commented Aug 6, 2018

@vincentbernat Cool, will give it a shot then - thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants