I’m building a music player for Windows and currently when I adjust system volume, the popup shows up saying "music.html" (the app has multiple features, each page inside it has it’s own html file). How can I tell windows what song is playing there and how would I add media key functionality (Pause, Skip, Back buttons)?
I’m playing the music using:
var song = new Audio(/*link to the first song on the playlist*/);
var songName = $("#selection").children("option:selected").attr("song"); var artistName = $("#selection").children("option:selected").attr("artist"); var albumName = $("#selection").children("option:selected").attr("album");
and I get the album art later on, the var with the link to the album art photo is "res"
(Sorry for the bad explanations, I’m completely self taught and don’t know all the correct terminology)
tl;dr: How would I take information loaded inside my program, and feed that to windows so it shows it in the popup when I adjust system volume. And how would I make it so the media keys on my keyboard can control the music, I already have functions set up in the code for controlling the music, playSong(), pauseSong(), skipSong() and backSong().
Source: Windows Questions