Skip to content

Commit

Permalink
Use dummy metadata example
Browse files Browse the repository at this point in the history
  • Loading branch information
rtshkmr committed Aug 1, 2024
1 parent 56991b8 commit 87ae225
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion assets/js/hooks/audio_player.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,47 @@ AudioPlayer = {
}
const newMetadata = this.createMediaMetadata(playback)
console.log("new metadata", newMetadata)
navigator.mediaSession.metadata = newMetadata
// navigator.mediaSession.metadata = newMetadata

navigator.mediaSession.metadata = new MediaMetadata({
title: "Unforgettable",
artist: "Nat King Cole",
album: "The Ultimate Collection (Remastered)",
artwork: [
{
src: "https://dummyimage.com/96x96",
sizes: "96x96",
type: "image/png",
},
{
src: "https://dummyimage.com/128x128",
sizes: "128x128",
type: "image/png",
},
{
src: "https://dummyimage.com/192x192",
sizes: "192x192",
type: "image/png",
},
{
src: "https://dummyimage.com/256x256",
sizes: "256x256",
type: "image/png",
},
{
src: "https://dummyimage.com/384x384",
sizes: "384x384",
type: "image/png",
},
{
src: "https://dummyimage.com/512x512",
sizes: "512x512",
type: "image/png",
},
],
});




// TODO: register action handlers
Expand Down

0 comments on commit 87ae225

Please sign in to comment.