Comments (4)
Ich würde das durchaus auch gerne unterstützen. Bei Hörbüchern nicht so wichtig, bei Musikalben hingegen schon was Feines.
Aber das Ganze ist an sich ja nur ein grafisches Frontend für node-sonos-http-api.
Und hier scheint es nicht so einfach zu tracken zu sein ob man überhaupt noch das gestartete Album hört oder nicht.
Die Lieder zum Album könnte ich aus der Spotify API ziehen, aber ob ich das dann irgendwie mit dem Status von node-sonos-http-api in Verbindung bringen kann?
Steht schon irgendwo auf meiner Liste wünschenswerter neuer Features, allerdings bin ich noch nicht so optimistisch, dass sich das mit den gewählten Softwarekomponenten umsetzen lässt...
from sonos-kids-controller.
Die node-sonos-http-api scheint die notwendigen Informationen zum aktuellen Zustand des Sonos zu enthalten
Hier die Antwort auf roomname/state:
{
"volume": 65,
"mute": false,
"equalizer": {
"bass": 0,
"treble": 0,
"loudness": true
},
"currentTrack": {
"artist": "Karsten Glück",
"title": "Im All",
"album": "Die 20 wichtigsten Wissenslieder für Kinder",
"albumArtUri": "/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0yCwDVuh0FrBmpmcnMhAaw%3fsid%3d9%26flags%3d8224%26sn%3d5",
"duration": 202,
"uri": "x-sonos-spotify:spotify%3atrack%3a0yCwDVuh0FrBmpmcnMhAaw?sid=9&flags=8224&sn=5",
"trackUri": "x-sonos-spotify:spotify%3atrack%3a0yCwDVuh0FrBmpmcnMhAaw?sid=9&flags=8224&sn=5",
"type": "track",
"stationName": "",
"absoluteAlbumArtUri": "http://192.168.188.21:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0yCwDVuh0FrBmpmcnMhAaw%3fsid%3d9%26flags%3d8224%26sn%3d5"
},
"nextTrack": {
"artist": "Karsten Glück",
"title": "Die Dinos",
"album": "Die 20 wichtigsten Wissenslieder für Kinder",
"albumArtUri": "/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a5mAhOrZKMZzitwv0OOfrim%3fsid%3d9%26flags%3d8224%26sn%3d5",
"duration": 161,
"uri": "x-sonos-spotify:spotify%3atrack%3a5mAhOrZKMZzitwv0OOfrim?sid=9&flags=8224&sn=5",
"trackUri": "x-sonos-spotify:spotify%3atrack%3a5mAhOrZKMZzitwv0OOfrim?sid=9&flags=8224&sn=5",
"absoluteAlbumArtUri": "http://192.168.188.21:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a5mAhOrZKMZzitwv0OOfrim%3fsid%3d9%26flags%3d8224%26sn%3d5"
},
"trackNo": 6,
"elapsedTime": 76,
"elapsedTimeFormatted": "00:01:16",
"playbackState": "PAUSED_PLAYBACK",
"playMode": {
"repeat": "none",
"shuffle": false,
"crossfade": false
}
}
Unter CurrentTrack gibt es artist, title, album sowie die duration.
Ganz unten dann noch die elapsedTime.
from sonos-kids-controller.
Das hab ich mir auch schon angeschaut. Das ist aber ja nur die Info zum Track.
Vom Album ist nur ein Name, aber keine eindeutige ID vorhanden, oder?
Intern nutzt die Software bei Spotify ja die UniqueID für das Album.
Das müsste man irgendwie in Zusammenhang bekommen.
Wenn man das Album hat, dürfte trackNo immerhin die Info liefern, das wievielte Lied/Kapitel gerade läuft.
Ebenfalls schön wäre ja, wenn ein Album z.B. übers Handy (oder bei z.B. Sonos One mit Alexa) gestartet wird,
die Box auch auf das Album umspringt.
Ich fürchte nur, dass man sich da ziemlich tief in die Spotify API reinknien muss.
Da will ja einiges an Infos abgerufen und lokal vorgehalten werden um solche Suchtreffer zu erlauben (sofern möglich).
Könnte gut sein, dass das komplexer ist als als der gesamte bisherige Code.
Wenn ich das meiner knappen Freitzeit fürs Coden gegenüberstelle, sind die Kids ausgezogen und brauchen den Spass nicht mehr bis ich fertig bin. 😬
from sonos-kids-controller.
from sonos-kids-controller.
Related Issues (20)
- Question: using home assistant instead of using node-sonos-http-api?!?
- Project License
- any idea why the overlay screen is not showing up when I click the top right button? HOT 1
- Playlist not loading if no picture is set HOT 1
- add Sonos Playlist check HOT 1
- Error on npm install (jasmine module missing?) HOT 5
- Playback issues on startup HOT 4
- TTS is not working HOT 1
- Link to enclosure/box HOT 1
- Build gets stuck at ionic build --prod HOT 2
- Link to case not working HOT 3
- Change page title HOT 3
- [Wunsch] Plex API hinzufügen? HOT 2
- [FRAGE] 3 sonos with 3 spotify-accounts HOT 1
- Spotify integration does not work anymore? HOT 4
- Spotify Podcasts HOT 1
- Text entered by the on screen display is wrong
- Spotify streaming problem HOT 1
- Spotify - Nur 3 Alben werden angezeigt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonos-kids-controller.