Skip to content

Commit

Permalink
docs: add description to audio.artist object
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenOutman committed Jul 20, 2023
1 parent 782fb27 commit 0ffa21f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 45 deletions.
5 changes: 4 additions & 1 deletion docs/components/Demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import "aplayer-react/dist/index.css";
const playlist1 = [
{
name: "Dancing with my phone",
artist: "HYBS",
artist: {
name: "HYBS",
url: "https://music.163.com/#/artist?id=49713779",
},
url: "https://music.163.com/song/media/outer/url?id=1969744125",
cover:
"https://p1.music.126.net/tOtUdKjS9rktAFRamcomWQ==/109951167748733958.jpg",
Expand Down
3 changes: 1 addition & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
},
"dependencies": {
"@vercel/analytics": "^1.0.0",
"aplayer": "^1.10.1",
"aplayer-react": "1.4.0",
"aplayer-react": "1.5.0",
"next": "^13.1.1",
"nextra": "^2.0.3",
"nextra-theme-docs": "^2.0.3",
Expand Down
32 changes: 17 additions & 15 deletions docs/pages/docs/api.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
## Props

| Prop | Default | Description |
| ------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| audio | | Songs' information. Could be a single object or an array of objects |
| audio.name | `"Audio name"` | Title of the song |
| audio.artist | `"Audio artist"` | Artist name of the song |
| audio.url | | Url of the media source to play |
| audio.cover | | Url of the album cover image |
| audio.lrc | | Lyrics of the song in raw LRC format |
| audio.theme | | Override theme color for this song. See `theme` prop for theme color explanation |
| theme | `"#ebd0c2"` | Theme color of the player that applies to progress bar, volume control bar and playlist marker. |
| autoPlay | | [See `autoplay` attribute of `<audio>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio#attr-autoplay) |
| volume | `0.7` | Initial volume of the player. |
| initialLoop | `"all"` | Initial loop mode of the player |
| initialOrder | `"list"` | Initial playlist order of the player |
| listMaxHeight | `250` | Playerlist max height |
| Prop | Default | Description |
| ----------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| audio | | Songs' information. Could be a single object or an array of objects |
| audio.name | `"Audio name"` | Title of the song |
| audio.artist | `"Audio artist"` | Artist name of the song. Either a string or be an object containing artist's name and homepage URL. |
| audio.artist.name | `"Audio artist"` | Artist name of the song. |
| audio.artist.url | | Artist homepage URL. If specified, artist name displayed on the player will be a link to that URL. |
| audio.url | | Url of the media source to play |
| audio.cover | | Url of the album cover image |
| audio.lrc | | Lyrics of the song in raw LRC format |
| audio.theme | | Override theme color for this song. See `theme` prop for theme color explanation |
| theme | `"#ebd0c2"` | Theme color of the player that applies to progress bar, volume control bar and playlist marker. |
| autoPlay | | [See `autoplay` attribute of `<audio>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio#attr-autoplay) |
| volume | `0.7` | Initial volume of the player. |
| initialLoop | `"all"` | Initial loop mode of the player |
| initialOrder | `"list"` | Initial playlist order of the player |
| listMaxHeight | `250` | Playerlist max height |
31 changes: 4 additions & 27 deletions docs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 0ffa21f

@vercel
Copy link

@vercel vercel bot commented on 0ffa21f Jul 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.