Skip to content

Commit 0ffa21f

Browse files
committed
docs: add description to audio.artist object
1 parent 782fb27 commit 0ffa21f

File tree

4 files changed

+26
-45
lines changed

4 files changed

+26
-45
lines changed

docs/components/Demo.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import "aplayer-react/dist/index.css";
55
const playlist1 = [
66
{
77
name: "Dancing with my phone",
8-
artist: "HYBS",
8+
artist: {
9+
name: "HYBS",
10+
url: "https://music.163.com/#/artist?id=49713779",
11+
},
912
url: "https://music.163.com/song/media/outer/url?id=1969744125",
1013
cover:
1114
"https://p1.music.126.net/tOtUdKjS9rktAFRamcomWQ==/109951167748733958.jpg",

docs/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@vercel/analytics": "^1.0.0",
14-
"aplayer": "^1.10.1",
15-
"aplayer-react": "1.4.0",
14+
"aplayer-react": "1.5.0",
1615
"next": "^13.1.1",
1716
"nextra": "^2.0.3",
1817
"nextra-theme-docs": "^2.0.3",

docs/pages/docs/api.mdx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
## Props
22

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

docs/pnpm-lock.yaml

Lines changed: 4 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)