Skip to content

Commit

Permalink
Update dittytoyMediaSession.js
Browse files Browse the repository at this point in the history
  • Loading branch information
reindernijhoff committed Mar 27, 2024
1 parent 71dd348 commit 3de45bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions example/src/dittytoyMediaSession.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ export function initDittytoyMediaSession(dittytoy, prev = null, next = null) {

export function setMediaSessionMetadata({title, artist, album, artwork}) {
try {
navigator.mediaSession.metadata = new MediaMetadata({
title,
artist,
album,
artwork: artwork.map(({src, sizes, type}) => ({src, sizes, type})),
});
navigator.mediaSession.metadata = new MediaMetadata({
title,
artist,
album,
artwork: artwork.map(({src, sizes, type}) => ({src, sizes, type})),
});
} catch (error) {
console.log(`The media session metadata is not supported yet.`);
}
Expand Down

0 comments on commit 3de45bb

Please sign in to comment.