## Installation ### Node ``` $ yarn add vue-aplayer ``` or if you prefer `npm` ``` $ npm i vue-aplayer ``` ### CDN ```html ``` ## Requirements - [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) - [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) ## Usage ```HTML ``` ```JS // ES6 import Aplayer from 'vue-aplayer' new Vue({ components: { Aplayer } }) ``` ### Props | Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | music| Object | *required* | Music info for current playing music, see [Music info](https://github.com/SevenOutman/vue-aplayer/blob/develop/docs/README.md#music-info) | | list | Array | `[]` | Music list to play and display. If list is not empty, music list panel will be shown, even if the only song in the list is identical to music prop. | | mini | Boolean | `false` | Mini mode | | float | Boolean | `false` | Float mode, in which you can drag the player around and leave it anywhere on your page | | showLrc | Boolean | `false` | Whether to show lyrics or not | | mutex | Boolean | `true` | Pause other players when this player is playing | | theme | String | `'#41b883'` | Theme color, will be overridden by current `music`'s theme if set | | shuffle | Boolean | `false` | Shuffle the playlist | | repeat | String | `'no-repeat'` | How to repeat play. Either to `'repeat-one'` `'repeat-all'` or `'no-repeat'`. You can also use accordingly `'music'` `'list'` `'none'` for easier remembering | | listMaxHeight | String | *none* | Max height of play list | | listFolded | Boolean | `false` | Fold playlist initially | | narrow | | | DEPRECATED, use `mini` instead | | listmaxheight | | | DEPRECATED, use `listMaxHeight` instead | | showlrc | | | DEPRECATED, use `showLrc` instead | > If you are using Vue@2.3.0+, you can use [`.sync` Modifier](https://vuejs.org/v2/guide/components.html#sync-Modifier) on `music`, `shuffle` and `repeat` props. ### Audio attributes as props Since `v1.4.0`, we added some props that names after `