Open brantlk opened 6 years ago
I was thinking of implementing something like that, but the big problem would be to have a standard way of getting name's song from popular music players. An example with Spotify installed with snap on Debian unstable:
muammar@nuc ~
% pacmd list-sink-inputs !10025
1 sink input(s) available.
index: 70
driver: <protocol-native.c>
flags: START_CORKED
state: RUNNING
sink: 12 <alsa_output.pci-0000_00_1f.3.analog-stereo>
volume: front-left: 12511 / 19% / -43.15 dB, front-right: 12511 / 19% / -43.15 dB
balance 0.00
muted: no
current latency: 496.62 ms
requested latency: 980.00 ms
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
resample method: (null)
module: 7
client: 90 <spotify>
properties:
media.role = "music"
media.name = "Spotify"
application.name = "spotify"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "30"
application.process.id = "6437"
application.process.user = "muammar"
application.process.host = "nuc"
application.process.binary = "spotify"
window.x11.display = ":0"
application.language = "en_US.UTF-8"
application.process.machine_id = "ab941b248d584d09a4ef98167d9cded3"
application.process.session_id = "2"
module-stream-restore.id = "sink-input-by-media-role:music"
Would be nice if the app monitored the system to see what track is playing and send that to the cast device. I'm using Amarok on Kubuntu.
https://developers.google.com/cast/docs/reference/messages#MusicTrackMediaMetadata