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

Is this a hack? #7

Open
VanCoding opened this issue Sep 11, 2018 · 4 comments
Open

Is this a hack? #7

VanCoding opened this issue Sep 11, 2018 · 4 comments

Comments

@VanCoding
Copy link

VanCoding commented Sep 11, 2018

I've been waiting very long for something like this to happen, but I always thought it was not possible to create a custom chromecast receiver and that Google locked down the API to prevent people from creating competing products.

I also thought that's why PiCAST does not act like a real chromecast, or why cheapcast had to stop.

But you did it, which leads me to the question: Is this a hack? Or was the API never locked down as I assumed?

Another question that comes to mind is: Why does it not automatically support all apps that chromecast supports, or, why do you have to support each app on its own? Isn't chromecast just a platform where apps can run their "receiver app" on? Or does google have to update their chromecast devices for every new app it supports?

I'd really like to find out more about how all of this works and what's the current situation. Do you mind to give me a short enlightenment on this?

If not, big big thanks to you anyway, as this is a huge step towards an open chromecast platform :)

@vbaicu
Copy link
Owner

vbaicu commented Sep 17, 2018

Hi Patrik,
Long story short, yes it is a hack. It's based on chromecast v1 protocol reverse engineering close to youtube app.
The way chromecast loads applications is very basic, it just loads a webpage either from internet or hosted on the connected phone. The case with youtube was a webpage that communicates on websockets with the chromecast to pair with the device, It's called youtube tv and is present on playstation, smartTvs, etc. From the chromecast protocol I took only the parts used to be discoverable than when youtube initiated the connections, just loaded the youtube tv app.
With spotify for example I had issues to to the app expecting a chromecast v2 enabled device.
PiCast is just a simple app that tries to copy chromecast but not to be compatible with the protocol.
There are a lot of things that can be done to improve this and make it work with v2 also. Unfortunately I don't have the time to continue now. I'll probably add more things as time passes and I have another free evening like the one that resulted in this project.

@VanCoding
Copy link
Author

Ok, thanks :)

So, if I understand it correctly, if mMusicCast would advertise itself as a chromecast v2 device, it would show up in every app that supports chromecast (including netflix, google music, spotify etc), and the reason why it currently does not is because it currently advertises as v1, and the mentioned apps need v2, right?

If yes, this leads to the question, if an application that advertises itself as a chromecast v2 device can even be created, or if google locked down the api with v2 and you need a key or something to act as such a device.

@VanCoding
Copy link
Author

According to https://github.com/thibauts/node-castv2, it's not possible to act as a chromecast v2 device, because it would require googles private key.

@hgghyxo
Copy link

hgghyxo commented Jan 24, 2019

Actually it's pretty nice even just for Spotify alone. I wasn't able to have youtube work, but that's not a problem.
My main goal would be to have something similar as a chromecast audio installed on my PI, connect to Google Home, and add it to my multiroom spotify speaker list.

Was not able to do it, but after seeing spotify accepts and plays music on it, after all that failures with different software and methods, it was kinda relief, thanks @vbaicu for the hope ;)

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