Showing posts with label title. Show all posts
Showing posts with label title. Show all posts

Saturday, 2 July 2016

How can I get a string title, artist for what my Chromecast is playing?



Hello everyone!

I like to work with LED signs and other fun display technologies and as much as I love my chromecast audio, sadly it has no way of displaying what it is currently playing. Now I know that this information must be somewhat publicly available because the Chromecast app for android can show me what content is playing from Spotify, even if the session is initiated by another client as you can see here:

(Well I can't post images because I'm a new user, use your imagination to see that I can start playing something from Spotify on another device and I'm still able to get cover art, title and artist name here in this native android chromecast app)

Anyway, I'm having trouble devising a way to fetch this information from the Chromecast, I'd really love to send it to some digital signage so I can keep tabs on what's playing, even if that's just say - a raspberry pi with an old VFD attached. So far I was able to use the node chromecast-cli to grab some rudimentary information from the device when it's playing stuff from Spotify. Here's what I get:


Code:


Komputer$ node chromecast-cli.js --host [IPaddress] status
{ applications:
  [ { appId: 'CC32E753',
      displayName: 'Spotify',
      isIdleScreen: false,
      namespaces: [Object],
      sessionId: 'C6A14255-0DE0-44DE-9A06-BC9D07D33A53',
      statusText: 'Spotify',
      transportId: 'web-3' } ],
  volume:
  { controlType: 'attenuation',
    level: 0.7843137383460999,
    muted: false,
    stepInterval: 0.05000000074505806 } }


so um, most of this status information is painfully redundant, displayName and StatusText are both just 'Spotify' and right now I can't see any useful information about what's playing. So I'm left to assume that the namespaces object is encoded as JSON and potentially contains what I'm looking for, but I'm not sure as to how to actually get it and extract it and put it to good use - or I could be totally wrong and that contains nothing useful. Go figure, but either way I suppose someone here might have the experience needed here to shake this information out of the thing. This might only be pertinent to Spotify, but that's what I use 90% of the time so it's good either way, there might be a more generic string that can be fetched for whatever is playing. Any help would be greatly appreciated!

Thanks in advance!



Thursday, 30 June 2016

No title info shown when streaming web radio to my car stereo via Bluetooth A2DP



Hi folks,

this one is quite specific, but it's bugging me, so maybe any of you has a clue on how to fix it.

I'm running a Chinese Honor 7 PLK-UL00, not rooted, with the latest EMUI 4.0 v6.6.16 (Android 6.0.0). I use Bluetooth A2DP to stream music to my car's radio (stock Skoda "Swing"), which has the ability to display info about the music track that's currently playing.
This works fine when I use Spotify (or even YouTube, but who streams music via YouTube) - it shows the current Artist, Title, Length of the song and current position.
But when I try to stream music from a Web Radio app (tested radio.de and TuneIn), the info does not show up. The music streams fine, but the display shows the last title I played in either Spotify or YouTube.
On my smart watch, however, I can see the same info thats correctly shown in the info bar (i.e. the name of the radio station and the current show they're on).
My colleague uses a Samsung S7 edge, and with his phone, the info is correctly displayed on the car radio. We've also tested it on his Mercedes A-class.

Anybody have an idea what the difference may be?

Thanks in advance for your suggestions!