Integrating a streaming service
Could be Spotify, Apple music etc,
"Play the top ten list" "Play this song"
Etc. It could be great.
I'd rather have the mirror integrate with some kind of speaker thing thank have it play music itself. Something like Sonos or Chromecast maybe?
I thought the same thing. If the board could connect wirelessly through bluetooth to a bluetooth enabled speaker, it could be phenomenal. "Play insert song name here" and bam... thoughts? "Now playing *insert song/playlist/album name here" could be displayed somewhere on the mirror.
@StevenTLBF totally agreed (although dealing with Bluetooth would be a bit of a pain). If you want to take a stab at it let me know. With a slight modification I could modify the YouTube functionality to also play music and just use the 3.5mm aux out on the pi, but I think some kind of streaming solution would be better.
@evancohen the youtube idea is also good, but I think you would have a problem playing playlists? I don't want to search a new song every time the last one finishes, so playlists are the way to go, I think.
@SenadM not necessarily... The YouTube API does let you search for playlists and the iFrame in which the YouTube video is embedded fires a onPlayerStateChange event so you could queue up the next video once one is finished. This is all in theory of course... But if that works you could have "play next track" and/or "skip track" commands.
There is also message posting to the iFrame that you could use to play/pause the video...
iframe.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
I haven't tried it yet, but it should work :shipit:
Well if it is possible to search for playlists also, then Youtube would be a great start as you already did implement it. And later, maybe other developers could add other alternatives. But I think, as many others, that youtube isn't the most optimal choice for listening to music, as f.x. spotify.
Here's a start
https://developer.spotify.com/web-api/
:+1: for sonos integration :)
spotify isn't optimal to work with atm... the api isn't 'good' enough to work with (play songs etc.)... it mostly supports data fetching, not 'controlling' spotify. Maybe someone has a hacky way to get it to work but it is definitely not normally supported right now
Yeah, there really isn't a good way to do Spotify. SoundCloud works pretty well thoigh. Both YouTube and SoundCloud are on the search branch (which is now horribly out of date). It's probubly worth the time to rewrite. Maybe I can look at doing that tonight.
@SenadM is the soundcloud and youtube integration enough for you? Or do you see another possible integration point?
@chr1s1 It seems that you can get Sonos (and Chromecast!) integration with PulseAudio, which is already a dependency of the mirror: https://github.com/masmu/pulseaudio-dlna/issues/32
I'm going to add https://github.com/masmu/pulseaudio-dlna to the smart-mirror documentation because that is totally awesome.
Awesome! Thanks a lot! @evancohen
pandora.... would be awesome!!
@evancohen should this be labeled as outdated? this would require pulseaudio which we've found causes issues with smart-mirror...
Yeah, this is a bit out of date. It would be nice to support this functionality at some point, but it won't be via PulseAudio. There may be some Node libs that we can look at for DLNA streaming.
i'm going to leave it... i don't think anyone will install pulseaudio based on this issue...
Migrated to http://feathub.com/evancohen/smart-mirror/+13
Issue will be closed and tracked on feathub moving forward. Please refer to feathub for all future comments on this suggestion.