Skip to content

Commit

Permalink
Added MediaSession properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jjuback committed Apr 2, 2024
1 parent bda598b commit 6512102
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Album.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ export const Album = (props) => {
artwork={[
{ src: makeUrl(props.Cover), sizes: '96x96' }
]}
controls
src={makeUrl(props.Tracks[trackNo].Url)}
autoPlay={trackNo > 0}
onEnded={() => {
if (trackNo + 3 < props.Tracks.length) {
setTrackNo(trackNo + 3);
if (trackNo + 1 < props.Tracks.length) {
setTrackNo(trackNo + 1);
} else {
props.goBack();
}
}}
>
Expand Down

0 comments on commit 6512102

Please sign in to comment.