-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
client: add track retrieval from api to track page
Updates track page to fetch track info from API, and using returned value for track metadata and audio playback url.
- Loading branch information
Showing
2 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
const audioSource = "https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3"; | ||
|
||
export default function AudioPlayer() { | ||
export default function AudioPlayer({ url }) { | ||
return ( | ||
<div> | ||
<audio src={audioSource} controls preload="metadata" /> | ||
<audio src={url} controls preload="metadata" /> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters