MayaPosch / NymphCast

Audio and video casting system with support for custom applications.
http://nyanko.ws/nymphcast.php
BSD 3-Clause "New" or "Revised" License
2.41k stars 81 forks source link

Add Android TV support on the server side #22

Open torshie opened 4 years ago

torshie commented 4 years ago

With Android TV support on the server side, we can enjoy all the goodies of NymphCast without the burden (cable hazard, space, money ) of an extra device.

MayaPosch commented 4 years ago

What do you mean exactly with 'Android TV support' in this context? Have the NymphCast server implemented as an Android TV app?

torshie commented 4 years ago

@MayaPosch Yes. I'm not sure whether it's possible to do that, considering all those restrictions on Android TV.

MayaPosch commented 4 years ago

A quick look shows that SDL2 is supported on Android, as is ffmpeg. This might be a realistic proposition :)

I guess it would be nice to have a local GUI for NymphCast-on-Android-TV as well. This is something that might be generally useful, even outside of Android TV. A more Roku-like experience, basically.

It appears that Android TV apps are standard Android apps, looking at the documentation. This should mean that one can test it on any Android device before deploying it on an Android TV device, if I'm not mistaken.

torshie commented 4 years ago

Yes, Android TV apps are standard Android apps, in fact you can install and run many Android apks directly on an Android TV, e.g. a browser app. However TV apps are usually controlled with a remote, while phone apps are controlled with a touch screen, so the UI part may need some work.

MayaPosch commented 4 years ago

To implement Android TV support, it appears that the easiest way might be to create a NymphCast client app that communicates with an (unmodified) NymphCast Server instance that runs as a background service. Because the client app would launch the background service, this would prevent the service from being killed by the OS.

Exact implementation details and maybe other options need some more brainstorming on, I think.

fransvanberckel commented 4 years ago

I searched for, how this is done by Chromecast receiver v2 / Chromecast built-in, on Android TV. They are using com.google.cast.* and com.google.android.apps.mediashell. These are libraries as a background services. Got to be always running. It's well documented, now ...

https://github.com/thibauts/node-castv2 https://github.com/topics/chromecast-receiver https://developers.google.com/cast/docs/caf_receiver/ https://support.google.com/chromecastbuiltin/answer/6121012 (latest 173230)