philippe44 / AirConnect

Use AirPlay to stream to UPnP/Sonos & Chromecast devices
Other
3.46k stars 217 forks source link

Chromecast to AirPlay #92

Closed eugenet8k closed 6 years ago

eugenet8k commented 6 years ago

Hi, this is rather an open question than a bug or issue in the existing code.

I noticed that this module says:

AirCast: Chromecast to AirPlay

where the product description rather goes in the opposite:

"Use these applications to add AirPlay capabilities to Chromecast and UPnP (like Sonos) players."

It seems AirConnect solves the problem of being able to stream through AirPlay (from an Apple device) to a Chromecast speaker. Although I am looking for a solution that does an opposite, allows to stream using Chromecast protocol to an AirPlay speaker. So seeing that intriguing code comment I wonder if your guys software is actually capable of doing that?

Overall I am trying to get a multi-room audio and having both Apple and Google casting system at home I am quite fascinated by how they both do NOT support the essential goal: of having your TV speakers in a multi-room setting.

1) Apple: You can add Apple TV into a multi-room set but you can't add there your speakers hooked to AirPort Express (it doesn't have AirPlay 2 support)...

2) Google: You can add any of your speakers hooked to Chromecast Audio or Google Home speakers into a multi-room set, but you can't add there your Chromecast TV...

There are few working ways of streaming AirPlay to Chromecast (yours and https://github.com/ains/aircast, maybe other), but it doesn't solve the multi-room problem until it supports AirPlay 2.

This is why I thought to try another way around to use the Google Chromecast multi-room feature, but for that I need a missing link, the system that will stream Chromecast signal to an AirPlay device (it will be Apple TV in my case). That will get me multi-room.

philippe44 commented 6 years ago

Unfortunately, mimic-ing a CC device is quasi-impossible.

Without entering into too much details, CC devices requires a sort of "receiver app" (JS/HTML5) to be loaded & executed from inside. There is a default receiver that is provided by Google which is what I load and then the network protocol to communicate with it is well documented. The loading is fully controlled by Google and the receiver must be signed.

But content-owners have their own proprietary receivers that (e.g.) check your credentials before accepting to play on the receiver (think Netflix). Again, loading of such receivers is a Google-controlled action.

So that's why you can't emulate a CC device as 1/ you need to replicate the runtime environment and 2/ it would not be recognized by GOogle as a valid device to load receivers. They only thing you could do is emulating a "default receiver" a the network protocol level but because you don't know what the control application will require as a receiver (and most of them will require their own receivers), then it's going to work in so few cases that I don't even want to try

philippe44 commented 6 years ago

Closing for inactivity

shiredude95 commented 5 years ago

Is this possible if we manage to get the app_id and the url link of the receiver applications (or atleast the ones we want to talk to)?