@@ -51,9 +51,9 @@ Props are mostly the same as [APlayer's options](https://aplayer.js.org/#/home?i
51
51
| mode | String | ` 'circulation' ` | Play mode, can be 'random' 'single 'circulation'(loop) or 'order'(no loop) |
52
52
| preload | String | ` 'auto' ` | The way to load music, can be 'none' 'metadata' or 'auto' |
53
53
| listMaxHeight | String | * none* | Max height of play list |
54
- | narrow | Boolean | ` false ` | DEPRECATED, use ` mini ` instead |
55
- | listmaxheight | String | * none * | DEPRECATED, use ` listMaxHeight ` instead |
56
- | showlrc | Boolean | ` false ` | DEPRECATED, use ` showLrc ` instead |
54
+ | narrow | | | DEPRECATED, use ` mini ` instead |
55
+ | listmaxheight | | | DEPRECATED, use ` listMaxHeight ` instead |
56
+ | showlrc | | | DEPRECATED, use ` showLrc ` instead |
57
57
58
58
> If you are using Vue@2.3.0+, you can use [ ` .sync ` Modifier] ( https://vuejs.org/v2/guide/components.html#sync-Modifier ) on ` music ` and ` mode ` prop.
59
59
@@ -73,9 +73,6 @@ The `music` props can either be an object containing info of the song to play, o
73
73
> vue-aplayer uses [ fetch API] ( https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API ) to load your lrc when it's a url.
74
74
> If your browser doesn't support fetch by default, please use polyfills like [ isomorphic-fetch] ( https://github.com/matthew-andrews/isomorphic-fetch ) .
75
75
76
- ### HLS support
77
- Simply install [ hls.js] ( https://github.com/video-dev/hls.js ) into your project. ` vue-aplayer ` detects ` *.m3u8 ` sources and handles the rest.
78
-
79
76
### Events
80
77
81
78
| Name | Params | Description |
@@ -87,6 +84,23 @@ Simply install [hls.js](https://github.com/video-dev/hls.js) into your project.
87
84
| ended | none | Triggered when APlayer ended playing |
88
85
| error | none | Triggered when an error occurs |
89
86
87
+ ## Advanced
88
+
89
+ ### Self-adapting theme color
90
+ Since ` v1.3.0 ` , if you set a ** Music Object** 's ` theme ` property to ` 'pic' ` , Vue-APlayer will pick color from the songs cover image as theme color.
91
+ Also, you can set player's ` theme ` prop to ` 'pic' ` , it will apply to every song.
92
+
93
+ All you need to do is adding [ color-thief] ( https://github.com/lokesh/color-thief ) to your page.
94
+ > Note that color-thief is ** NOT module compatible**
95
+
96
+ ```
97
+ <!-- or other CDNs you prefer -->
98
+ <script src="https://cdn.jsdelivr.net/npm/colorthief@2.0.2/src/color-thief.js"></script>
99
+ ```
100
+
101
+ ### HLS support
102
+ Since ` v1.3.0 ` , Vue-APlayer supports ` *.m3u8 ` media as an optional functionality. Simply install [ hls.js] ( https://github.com/video-dev/hls.js ) into your project, and Vue-APlayer handles the rest.
103
+
90
104
### Slots
91
105
92
106
- ` slot="display" `
0 commit comments