Closed cru8602 closed 3 years ago
It looks like it supports media CONTROL commands, but it also looks like they probably implement their own LOAD commands (most apps do this for authentication purposes, and because they usually control both the chromecast app, AND the application that's sending the cast... ergo its rare to find documented specifications on these). I'm not inclined to implement this for you (there are THOUSANDS of apps, I can't support all of them), but I WILL accept a PR if you get it working.
What that would take:
I can't find any obvious examples to point you at, but it LOOKS LIKE there are "namespaces" for TuneIn like "urn:x-cast:com.tunein.cast.init" and "urn:x-cast:com.tunein.cast.initUrl", one of which you'd have to make a TuneIn controller LOAD would use. Unfortunately though, I have no idea what the format for that load command would be.
OK, I guess I'll have a lot of research to do. Unfortunately my programming skills are only slightly above noob so this may take some time witch is more worse for me than for you, but I'll do my very best.
CONTROL TuneIn error
While playing a TuneIn radio station a PAUSE command will not pause the playback because the node rejects: "
Node output:
What could be wrong? Other commands like volume will work fine.
Also tried to pause form other apps like Google Home app and they will pause (and play) the stream correct.
TuneIn is not an actually supported app for this node (yet, if OP comes through on changes 😄). The underlying library (castv2-client) ties my hands a bit here, and while I'd LIKE to be able to control any supported "channel" (Namespaces in the above response), I'm limited to controlling any supported APP (which controls various channels) instead. Media controls being the obvious "globally supported" one we'd all like. I kicked the idea of a "generic receiver" at one point, but ran into trouble somewhere that I forget which was an issue with the underlying implementation that I couldn't get around.
There IS an underlying library UNDER that (castv2) which has more direct control of the "channels" themselves, but that's basically a complete overhaul of this node and all of its existing assumptions / functionality to get there... that's not completely out of the question one day when I'm bored and have nothing else going on because (a) I would like that "generic media control" capability too, and (b) I've already replaced about half of the classes in the castv2-client library anyway due to outstanding bugs and memory leaks, so I'm literally about 50% there to writing my own client class anyway and abandoning that.
But its also fairly non-trivial and basically a THIRD rewrite of this node to get there.
Edit: Also the command that DID work, volume, is a "platform" command that doesn't go to the "app client", but to the cast device itself. i.e., as long as you have a connection, those will work, but "media commands" require an active application client to run.
Hi All! I have added a pull request for a TuneIn receiver/adapter for simple media playback control.
Looks ok. Pushed 3.2.8 out. See if thats working ok for you, and feel free to close out when satisfied.
Hi i8beef, 3.2.8 works for me, thanks!!
Works great! Thanks a lot cromatox & i8beef.
I have not tried the new verison yet but does "media control only" mean, that I can only pauss a runing stream and resume the playback later or can I also start a new stream on an idle google home/chromecast device? how would a propper input to the node looke like?
I have not tried the new verison yet but does "media control only" mean, that I can only pauss a runing stream and resume the playback later or can I also start a new stream on an idle google home/chromecast device? how would a propper input to the node looke like?
Media control only means that the media commands GET_STATUS, PLAY, STOP, PAUSE, SEEK works with TuneIn Radio started by voice, mobile app or any other application through Chromecast. You can not start a TuneIn radio stream, but you can use the Default Media Receiver with the radio stream URL directly (see README).
you guys are good! (thanks a lot) could you elaborate on how to structure msg-in payload?
For media commands? Just like all the rest in the documentation. Once the node is connected to the app running on the device, the generic media commands are basically the same no matter which (supported) receiver is running.
Note I just released 4.0.0 which SHOULD support generic media controls on ANY receiver now that claims to support it automatically... that means I killed the specific TuneIn controller, etc. for now as the only part that gave us was the media control anyway...
If someone pursues the media load commands, etc. for TuneIn, those files are in the history at least to point to still as a basic implementation to be expanded on (so not wasted effort).
Closing as stale.
Hey, would it be possible to add TuneIn to the supported apps in order to start a Radio playback? Till now I just send the URL of the webradio I wanted to listen to to the google home, but since I have upgraded my setup with a google nest hub the default media player is blocking the screen while the radio is playing witch isn't what I want to see. Also the default media player stops playback when it's not in foregraund unlike the TuneIn app (or others like spotify). So a TuneIn integration would be realy greate a this point!