aplayer-react
Advanced tools
Comparing version 1.0.0 to 1.0.1-alpha.1
@@ -356,3 +356,3 @@ "use strict"; | ||
var import_react3 = require("react"); | ||
var import_shim = require("use-sync-external-store/shim"); | ||
var import_shim = require("use-sync-external-store/shim/index.js"); | ||
function useCreateAudioElement(options) { | ||
@@ -359,0 +359,0 @@ const audioElementRef = (0, import_react3.useRef)(); |
{ | ||
"name": "aplayer-react", | ||
"version": "1.0.0", | ||
"version": "1.0.1-alpha.1", | ||
"description": "The missing APlayer for React applications", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -28,12 +28,31 @@ # aplayer-react | ||
<APlayer | ||
audio={{ | ||
name: "Dancing with my phone", | ||
artist: "HYBS", | ||
url: "https://music.163.com/song/media/outer/url?id=1969744125", | ||
}} | ||
autoPlay | ||
/>; | ||
render( | ||
<APlayer | ||
audio={{ | ||
name: "Dancing with my phone", | ||
artist: "HYBS", | ||
url: "https://music.163.com/song/media/outer/url?id=1969744125", | ||
}} | ||
autoPlay | ||
/> | ||
); | ||
``` | ||
### 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 | | ||
## Who uses aplayer-react? | ||
@@ -40,0 +59,0 @@ |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
74939
65
1