diff --git a/package.json b/package.json index 84bfc0c..75cf6a4 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "name": "epistrophy", - "version": "0.3.1", + "version": "0.3.3", "private": true, "dependencies": { + "@mebtte/react-media-session": "^1.1.2", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/src/Album.js b/src/Album.js index 7b3e610..6b96649 100644 --- a/src/Album.js +++ b/src/Album.js @@ -22,6 +22,16 @@ export const Album = (props) => { props.goBack(); } }} + onPlay={() => { + navigator.mediaSession.metadata = new MediaMetadata({ + title: props.Tracks[trackNo].Title, + artist: props.Artist, + album: props.Title, + artwork: [ + { src: makeUrl(props.Cover), sizes: '96x96' } + ] + }); + }} /> {props && props.Tracks.map((data, key) => {