Skip to content

Commit 2c8c94f

Browse files
committed
Merge branch 'release/1.6.0'
2 parents ca504f4 + 58a80ea commit 2c8c94f

15 files changed

+193
-130
lines changed

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,31 @@
1010
[![Travis](https://img.shields.io/travis/SevenOutman/vue-aplayer.svg?style=flat-square)](https://travis-ci.org/SevenOutman/vue-aplayer)
1111
[![npm](https://img.shields.io/npm/v/vue-aplayer.svg?style=flat-square)](https://www.npmjs.com/package/vue-aplayer)
1212
[![npm](https://img.shields.io/npm/dt/vue-aplayer.svg?style=flat-square)](https://www.npmjs.com/package/vue-aplayer)
13+
[![devDependency Status](https://img.shields.io/david/dev/SevenOutman/vue-aplayer.svg?style=flat-square)](https://david-dm.org/SevenOutman/vue-aplayer#info=devDependencies)
1314

14-
[![GitHub commit activity the past week, 4 weeks, year](https://img.shields.io/github/commit-activity/y/SevenOutman/vue-aplayer.svg?style=flat-square)](https://github.com/SevenOutman/vue-aplayer/commits/develop)
15+
[![Hubble](https://img.shields.io/badge/since-2016-409eff.svg?style=flat-square)](https://hubble.js.org/#/?owner=SevenOutman&repo=vue-aplayer&start)
16+
[![GitHub commit activity the past year](https://img.shields.io/github/commit-activity/y/SevenOutman/vue-aplayer.svg?style=flat-square)](https://github.com/SevenOutman/vue-aplayer/commits/develop)
1517
[![GitHub last commit](https://img.shields.io/github/last-commit/SevenOutman/vue-aplayer/develop.svg?style=flat-square)](https://github.com/SevenOutman/vue-aplayer/commits/develop)
16-
[![devDependency Status](https://img.shields.io/david/dev/SevenOutman/vue-aplayer.svg?style=flat-square)](https://david-dm.org/SevenOutman/vue-aplayer#info=devDependencies)
18+
[![Dependents on GitHub](https://img.shields.io/badge/Dependents-200+-FF53A1.svg?style=flat-square)](https://github.com/SevenOutman/vue-aplayer/network/dependents?dependent_type=REPOSITORY)
1719
[![Discord](https://img.shields.io/badge/Discord-Join%20chat%20%E2%86%92-738bd7.svg?style=flat-square)](https://discord.gg/e3SeMJE)
1820

19-
![Screenshot](https://i.loli.net/2018/05/26/5b090f01033ca.png)
21+
![Screenshot](https://i.loli.net/2018/05/26/5b0912ce2e250.png)
22+
2023

2124
### Features
22-
- Clean and simple UI
23-
- Playlist
25+
- Beautiful clean UI
2426
- Lyrics scroll
27+
- Playlist with repeat & shuffle controls
2528
- Custom theme color / Self-adapting theme color
2629
- Drag and place anywhere
2730
- Mutex play
2831
- HLS support
32+
- **Easy props and API**
33+
- **Dependency free** and light-weight (gzipped 16KB)
2934

3035
Using Vue-APlayer in your project? [Let me know!](https://github.com/SevenOutman/vue-aplayer/issues/26)
3136

37+
3238
## Usage
3339

3440
```HTML
@@ -45,22 +51,39 @@ Using Vue-APlayer in your project? [Let me know!](https://github.com/SevenOutman
4551

4652
[**中文文档**](https://github.com/SevenOutman/vue-aplayer/blob/develop/docs/README.zh-CN.md)
4753

54+
4855
## Changelog
4956

5057
Detailed changes fro each release are documented in the [release notes](https://github.com/SevenOutman/vue-aplayer/releases).
5158

59+
5260
## Contribution
5361

5462
Feel free to [open an issue](https://github.com/SevenOutman/vue-aplayer/issues) if you find a bug or have a nice idea.
5563

5664
[PRs are welcome](https://github.com/SevenOutman/vue-aplayer/blob/master/docs/README.md#contribute).
5765

66+
67+
## The name
68+
69+
- When referring to `Vue-APlayer`, the name should be written in exactly the same case.
70+
- When referring to its versions, either `Vue-APlayer@1.x` (GitHub) or `vue-aplayer@1.x` (npm) is fine.
71+
72+
73+
## Related projects
74+
75+
- [APlayer](https://github.com/MoePlayer/APlayer): Prior art
76+
- [@moefe/vue-aplayer](https://github.com/MoePlayer/vue-aplayer): Another Vue implementation of APlayer by [@u3u](https://github.com/u3u)
77+
78+
5879
## Thanks
59-
[APlayer](https://github.com/MoePlayer/APlayer), for appearance&api design inspiration and prototyping.
6080

61-
[@DIYgod](https://github.com/DIYgod), for creating APlayer and sharing cloud storage for hosting my demo page media resources.
81+
[@DIYgod](https://github.com/DIYgod), for creating APlayer and sharing cloud storage for hosting Vue-APlayer's demo page media resources.
82+
6283

6384
## License
6485

65-
[MIT Licensed](https://github.com/SevenOutman/vue-aplayer/blob/master/LICENSE). Copyright (c) 2016-present Shenghao "Doma" Lei
86+
Vue-APlayer is [MIT Licensed](https://github.com/SevenOutman/vue-aplayer/blob/master/LICENSE).
87+
88+
Copyright (c) 2016-present Shenghao "Doma" Lei
6689

docs/README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
## Installation
22

3+
### Node
4+
35
```
46
$ yarn add vue-aplayer
57
```
68
or if you prefer `npm`
79

810
```
9-
$ npm install vue-aplayer --save
11+
$ npm i vue-aplayer
12+
```
13+
14+
### CDN
15+
16+
```html
17+
<script src="//cdn.jsdelivr.net/npm/vue-aplayer"></script>
18+
<script>
19+
Vue.component('aplayer', VueAPlayer)
20+
</script>
1021
```
1122

1223

@@ -129,6 +140,15 @@ All you need to do is adding [color-thief](https://github.com/lokesh/color-thief
129140
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.
130141

131142

143+
### `disableVersionBadge`
144+
145+
By default Vue-APlayer prints a version badge in console. If you want to silent it, you can set `disableVersionBadge` to `true` before you first create a Vue-APlayer instance.
146+
147+
```js
148+
import VueAPlayer from 'vue-aplayer'
149+
VueAPlayer.disableVersionBadge = true
150+
```
151+
132152

133153
### Slots
134154

docs/README.zh-CN.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
## 安装
22

3+
### Node
4+
35
```
46
$ yarn add vue-aplayer
57
```
68

79
或者如果你选择 `npm`
810

911
```
10-
$ npm install vue-aplayer --save
12+
$ npm i vue-aplayer
1113
```
1214

15+
### CDN
16+
17+
```html
18+
<script src="//cdn.jsdelivr.net/npm/vue-aplayer"></script>
19+
<script>
20+
Vue.component('aplayer', VueAPlayer)
21+
</script>
22+
```
1323

1424

1525
## 运行时要求
@@ -131,6 +141,15 @@ new Vue({
131141
`v1.3.0` 开始, Vue-APlayer 可选支持 `*.m3u8` 音频. 你需要做的就是在项目中安装 [hls.js](https://github.com/video-dev/hls.js) 包即可.
132142

133143

144+
### `disableVersionBadge`
145+
146+
Vue-APlayer 默认会在控制台打印出当前的版本标识,如果你想要禁用它,可以将 `disableVersionBadge` 设为 `true`
147+
148+
```js
149+
import VueAPlayer from 'vue-aplayer'
150+
VueAPlayer.disableVersionBadge = true
151+
```
152+
134153

135154
### Slots
136155

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-aplayer",
3-
"version": "1.5.2",
3+
"version": "1.6.0",
44
"description": "Easy-to-use music player for Vue 2.x",
55
"main": "dist/vue-aplayer.min.js",
66
"files": [
@@ -27,7 +27,9 @@
2727
"aplayer",
2828
"vue-aplayer",
2929
"music-player",
30-
"html5"
30+
"html5",
31+
"component",
32+
"vue-compoents"
3133
],
3234
"author": {
3335
"name": "Doma",
@@ -51,7 +53,7 @@
5153
"babel-preset-stage-2": "^6.24.1",
5254
"css-loader": "^0.28.10",
5355
"eslint": "^4.18.2",
54-
"eslint-friendly-formatter": "^3.0.0",
56+
"eslint-friendly-formatter": "^4.0.1",
5557
"eslint-loader": "^2.0.0",
5658
"eslint-plugin-vue": "^4.3.0",
5759
"file-loader": "^1.1.11",

src/components/aplayer-controller-progress.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
.aplayer-bar-wrap {
114114
margin: 0 0 0 5px;
115115
padding: 4px 0;
116-
cursor: pointer !important;
116+
cursor: pointer;
117117
flex: 1;
118118
119119
.aplayer-bar {
@@ -157,7 +157,7 @@
157157
transition: transform 300ms, background-color .3s, border-color .3s;
158158
border-radius: 50%;
159159
background: #fff;
160-
cursor: pointer !important;
160+
cursor: pointer;
161161
162162
&:hover {
163163
transform: scale(1);

src/components/aplayer-controller-volume.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
7676
.aplayer-volume-wrap {
7777
position: relative;
78-
cursor: pointer !important;
78+
cursor: pointer;
7979
z-index: 0;
8080
8181
&:hover .aplayer-volume-bar-wrap {
@@ -90,12 +90,12 @@
9090
right: -4px;
9191
height: 40px;
9292
z-index: -1;
93-
/*overflow: hidden;*/
9493
transition: all .2s ease;
94+
9595
&::after {
9696
content: '';
9797
position: absolute;
98-
bottom: -15px;
98+
bottom: -16px;
9999
left: 0;
100100
right: 0;
101101
height: 62px;
@@ -106,11 +106,11 @@
106106
.aplayer-volume-bar {
107107
position: absolute;
108108
bottom: 0;
109-
left: 9px;
110-
width: 9px;
109+
left: 11px;
110+
width: 5px;
111111
height: 40px;
112112
background: #aaa;
113-
border-radius: 5px;
113+
border-radius: 2.5px;
114114
overflow: hidden;
115115
z-index: 1;
116116

src/components/aplayer-controller.vue

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,24 @@
2121
@togglemute="$emit('togglemute')"
2222
@setvolume="v => $emit('setvolume', v)"
2323
/>
24-
<icon-button class="aplayer-icon-mode" icon="shuffle" @click.native="$emit('toggleshuffle')" :class="{ 'inactive': !shuffle }"/>
25-
<icon-button class="aplayer-icon-mode" :icon="repeat === 'repeat-one' ? 'repeat-one' : 'repeat-all'" :class="{ 'inactive': repeat === 'no-repeat'}" @click.native="$emit('nextmode')"/>
26-
<icon-button class="aplayer-icon-menu" icon="menu" @click.native="$emit('togglelist')"/>
24+
<icon-button
25+
class="aplayer-icon-mode"
26+
icon="shuffle"
27+
:class="{ 'inactive': !shuffle }"
28+
@click.native="$emit('toggleshuffle')"
29+
/>
30+
<icon-button
31+
class="aplayer-icon-mode"
32+
:icon="repeat === 'repeat-one' ? 'repeat-one' : 'repeat-all'"
33+
:class="{ 'inactive': repeat === 'no-repeat'}"
34+
@click.native="$emit('nextmode')"
35+
/>
36+
<icon-button
37+
class="aplayer-icon-menu"
38+
icon="menu"
39+
:class="{ 'inactive': !$parent.showList }"
40+
@click.native="$emit('togglelist')"
41+
/>
2742
</div>
2843
</div>
2944
</template>
@@ -74,14 +89,11 @@
7489
.aplayer-controller {
7590
display: flex;
7691
align-items: center;
77-
7892
position: relative;
7993
80-
8194
.aplayer-time {
8295
display: flex;
8396
align-items: center;
84-
8597
position: relative;
8698
height: 17px;
8799
color: #999;
@@ -92,12 +104,16 @@
92104
margin-left: 4px;
93105
margin-right: 4px;
94106
}
107+
95108
.aplayer-icon {
96109
cursor: pointer;
97110
transition: all 0.2s ease;
98-
99111
margin-left: 4px;
100112
113+
&.inactive {
114+
opacity: .3;
115+
}
116+
101117
.aplayer-fill {
102118
fill: #666;
103119
}
@@ -126,7 +142,6 @@
126142
}
127143
}
128144
}
129-
130145
}
131146
132147
</style>

src/components/aplayer-iconbutton.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
opacity: 1;
3939
}
4040
41-
&.inactive {
42-
opacity: .3;
43-
}
44-
4541
.aplayer-fill {
4642
transition: all .2s ease-in-out;
4743
}

0 commit comments

Comments
 (0)