├── .gitignore
├── webpack
├── postcss.config.js
├── dev.config.js
└── prod.config.js
├── .travis.yml
├── .github
└── ISSUE_TEMPLATE.md
├── LICENSE
├── package.json
├── .eslintrc
├── demo
├── index.html
└── demo.js
├── README.md
├── dist
├── APlayer.min.css
├── APlayer.min.css.map
└── APlayer.min.js
└── src
├── css
└── index.scss
└── js
└── index.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | node_modules
3 | demo2
4 | npm-debug.log
--------------------------------------------------------------------------------
/webpack/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | 'autoprefixer': {}
4 | }
5 | };
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 |
3 | node_js:
4 | - "node"
5 |
6 | cache:
7 | yarn: true
8 | directories:
9 | - node_modules
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | 中文用户请注意:请尽量用**英文**描述你的 issue,这样能够让尽可能多的人帮到你。
2 |
3 | If you want to report a bug, please provide the following information:
4 |
5 | - The steps to reproduce.
6 | - A minimal demo of the problem via https://jsfiddle.net or http://codepen.io/pen if possible.
7 | - Which versions of APlayer, and which browser / OS are affected by this issue?
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) DIYgod Made by DIYgod. Available on GitHub. Licensed MIT.
2 | APlayer
51 | Wow, such a beautiful html5 music player
52 |
54 | Normal
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
85 |
86 | With playlist
87 |
88 |
89 |
90 | With lyrics
91 |
92 | With playlist and lyrics
93 |
94 | Narrow
95 |
96 |
3 | APlayer
5 |
6 | > Wow, such a lovely HTML5 music player
7 |
8 | [](https://www.npmjs.com/package/aplayer)
9 | [](https://github.com/MoePlayer/APlayer/blob/master/LICENSE)
10 | [](https://www.npmjs.com/package/aplayer)
11 | [](https://github.com/MoePlayer/APlayer/tree/master/dist)
12 | [](https://travis-ci.org/MoePlayer/APlayer)
13 | [](https://david-dm.org/MoePlayer/APlayer#info=devDependencies)
14 | [](https://github.com/MoePlayer/APlayer#donate)
15 |
16 | ## Introduction
17 |
18 | 
19 |
20 | APlayer is a lovely HTML5 music player to help people build audio easily.
21 |
22 | **APlayer supports:**
23 |
24 | - Media formats
25 | - MP4 H.264 (AAC or MP3)
26 | - WAVE PCM
27 | - Ogg Theora Vorbis
28 | - Features
29 | - Playlist
30 | - Lyrics
31 |
32 | Using APlayer on your project? [Let me know!](https://github.com/MoePlayer/APlayer/issues/79)
33 |
34 | **[Demo](http://aplayer.js.org)**
35 |
36 | **[Docs](http://aplayer.js.org/docs)**
37 |
38 | ## Install
39 |
40 | ```
41 | $ npm install aplayer --save
42 | ```
43 |
44 | ## Quick Start
45 |
46 | ```html
47 |
48 |
49 | ```
50 |
51 | ```js
52 | var ap = new APlayer({
53 | element: document.getElementById('aplayer1'),
54 | music: {
55 | title: 'Preparation',
56 | author: 'Hans Zimmer/Richard Harvey',
57 | url: 'Preparation.mp3',
58 | }
59 | });
60 | ```
61 |
62 | ## Usage
63 |
64 | [Read the Docs](http://aplayer.js.org/docs)
65 |
66 | ## Join the Discussion
67 |
68 | - [Telegram Group](https://t.me/adplayer)
69 | - [QQ Group](https://shang.qq.com/wpa/qunwpa?idkey=bf22213ae0028a82e5adf3f286dfd4f01e0997dc9f1dcd8e831a0a85e799be17): 415835947
70 |
71 | ## Related Projects
72 |
73 | - [APlayer-Typecho-Plugin](https://github.com/zgq354/APlayer-Typecho-Plugin)
74 | - [hexo-tag-aplayer](https://github.com/grzhan/hexo-tag-aplayer)
75 | - [163music-APlayer-you-get-docker](https://github.com/YUX-IO/163music-APlayer-you-get-docker)
76 | - [Hermit-X(APlayer for WordPress)](https://github.com/liwanglin12/Hermit-X)
77 | - [vue-aplayer](https://github.com/SevenOutman/vue-aplayer)
78 | - [APlayer_for_Z-BlogPHP](https://github.com/fghrsh/APlayer_for_Z-BlogPHP)
79 | - [php-aplayer](https://github.com/Daryl-L/php-aplayer)
80 | - [react-aplayer](https://github.com/sabrinaluo/react-aplayer)
81 | - [vue-aplayer](https://github.com/MoeFE/vue-aplayer)
82 | - [APlayer-Controler](https://github.com/Mashiro-Sorata/APlayer-Controler)
83 | - [APlayerHandle](https://github.com/kn007/APlayerHandle)
84 | - [MetingJS](https://github.com/metowolf/MetingJS)
85 | - Feel free to submit yours in [`Let me know!`](https://github.com/MoePlayer/APlayer/issues/79)
86 |
87 | ## Who use APlayer?
88 |
89 | - [Anotherhome](https://www.anotherhome.net/2717)
90 | - [站长之家](http://www.chinaz.com/15year/index.html)
91 | - [TheFatRat](http://thefatrat.cn/)
92 | - [Jelly Rue](http://jellyrue.com/)
93 | - [LWL的自由天空](https://blog.lwl12.com/read/hermit-x.html)
94 | - [萨摩公园](https://i-meto.com/meting-typecho/)
95 | - [ZGQ's Blog](https://blog.izgq.net/archives/456/)
96 | - [FGHRSH 的博客](https://www.fghrsh.net/post/77.html)
97 | - [Blessing Studio](https://blessing.studio/generate-aplayer-config-from-netease-automatically/)
98 | - [暮光博客](https://muguang.me/guff/2645.html)
99 | - [Justice_Eternal吧曲谱资源站](http://lightmoon.pw)
100 | - [Justice_Eternal吧曲谱资源站(移动端)](https://justice-eternal.github.io/)
101 | - [歌词千寻](https://www.lrcgc.com/diy)
102 | - [SORA](http://mashirosorata.vicp.io/APlayer-Controler%E2%80%94%E2%80%94%E5%8F%AF%E8%87%AA%E5%AE%9A%E4%B9%89%E7%9A%84ap%E6%8E%A7%E5%88%B6%E5%99%A8.html)
103 | - [iSearch](http://i.oppsu.cn)
104 | - [LRC歌词编辑器](https://github.com/MoeFE/Lyric)
105 | - [kn007的个人博客](https://kn007.net/topics/wordpress-blog-use-new-html5-player-aplayer/)
106 | - [LLSupport](https://www.lovelivesupport.com/)
107 | - [Аэростатика](https://aerostatica.ru/)
108 | - Feel free to submit yours in [`Let me know!`](https://github.com/MoePlayer/APlayer/issues/79)
109 |
110 | ## CDN
111 |
112 | - [jsDelivr](https://www.jsdelivr.com/package/npm/aplayer)
113 | - [cdnjs](https://cdnjs.com/libraries/aplayer)
114 | - [unpkg](https://unpkg.com/aplayer)
115 | - [RawGit](https://rawgit.com/MoePlayer/APlayer/master/dist/APlayer.min.js)
116 |
117 | ## Donate
118 |
119 | - [Donate via Paypal](https://www.paypal.me/DIYgod)
120 | - [Donate via WeChat Pay](https://ws4.sinaimg.cn/large/006tKfTcgy1fhu1uowywej307s07st8h.jpg)
121 | - [Donate via Alipay](https://ws4.sinaimg.cn/large/006tKfTcgy1fhu1vf4ih7j307s07sdfm.jpg)
122 | - Donate via Bitcoin: 13CwQLHzPYm2tewNMSJBeArbbRM5NSmCD1
123 |
124 | ## Sponsor
125 |
126 | - The CDN service is sponsored by [又拍云](https://console.upyun.com/register/?invite=BkLZ2Xqob)
127 |
128 | - Donate via OpenCollective
129 |
130 | [](https://opencollective.com/aplayer)
131 |
132 | ## Author
133 |
134 | **APlayer** © [DIYgod](https://github.com/DIYgod), Released under the [MIT](./LICENSE) License.
135 | Authored and maintained by DIYgod with help from contributors ([list](https://github.com/DIYgod/APlayer/contributors)).
136 |
137 | > [Blog](https://diygod.me) · GitHub [@DIYgod](https://github.com/DIYgod) · Twitter [@DIYgod](https://twitter.com/DIYgod) · Telegram Channel [@awesomeDIYgod](https://t.me/awesomeDIYgod)
138 |
--------------------------------------------------------------------------------
/dist/APlayer.min.css:
--------------------------------------------------------------------------------
1 | .aplayer-narrow{width:66px}.aplayer-narrow .aplayer-info{display:none}.aplayer-withlrc.aplayer-narrow{width:90px}.aplayer-withlrc.aplayer .aplayer-pic{height:90px;width:90px}.aplayer-withlrc.aplayer .aplayer-info{margin-left:90px;height:90px}.aplayer-withlrc.aplayer .aplayer-lrc{display:block}.aplayer-withlrc.aplayer .aplayer-info{padding:10px 7px 0}.aplayer-withlist.aplayer .aplayer-info{border-bottom:1px solid #e9e9e9}.aplayer-withlist.aplayer .aplayer-list{display:block}.aplayer-withlist.aplayer .aplayer-icon-menu{display:inline!important}.aplayer{font-family:Arial,Helvetica,sans-serif;margin:5px;-webkit-box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);border-radius:2px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:normal}.aplayer *{-webkit-box-sizing:content-box;box-sizing:content-box}.aplayer .aplayer-icon{width:15px;height:15px;border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;vertical-align:middle;padding:0;font-size:12px;margin:0;display:inline}.aplayer .aplayer-icon .aplayer-fill{-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.aplayer .aplayer-lrc-content{display:none}.aplayer .aplayer-pic{position:relative;float:left;height:66px;width:66px;background-image:url(data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAeAAD/4QMfaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzA2NyA3OS4xNTc3NDcsIDIwMTUvMDMvMzAtMjM6NDA6NDIgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4b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80aKqspaNvzap1LaRlM4noGZgOjVBC5+sqX1ejyj6aUp6vxf6tGUuac4ImwxbAkKlEzBywjHGUgermiRPLhFGYJ48Y01tDSXBg09Y2HG5+E5KSZZoUMo2AgZRkDiBLDiIBQq9n3ClcL9pf80JxSkny3k9fuqjBvcu4bYfLuDBWBh+MgoV/eMDDoMyZ4RIM0kETT8pxETPi6WmN9UKhJ+ncQTnpIUP2R1p3jZCMVOJ5igxYu2q1vmbtGwvn0JB7JRznbthOJoW8eQqHcqHU40K3nZAMFOKllJB/bHI9vuiTMU9M44o/MQkdk4tUbdsaDMUTXXNXeY6maChp5eTTNI5ClCQe6HThWN+3Rc/Bb6UtIV8SUH/NeEZ02zrhWOefdqognNKT5izzajgIbpz7gIkfzhhqs/TFk9J6b0w05+ZM+ZPl1wRay9kEUV4y+qXZGachyc8EEBKeMAnLCf8ACCCAzE5d8ZHMS64IIA7oy+HDqgggIEpYdUZJnpE84IICeScSJYwQQE8IIIID/9k=);background-size:cover;-webkit-transition:all .3s ease;transition:all .3s ease}.aplayer .aplayer-pic .aplayer-button{position:absolute;border-radius:50%;opacity:.8;cursor:pointer;text-shadow:0 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px rgba(0,0,0,.2);background:rgba(0,0,0,.2);-webkit-transition:all .1s ease;transition:all .1s ease}.aplayer .aplayer-pic .aplayer-button:hover{opacity:1}.aplayer .aplayer-pic .aplayer-button .aplayer-fill{fill:#fff}.aplayer .aplayer-pic .aplayer-hide{display:none}.aplayer .aplayer-pic .aplayer-play{width:26px;height:26px;border:2px solid #fff;bottom:50%;right:50%;margin:0 -15px -15px 0}.aplayer .aplayer-pic .aplayer-play .aplayer-icon-play{position:absolute;top:3px;left:4px;height:20px;width:20px}.aplayer .aplayer-pic .aplayer-pause{width:16px;height:16px;border:2px solid #fff;bottom:4px;right:4px}.aplayer .aplayer-pic .aplayer-pause .aplayer-icon-pause{position:absolute;top:2px;left:2px;height:12px;width:12px}.aplayer .aplayer-info{margin-left:66px;padding:14px 7px 0 10px;height:66px;-webkit-box-sizing:border-box;box-sizing:border-box}.aplayer .aplayer-info .aplayer-music{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 13px 5px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default;padding-bottom:2px}.aplayer .aplayer-info .aplayer-music .aplayer-title{font-size:14px}.aplayer .aplayer-info .aplayer-music .aplayer-author{font-size:12px;color:#666}.aplayer .aplayer-info .aplayer-controller{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;-webkit-box-flex:1;-ms-flex:1;flex:1}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar{position:relative;height:2px;width:100%;background:#cdcdcd}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded{position:absolute;left:0;top:0;bottom:0;background:#aaa;height:2px;-webkit-transition:all .5s ease;transition:all .5s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played{position:absolute;left:0;top:0;bottom:0;height:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:8px;width:8px;border-radius:50%;background:#fff;cursor:pointer!important}.aplayer .aplayer-info .aplayer-controller .aplayer-time{position:relative;right:0;bottom:3px;height:17px;color:#999;font-size:11px;padding-left:7px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner{vertical-align:middle}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon{cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon .aplayer-fill{fill:#666}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-mode{margin-right:4px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover .aplayer-fill{fill:#000}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-mode{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap{position:relative;display:inline-block;margin-left:3px;cursor:pointer!important}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap{display:block}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap{display:none;position:absolute;bottom:15px;right:-3px;width:25px;height:40px;z-index:99}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar{position:absolute;bottom:0;right:10px;width:5px;height:35px;background:#aaa}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume{position:absolute;bottom:0;right:0;width:5px;-webkit-transition:all .1s ease;transition:all .1s ease}.aplayer .aplayer-lrc{display:none;position:relative;height:30px;text-align:center;overflow:hidden;margin:-10px 0 7px}.aplayer .aplayer-lrc:before{top:0;height:10%;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(hsla(0,0%,100%,0)));background:linear-gradient(180deg,#fff 0,hsla(0,0%,100%,0));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00ffffff",GradientType=0)}.aplayer .aplayer-lrc:after,.aplayer .aplayer-lrc:before{position:absolute;z-index:1;display:block;overflow:hidden;width:100%;content:" "}.aplayer .aplayer-lrc:after{bottom:0;height:33%;background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,0)),to(hsla(0,0%,100%,.8)));background:linear-gradient(180deg,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.8));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff",endColorstr="#ccffffff",GradientType=0)}.aplayer .aplayer-lrc p{font-size:12px;color:#666;line-height:16px!important;height:16px!important;padding:0!important;margin:0!important;-webkit-transition:all .5s ease-out;transition:all .5s ease-out;opacity:.4;overflow:hidden}.aplayer .aplayer-lrc p.aplayer-lrc-current{opacity:1;overflow:visible;height:auto!important}.aplayer .aplayer-lrc .aplayer-lrc-contents{width:100%;-webkit-transition:all .5s ease-out;transition:all .5s ease-out;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default}.aplayer .aplayer-list{overflow:auto;-webkit-transition:all .5s ease;transition:all .5s ease;will-change:height;display:none}.aplayer .aplayer-list.aplayer-list-hide{height:0!important}.aplayer .aplayer-list::-webkit-scrollbar{width:5px}.aplayer .aplayer-list::-webkit-scrollbar-track{background-color:#f9f9f9}.aplayer .aplayer-list::-webkit-scrollbar-thumb{border-radius:3px;background-color:#eee}.aplayer .aplayer-list::-webkit-scrollbar-thumb:hover{background-color:#ccc}.aplayer .aplayer-list ol{list-style-type:none;margin:0;padding:0}.aplayer .aplayer-list ol li{position:relative;height:32px;line-height:32px;padding:0 15px;font-size:12px;border-top:1px solid #e9e9e9;cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease;overflow:hidden}.aplayer .aplayer-list ol li:first-child{border-top:none}.aplayer .aplayer-list ol li:hover{background:#efefef}.aplayer .aplayer-list ol li.aplayer-list-light{background:#e9e9e9}.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur{display:inline-block}.aplayer .aplayer-list ol li .aplayer-list-cur{display:none;width:3px;height:22px;position:absolute;left:0;top:5px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-index{color:#666;margin-right:12px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-author{color:#666;float:right;cursor:pointer}@-webkit-keyframes aplayer-roll{0%{left:0}to{left:-100%}}@keyframes aplayer-roll{0%{left:0}to{left:-100%}}
2 | /*# sourceMappingURL=APlayer.min.css.map*/
--------------------------------------------------------------------------------
/src/css/index.scss:
--------------------------------------------------------------------------------
1 | $aplayer-height: 66px;
2 | $lrc-height: 30px;
3 | $aplayer-height-lrc: $aplayer-height + $lrc-height - 6;
4 |
5 | .aplayer-narrow {
6 | width: $aplayer-height;
7 | .aplayer-info {
8 | display: none;
9 | }
10 | }
11 |
12 | .aplayer-withlrc {
13 | &.aplayer-narrow {
14 | width: $aplayer-height-lrc;
15 | }
16 | &.aplayer {
17 | .aplayer-pic {
18 | height: $aplayer-height-lrc;
19 | width: $aplayer-height-lrc;
20 | }
21 |
22 | .aplayer-info {
23 | margin-left: $aplayer-height-lrc;
24 | height: $aplayer-height-lrc;
25 | }
26 |
27 | .aplayer-lrc {
28 | display: block;
29 | }
30 |
31 | .aplayer-info {
32 | padding: 10px 7px 0 7px;
33 | }
34 | }
35 | }
36 |
37 | .aplayer-withlist {
38 | &.aplayer {
39 | .aplayer-info {
40 | border-bottom: 1px solid #e9e9e9;
41 | }
42 |
43 | .aplayer-list {
44 | display: block;
45 | }
46 |
47 | .aplayer-icon-menu {
48 | display: inline !important;
49 | }
50 | }
51 | }
52 |
53 | .aplayer {
54 | font-family: Arial, Helvetica, sans-serif;
55 | margin: 5px;
56 | box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
57 | border-radius: 2px;
58 | overflow: hidden;
59 | user-select: none;
60 | line-height: initial;
61 |
62 | * {
63 | box-sizing: content-box;
64 | }
65 |
66 | .aplayer-icon {
67 | width: 15px;
68 | height: 15px;
69 | border: none;
70 | background-color: transparent;
71 | outline: none;
72 | cursor: pointer;
73 | opacity: .8;
74 | vertical-align: middle;
75 | padding: 0;
76 | font-size: 12px;
77 | margin: 0;
78 | display: inline;
79 |
80 | .aplayer-fill {
81 | transition: all .2s ease-in-out;
82 | }
83 | }
84 |
85 | .aplayer-lrc-content {
86 | display: none;
87 | }
88 |
89 | .aplayer-pic {
90 | position: relative;
91 | float: left;
92 | height: $aplayer-height;
93 | width: $aplayer-height;
94 | background-image: url(data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAeAAD/4QMfaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzA2NyA3OS4xNTc3NDcsIDIwMTUvMDMvMzAtMjM6NDA6NDIgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE2NjQ3NUZBM0Y4RDExRTY4NzJCRDdCNkZCQTQ0MjNBIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE2NjQ3NUY5M0Y4RDExRTY4NzJCRDdCNkZCQTQ0MjNBIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVk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z7gIkfzhhqs/TFk9J6b0w05+ZM+ZPl1wRay9kEUV4y+qXZGachyc8EEBKeMAnLCf8ACCCAzE5d8ZHMS64IIA7oy+HDqgggIEpYdUZJnpE84IICeScSJYwQQE8IIIID/9k=);
95 | background-size: cover;
96 | transition: all 0.3s ease;
97 |
98 | .aplayer-button {
99 | position: absolute;
100 | border-radius: 50%;
101 | opacity: 0.8;
102 | cursor: pointer;
103 | text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
104 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
105 | background: rgba(0, 0, 0, 0.2);
106 | transition: all 0.1s ease;
107 | &:hover {
108 | opacity: 1;
109 | }
110 |
111 | .aplayer-fill {
112 | fill: #fff;
113 | }
114 | }
115 |
116 | .aplayer-hide {
117 | display: none;
118 | }
119 |
120 | .aplayer-play {
121 | width: 26px;
122 | height: 26px;
123 | border: 2px solid #fff;
124 | bottom: 50%;
125 | right: 50%;
126 | margin: 0 -15px -15px 0;
127 | .aplayer-icon-play {
128 | position: absolute;
129 | top: 3px;
130 | left: 4px;
131 | height: 20px;
132 | width: 20px;
133 | }
134 | }
135 |
136 | .aplayer-pause {
137 | width: 16px;
138 | height: 16px;
139 | border: 2px solid #fff;
140 | bottom: 4px;
141 | right: 4px;
142 | .aplayer-icon-pause {
143 | position: absolute;
144 | top: 2px;
145 | left: 2px;
146 | height: 12px;
147 | width: 12px;
148 | }
149 | }
150 | }
151 |
152 | .aplayer-info {
153 | margin-left: $aplayer-height;
154 | padding: 14px 7px 0 10px;
155 | height: $aplayer-height;
156 | box-sizing: border-box;
157 |
158 | .aplayer-music {
159 | overflow: hidden;
160 | white-space: nowrap;
161 | text-overflow: ellipsis;
162 | margin: 0 0 13px 5px;
163 | user-select: text;
164 | cursor: default;
165 | padding-bottom: 2px;
166 |
167 | .aplayer-title {
168 | font-size: 14px;
169 | }
170 |
171 | .aplayer-author {
172 | font-size: 12px;
173 | color: #666;
174 | }
175 | }
176 |
177 | .aplayer-controller {
178 | position: relative;
179 | display: flex;
180 |
181 | .aplayer-bar-wrap {
182 | margin: 0 0 0 5px;
183 | padding: 4px 0;
184 | cursor: pointer !important;
185 | flex: 1;
186 |
187 | .aplayer-bar {
188 | position: relative;
189 | height: 2px;
190 | width: 100%;
191 | background: #cdcdcd;
192 |
193 | .aplayer-loaded {
194 | position: absolute;
195 | left: 0;
196 | top: 0;
197 | bottom: 0;
198 | background: #aaa;
199 | height: 2px;
200 | transition: all 0.5s ease;
201 | }
202 |
203 | .aplayer-played {
204 | position: absolute;
205 | left: 0;
206 | top: 0;
207 | bottom: 0;
208 | height: 2px;
209 |
210 | .aplayer-thumb {
211 | position: absolute;
212 | top: 0;
213 | right: 5px;
214 | margin-top: -4px;
215 | margin-right: -10px;
216 | height: 8px;
217 | width: 8px;
218 | border-radius: 50%;
219 | background: #fff;
220 | cursor: pointer !important;
221 | }
222 | }
223 | }
224 | }
225 |
226 | .aplayer-time {
227 | position: relative;
228 | right: 0;
229 | bottom: 3px;
230 | height: 17px;
231 | color: #999;
232 | font-size: 11px;
233 | padding-left: 7px;
234 |
235 | .aplayer-time-inner {
236 | vertical-align: middle;
237 | }
238 |
239 | .aplayer-icon {
240 | cursor: pointer;
241 | transition: all 0.2s ease;
242 |
243 | .aplayer-fill {
244 | fill: #666;
245 | }
246 |
247 | &.aplayer-icon-mode {
248 | margin-right: 4px;
249 | }
250 |
251 | &:hover {
252 | .aplayer-fill {
253 | fill: #000;
254 | }
255 | }
256 |
257 | &.aplayer-icon-menu {
258 | display: none;
259 | }
260 | }
261 |
262 | &.aplayer-time-narrow {
263 | .aplayer-icon-mode {
264 | display: none;
265 | }
266 |
267 | .aplayer-icon-menu {
268 | display: none;
269 | }
270 | }
271 | }
272 |
273 | .aplayer-volume-wrap {
274 | position: relative;
275 | display: inline-block;
276 | margin-left: 3px;
277 | cursor: pointer !important;
278 |
279 | &:hover .aplayer-volume-bar-wrap {
280 | display: block;
281 | }
282 |
283 | .aplayer-volume-bar-wrap {
284 | display: none;
285 | position: absolute;
286 | bottom: 15px;
287 | right: -3px;
288 | width: 25px;
289 | height: 40px;
290 | z-index: 99;
291 |
292 | .aplayer-volume-bar {
293 | position: absolute;
294 | bottom: 0;
295 | right: 10px;
296 | width: 5px;
297 | height: 35px;
298 | background: #aaa;
299 |
300 | .aplayer-volume {
301 | position: absolute;
302 | bottom: 0;
303 | right: 0;
304 | width: 5px;
305 | transition: all 0.1s ease;
306 | }
307 | }
308 | }
309 | }
310 | }
311 | }
312 |
313 | .aplayer-lrc {
314 | display: none;
315 | position: relative;
316 | height: $lrc-height;
317 | text-align: center;
318 | overflow: hidden;
319 | margin: -10px 0 7px;
320 |
321 | &:before {
322 | position: absolute;
323 | top: 0;
324 | z-index: 1;
325 | display: block;
326 | overflow: hidden;
327 | width: 100%;
328 | height: 10%;
329 | content: ' ';
330 | background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
331 | background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
332 | background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
333 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 );
334 | }
335 |
336 | &:after {
337 | position: absolute;
338 | bottom: 0;
339 | z-index: 1;
340 | display: block;
341 | overflow: hidden;
342 | width: 100%;
343 | height: 33%;
344 | content: ' ';
345 | background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 100%);
346 | background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,0.8) 100%);
347 | background: linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,0.8) 100%);
348 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ccffffff',GradientType=0 );
349 | }
350 |
351 | p {
352 | font-size: 12px;
353 | color: #666;
354 | line-height: 16px !important;
355 | height: 16px !important;
356 | padding: 0 !important;
357 | margin: 0 !important;
358 | transition: all 0.5s ease-out;
359 | opacity: 0.4;
360 | overflow: hidden;
361 |
362 | &.aplayer-lrc-current {
363 | opacity: 1;
364 | overflow: visible;
365 | height: initial !important;
366 | }
367 | }
368 |
369 | .aplayer-lrc-contents {
370 | width: 100%;
371 | transition: all 0.5s ease-out;
372 | user-select: text;
373 | cursor: default;
374 | }
375 | }
376 |
377 | .aplayer-list {
378 | overflow: auto;
379 | transition: all 0.5s ease;
380 | will-change: height;
381 | display: none;
382 |
383 | &.aplayer-list-hide {
384 | height: 0 !important;
385 | }
386 |
387 | &::-webkit-scrollbar{
388 | width: 5px;
389 | }
390 | &::-webkit-scrollbar-track{
391 | background-color: #f9f9f9;
392 | }
393 | &::-webkit-scrollbar-thumb{
394 | border-radius: 3px;
395 | background-color: #eee;
396 | }
397 | &::-webkit-scrollbar-thumb:hover{
398 | background-color: #ccc;
399 | }
400 |
401 | ol {
402 | list-style-type: none;
403 | margin: 0;
404 | padding: 0;
405 |
406 | li {
407 | position: relative;
408 | height: 32px;
409 | line-height: 32px;
410 | padding: 0 15px;
411 | font-size: 12px;
412 | border-top: 1px solid #e9e9e9;
413 | cursor: pointer;
414 | transition: all 0.2s ease;
415 | overflow: hidden;
416 |
417 | &:first-child {
418 | border-top: none;
419 | }
420 |
421 | &:hover {
422 | background: #efefef;
423 | }
424 |
425 | &.aplayer-list-light {
426 | background: #e9e9e9;
427 |
428 | .aplayer-list-cur {
429 | display: inline-block;
430 | }
431 | }
432 |
433 | .aplayer-list-cur {
434 | display: none;
435 | width: 3px;
436 | height: 22px;
437 | position: absolute;
438 | left: 0;
439 | top: 5px;
440 | cursor: pointer;
441 | }
442 | .aplayer-list-index {
443 | color: #666;
444 | margin-right: 12px;
445 | cursor: pointer;
446 | }
447 | .aplayer-list-author {
448 | color: #666;
449 | float: right;
450 | cursor: pointer;
451 | }
452 | }
453 | }
454 | }
455 | }
456 |
457 | @keyframes aplayer-roll {
458 | 0%{left:0}
459 | 100%{left: -100%}
460 | }
461 |
--------------------------------------------------------------------------------
/dist/APlayer.min.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///./src/css/index.scss"],"names":[],"mappings":"AAAA,gBACE,UAAY,CACZ,8BACE,YAAc,CAElB,gCACE,UAAY,CAEd,sCACE,YACA,UAAY,CAEd,uCACE,iBACA,WAAa,CAEf,sCACE,aAAe,CAEjB,uCACE,kBAAwB,CAE1B,wCACE,+BAAiC,CAEnC,wCACE,aAAe,CAEjB,6CACE,wBAA2B,CAE7B,SACE,uCACA,WACA,yGACQ,iGACR,kBACA,gBACA,yBACG,sBACC,qBACI,iBACR,kBAAqB,CACrB,WACE,+BACQ,sBAAwB,CAClC,uBACE,WACA,YACA,YACA,6BACA,aACA,eACA,WACA,sBACA,UACA,eACA,SACA,cAAgB,CAChB,qCACE,uCACA,8BAAgC,CACpC,8BACE,YAAc,CAChB,sBACE,kBACA,WACA,YACA,WACA,8tIACA,sBACA,gCACA,uBAA0B,CAC1B,sCACE,kBACA,kBACA,WACA,eACA,qCACA,4CACQ,oCACR,0BACA,gCACA,uBAA0B,CAC1B,4CACE,SAAW,CACb,oDACE,SAAW,CACf,oCACE,YAAc,CAChB,oCACE,WACA,YACA,sBACA,WACA,UACA,sBAAwB,CACxB,uDACE,kBACA,QACA,SACA,YACA,UAAY,CAChB,qCACE,WACA,YACA,sBACA,WACA,SAAW,CACX,yDACE,kBACA,QACA,SACA,YACA,UAAY,CAClB,uBACE,iBACA,wBACA,YACA,8BACQ,qBAAuB,CAC/B,sCACE,gBACA,mBACA,uBACA,oBACA,yBACG,sBACC,qBACI,iBACR,eACA,kBAAoB,CACpB,qDACE,cAAgB,CAClB,sDACE,eACA,UAAY,CAChB,2CACE,kBACA,oBACA,oBACA,YAAc,CACd,6DACE,iBACA,cACA,yBACA,mBACI,WACI,MAAQ,CAChB,0EACE,kBACA,WACA,WACA,kBAAoB,CACpB,0FACE,kBACA,OACA,MACA,SACA,gBACA,WACA,gCACA,uBAA0B,CAC5B,0FACE,kBACA,OACA,MACA,SACA,UAAY,CACZ,yGACE,kBACA,MACA,UACA,gBACA,mBACA,WACA,UACA,kBACA,gBACA,wBAA2B,CACnC,yDACE,kBACA,QACA,WACA,YACA,WACA,eACA,gBAAkB,CAClB,6EACE,qBAAuB,CACzB,uEACE,eACA,gCACA,uBAA0B,CAC1B,qFACE,SAAW,CACb,yFACE,gBAAkB,CACpB,2FACE,SAAW,CAKf,yRACE,YAAc,CAClB,gEACE,kBACA,qBACA,gBACA,wBAA2B,CAC3B,+FACE,aAAe,CACjB,yFACE,aACA,kBACA,YACA,WACA,WACA,YACA,UAAY,CACZ,6GACE,kBACA,SACA,WACA,UACA,YACA,eAAiB,CACjB,6HACE,kBACA,SACA,QACA,UACA,gCACA,uBAA0B,CACtC,sBACE,aACA,kBACA,YACA,kBACA,gBACA,kBAAoB,CACpB,6BAEE,MAKA,WAEA,0FACA,4DACA,iHAAsH,CACxH,yDAXE,kBAEA,UACA,cACA,gBACA,WAEA,WAAa,CAe6G,4BAT1H,SAKA,WAEA,wGACA,0EACA,mHAAwH,CAC1H,wBACE,eACA,WACA,2BACA,sBACA,oBACA,mBACA,oCACA,4BACA,WACA,eAAiB,CACjB,4CACE,UACA,iBACA,qBAA2B,CAC/B,4CACE,WACA,oCACA,4BACA,yBACG,sBACC,qBACI,iBACR,cAAgB,CACpB,uBACE,cACA,gCACA,wBACA,mBACA,YAAc,CACd,yCACE,kBAAqB,CACvB,0CACE,SAAW,CACb,gDACE,wBAA0B,CAC5B,gDACE,kBACA,qBAAuB,CACzB,sDACE,qBAAuB,CACzB,0BACE,qBACA,SACA,SAAW,CACX,6BACE,kBACA,YACA,iBACA,eACA,eACA,6BACA,eACA,gCACA,wBACA,eAAiB,CACjB,yCACE,eAAiB,CACnB,mCACE,kBAAoB,CACtB,gDACE,kBAAoB,CACpB,kEACE,oBAAsB,CAC1B,+CACE,aACA,UACA,YACA,kBACA,OACA,QACA,cAAgB,CAClB,iDACE,WACA,kBACA,cAAgB,CAClB,kDACE,WACA,YACA,cAAgB,CAE1B,gCACE,GACE,MAAQ,CACV,GACE,UAAY,CAAE,CAElB,wBACE,GACE,MAAQ,CACV,GACE,UAAY,CAAE","file":"APlayer.min.css","sourcesContent":[".aplayer-narrow {\n width: 66px; }\n .aplayer-narrow .aplayer-info {\n display: none; }\n\n.aplayer-withlrc.aplayer-narrow {\n width: 90px; }\n\n.aplayer-withlrc.aplayer .aplayer-pic {\n height: 90px;\n width: 90px; }\n\n.aplayer-withlrc.aplayer .aplayer-info {\n margin-left: 90px;\n height: 90px; }\n\n.aplayer-withlrc.aplayer .aplayer-lrc {\n display: block; }\n\n.aplayer-withlrc.aplayer .aplayer-info {\n padding: 10px 7px 0 7px; }\n\n.aplayer-withlist.aplayer .aplayer-info {\n border-bottom: 1px solid #e9e9e9; }\n\n.aplayer-withlist.aplayer .aplayer-list {\n display: block; }\n\n.aplayer-withlist.aplayer .aplayer-icon-menu {\n display: inline !important; }\n\n.aplayer {\n font-family: Arial, Helvetica, sans-serif;\n margin: 5px;\n -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n border-radius: 2px;\n overflow: hidden;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n line-height: initial; }\n .aplayer * {\n -webkit-box-sizing: content-box;\n box-sizing: content-box; }\n .aplayer .aplayer-icon {\n width: 15px;\n height: 15px;\n border: none;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n opacity: .8;\n vertical-align: middle;\n padding: 0;\n font-size: 12px;\n margin: 0;\n display: inline; }\n .aplayer .aplayer-icon .aplayer-fill {\n -webkit-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out; }\n .aplayer .aplayer-lrc-content {\n display: none; }\n .aplayer .aplayer-pic {\n position: relative;\n float: left;\n height: 66px;\n width: 66px;\n background-image: url(data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAeAAD/4QMfaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzA2NyA3OS4xNTc3NDcsIDIwMTUvMDMvMzAtMjM6NDA6NDIgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE2NjQ3NUZBM0Y4RDExRTY4NzJCRDdCNkZCQTQ0MjNBIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE2NjQ3NUY5M0Y4RDExRTY4NzJCRDdCNkZCQTQ0MjNBIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSI5O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wRay9kEUV4y+qXZGachyc8EEBKeMAnLCf8ACCCAzE5d8ZHMS64IIA7oy+HDqgggIEpYdUZJnpE84IICeScSJYwQQE8IIIID/9k=);\n background-size: cover;\n -webkit-transition: all 0.3s ease;\n transition: all 0.3s ease; }\n .aplayer .aplayer-pic .aplayer-button {\n position: absolute;\n border-radius: 50%;\n opacity: 0.8;\n cursor: pointer;\n text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n background: rgba(0, 0, 0, 0.2);\n -webkit-transition: all 0.1s ease;\n transition: all 0.1s ease; }\n .aplayer .aplayer-pic .aplayer-button:hover {\n opacity: 1; }\n .aplayer .aplayer-pic .aplayer-button .aplayer-fill {\n fill: #fff; }\n .aplayer .aplayer-pic .aplayer-hide {\n display: none; }\n .aplayer .aplayer-pic .aplayer-play {\n width: 26px;\n height: 26px;\n border: 2px solid #fff;\n bottom: 50%;\n right: 50%;\n margin: 0 -15px -15px 0; }\n .aplayer .aplayer-pic .aplayer-play .aplayer-icon-play {\n position: absolute;\n top: 3px;\n left: 4px;\n height: 20px;\n width: 20px; }\n .aplayer .aplayer-pic .aplayer-pause {\n width: 16px;\n height: 16px;\n border: 2px solid #fff;\n bottom: 4px;\n right: 4px; }\n .aplayer .aplayer-pic .aplayer-pause .aplayer-icon-pause {\n position: absolute;\n top: 2px;\n left: 2px;\n height: 12px;\n width: 12px; }\n .aplayer .aplayer-info {\n margin-left: 66px;\n padding: 14px 7px 0 10px;\n height: 66px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n .aplayer .aplayer-info .aplayer-music {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: 0 0 13px 5px;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n cursor: default;\n padding-bottom: 2px; }\n .aplayer .aplayer-info .aplayer-music .aplayer-title {\n font-size: 14px; }\n .aplayer .aplayer-info .aplayer-music .aplayer-author {\n font-size: 12px;\n color: #666; }\n .aplayer .aplayer-info .aplayer-controller {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap {\n margin: 0 0 0 5px;\n padding: 4px 0;\n cursor: pointer !important;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar {\n position: relative;\n height: 2px;\n width: 100%;\n background: #cdcdcd; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n background: #aaa;\n height: 2px;\n -webkit-transition: all 0.5s ease;\n transition: all 0.5s ease; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n height: 2px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {\n position: absolute;\n top: 0;\n right: 5px;\n margin-top: -4px;\n margin-right: -10px;\n height: 8px;\n width: 8px;\n border-radius: 50%;\n background: #fff;\n cursor: pointer !important; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time {\n position: relative;\n right: 0;\n bottom: 3px;\n height: 17px;\n color: #999;\n font-size: 11px;\n padding-left: 7px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner {\n vertical-align: middle; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon {\n cursor: pointer;\n -webkit-transition: all 0.2s ease;\n transition: all 0.2s ease; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon .aplayer-fill {\n fill: #666; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-mode {\n margin-right: 4px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover .aplayer-fill {\n fill: #000; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu {\n display: none; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-mode {\n display: none; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-menu {\n display: none; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap {\n position: relative;\n display: inline-block;\n margin-left: 3px;\n cursor: pointer !important; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap {\n display: block; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap {\n display: none;\n position: absolute;\n bottom: 15px;\n right: -3px;\n width: 25px;\n height: 40px;\n z-index: 99; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar {\n position: absolute;\n bottom: 0;\n right: 10px;\n width: 5px;\n height: 35px;\n background: #aaa; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 5px;\n -webkit-transition: all 0.1s ease;\n transition: all 0.1s ease; }\n .aplayer .aplayer-lrc {\n display: none;\n position: relative;\n height: 30px;\n text-align: center;\n overflow: hidden;\n margin: -10px 0 7px; }\n .aplayer .aplayer-lrc:before {\n position: absolute;\n top: 0;\n z-index: 1;\n display: block;\n overflow: hidden;\n width: 100%;\n height: 10%;\n content: ' ';\n background: -webkit-gradient(linear, left top, left bottom, from(white), to(rgba(255, 255, 255, 0)));\n background: linear-gradient(to bottom, white 0%, rgba(255, 255, 255, 0) 100%);\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 ); }\n .aplayer .aplayer-lrc:after {\n position: absolute;\n bottom: 0;\n z-index: 1;\n display: block;\n overflow: hidden;\n width: 100%;\n height: 33%;\n content: ' ';\n background: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0)), to(rgba(255, 255, 255, 0.8)));\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 100%);\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ccffffff',GradientType=0 ); }\n .aplayer .aplayer-lrc p {\n font-size: 12px;\n color: #666;\n line-height: 16px !important;\n height: 16px !important;\n padding: 0 !important;\n margin: 0 !important;\n -webkit-transition: all 0.5s ease-out;\n transition: all 0.5s ease-out;\n opacity: 0.4;\n overflow: hidden; }\n .aplayer .aplayer-lrc p.aplayer-lrc-current {\n opacity: 1;\n overflow: visible;\n height: initial !important; }\n .aplayer .aplayer-lrc .aplayer-lrc-contents {\n width: 100%;\n -webkit-transition: all 0.5s ease-out;\n transition: all 0.5s ease-out;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n cursor: default; }\n .aplayer .aplayer-list {\n overflow: auto;\n -webkit-transition: all 0.5s ease;\n transition: all 0.5s ease;\n will-change: height;\n display: none; }\n .aplayer .aplayer-list.aplayer-list-hide {\n height: 0 !important; }\n .aplayer .aplayer-list::-webkit-scrollbar {\n width: 5px; }\n .aplayer .aplayer-list::-webkit-scrollbar-track {\n background-color: #f9f9f9; }\n .aplayer .aplayer-list::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: #eee; }\n .aplayer .aplayer-list::-webkit-scrollbar-thumb:hover {\n background-color: #ccc; }\n .aplayer .aplayer-list ol {\n list-style-type: none;\n margin: 0;\n padding: 0; }\n .aplayer .aplayer-list ol li {\n position: relative;\n height: 32px;\n line-height: 32px;\n padding: 0 15px;\n font-size: 12px;\n border-top: 1px solid #e9e9e9;\n cursor: pointer;\n -webkit-transition: all 0.2s ease;\n transition: all 0.2s ease;\n overflow: hidden; }\n .aplayer .aplayer-list ol li:first-child {\n border-top: none; }\n .aplayer .aplayer-list ol li:hover {\n background: #efefef; }\n .aplayer .aplayer-list ol li.aplayer-list-light {\n background: #e9e9e9; }\n .aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur {\n display: inline-block; }\n .aplayer .aplayer-list ol li .aplayer-list-cur {\n display: none;\n width: 3px;\n height: 22px;\n position: absolute;\n left: 0;\n top: 5px;\n cursor: pointer; }\n .aplayer .aplayer-list ol li .aplayer-list-index {\n color: #666;\n margin-right: 12px;\n cursor: pointer; }\n .aplayer .aplayer-list ol li .aplayer-list-author {\n color: #666;\n float: right;\n cursor: pointer; }\n\n@-webkit-keyframes aplayer-roll {\n 0% {\n left: 0; }\n 100% {\n left: -100%; } }\n\n@keyframes aplayer-roll {\n 0% {\n left: 0; }\n 100% {\n left: -100%; } }\n\n\n\n// WEBPACK FOOTER //\n// ./src/css/index.scss"],"sourceRoot":""}
--------------------------------------------------------------------------------
/dist/APlayer.min.js:
--------------------------------------------------------------------------------
1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("APlayer",[],t):"object"==typeof exports?exports.APlayer=t():e.APlayer=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(i){if(a[i])return a[i].exports;var s=a[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var a={};return t.m=e,t.c=a,t.d=function(e,a,i){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=0)}([function(e,t,a){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t",h=0;h
${this.lrc[i][1]}
`; 683 | } 684 | this.lrcContents.innerHTML = lrcHTML; 685 | if (!this.lrcIndex) { 686 | this.lrcIndex = 0; 687 | } 688 | this.lrcContents.getElementsByTagName('p')[0].classList.add('aplayer-lrc-current'); 689 | this.lrcContents.style.transform = 'translateY(0px)'; 690 | this.lrcContents.style.webkitTransform = 'translateY(0px)'; 691 | } 692 | }; 693 | const apiurl = this.option.music[index].lrc; 694 | xhr.open('get', apiurl, true); 695 | xhr.send(null); 696 | } 697 | if (lrcs) { 698 | this.lrcs[index] = parseLrc(lrcs); 699 | } 700 | else { 701 | if (this.option.showlrc === 3) { 702 | this.lrcs[index] = [['00:00', 'Loading']]; 703 | } 704 | else { 705 | this.lrcs[index] = [['00:00', 'Not available']]; 706 | } 707 | } 708 | } 709 | 710 | this.lrc = this.lrcs[index]; 711 | let lrcHTML = ''; 712 | this.lrcContents = this.element.getElementsByClassName('aplayer-lrc-contents')[0]; 713 | for (let i = 0; i < this.lrc.length; i++) { 714 | lrcHTML += `${this.lrc[i][1]}
`; 715 | } 716 | this.lrcContents.innerHTML = lrcHTML; 717 | if (!this.lrcIndex) { 718 | this.lrcIndex = 0; 719 | } 720 | this.lrcContents.getElementsByTagName('p')[0].classList.add('aplayer-lrc-current'); 721 | this.lrcContents.style.transform = 'translateY(0px)'; 722 | this.lrcContents.style.webkitTransform = 'translateY(0px)'; 723 | } 724 | 725 | // set duration time 726 | if (this.audio.duration !== 1) { // compatibility: Android browsers will output 1 at first 727 | this.element.getElementsByClassName('aplayer-dtime')[0].innerHTML = this.audio.duration ? this.secondToTime(this.audio.duration) : '00:00'; 728 | } 729 | } 730 | 731 | /** 732 | * Play music 733 | */ 734 | play (time) { 735 | if (Object.prototype.toString.call(time) === '[object Number]') { 736 | this.audio.currentTime = time; 737 | } 738 | if (this.audio.paused) { 739 | this.audio.play(); 740 | } 741 | } 742 | 743 | /** 744 | * Pause music 745 | */ 746 | pause () { 747 | if (!this.audio.paused) { 748 | this.audio.pause(); 749 | } 750 | } 751 | 752 | /** 753 | * Set volume 754 | */ 755 | volume (percentage) { 756 | this.updateBar('volume', percentage, 'height'); 757 | this.audio.volume = percentage; 758 | if (this.audio.muted) { 759 | this.audio.muted = false; 760 | } 761 | if (percentage === 1) { 762 | this.volumeicon.className = 'aplayer-icon aplayer-icon-volume-up'; 763 | this.volumeicon.innerHTML = this.getSVG('volume-up'); 764 | } 765 | else { 766 | this.volumeicon.className = 'aplayer-icon aplayer-icon-volume-down'; 767 | this.volumeicon.innerHTML = this.getSVG('volume-down'); 768 | } 769 | } 770 | 771 | /** 772 | * attach event 773 | */ 774 | on (name, func) { 775 | if (typeof func === 'function') { 776 | this.event[name].push(func); 777 | } 778 | } 779 | 780 | /** 781 | * toggle between play and pause 782 | */ 783 | toggle () { 784 | if (this.button.classList.contains('aplayer-play')) { 785 | this.play(); 786 | } 787 | else if (this.button.classList.contains('aplayer-pause')) { 788 | this.pause(); 789 | } 790 | } 791 | 792 | /** 793 | * get whether multiple music definitions are loaded 794 | */ 795 | isMultiple () { 796 | return this.option.music.length > 1; 797 | } 798 | 799 | /** 800 | * get random order, using Fisher–Yates shuffle 801 | */ 802 | getRandomOrder () { 803 | function random (min, max) { 804 | if (max) { 805 | max = min; 806 | min = 0; 807 | } 808 | return min + Math.floor(Math.random() * (max - min + 1)); 809 | } 810 | function shuffle (arr) { 811 | const length = arr.length, 812 | shuffled = new Array(length); 813 | for (let index = 0, rand; index < length; index++) { 814 | rand = random(0, index); 815 | if (rand !== index) {shuffled[index] = shuffled[rand];} 816 | shuffled[rand] = arr[index]; 817 | } 818 | return shuffled; 819 | } 820 | if (this.isMultiple()) { 821 | this.randomOrder = shuffle([...Array(this.option.music.length)].map(function (item, i) { 822 | return i; 823 | })); 824 | } 825 | } 826 | 827 | /** 828 | * get next random number 829 | */ 830 | nextRandomNum () { 831 | if (this.isMultiple()) { 832 | const index = this.randomOrder.indexOf(this.playIndex); 833 | if (index === this.randomOrder.length - 1) { 834 | return this.randomOrder[0]; 835 | } 836 | else { 837 | return this.randomOrder[index + 1]; 838 | } 839 | } 840 | else { 841 | return 0; 842 | } 843 | } 844 | 845 | /** 846 | * Remove song from playlist 847 | */ 848 | removeSong (indexOfSong) { 849 | if (this.option.music[indexOfSong]) { // Check if song exists 850 | const list = this.element.getElementsByClassName('aplayer-list')[0]; 851 | const oList = list.getElementsByTagName('ol')[0]; 852 | const liList = oList.getElementsByTagName('li'); 853 | if (this.option.music[indexOfSong + 1] || this.option.music[indexOfSong - 1]) { 854 | if (indexOfSong === this.playIndex) { 855 | if (this.option.music[indexOfSong + 1]) { // Play next song if it exists. 856 | this.setMusic(indexOfSong + 1); 857 | this.playIndex = this.playIndex - 1; // Adjust play index for removed song 858 | } 859 | else if (!this.option.music[indexOfSong + 1]) { // Play previous song if it exists. 860 | this.setMusic(indexOfSong - 1); 861 | } 862 | } 863 | else { 864 | if (indexOfSong < this.playIndex) { 865 | this.playIndex = this.playIndex - 1; 866 | } 867 | } 868 | if (liList[indexOfSong + 1]) { 869 | const targetSong = liList[indexOfSong - 1]; 870 | targetSong.getElementsByClassName('aplayer-list-index')[0].textContent = indexOfSong; 871 | } 872 | else { 873 | for (let i = 1; i < liList.length; i++) { 874 | if (liList[indexOfSong + i]) { 875 | const targetSong = liList[indexOfSong + i]; 876 | targetSong.getElementsByClassName('aplayer-list-index')[0].textContent = indexOfSong + i; 877 | } 878 | } 879 | } 880 | this.option.music.splice(indexOfSong, 1); // Delete song from music array 881 | this.audios.splice(indexOfSong, 1); // Delete song from audios array 882 | liList[indexOfSong].remove(); 883 | if (this.option.music[0] && this.option.music[1]) { 884 | this.multiple = false; 885 | this.element.classList.remove('aplayer-withlist'); 886 | } 887 | } 888 | const listHeight = parseInt(list.style.height, 10); 889 | list.style.height = listHeight - 33 + "px"; 890 | } 891 | else { 892 | console.error("ERROR: Song does not exist"); 893 | } 894 | } 895 | 896 | /** 897 | * destroy this player 898 | */ 899 | destroy () { 900 | instances.splice(instances.indexOf(this), 1); 901 | this.pause(); 902 | this.element.innerHTML = ''; 903 | clearInterval(this.playedTime); 904 | for (const key in this) { 905 | if (this.hasOwnProperty(key)) { 906 | delete this[key]; 907 | } 908 | } 909 | } 910 | 911 | /** 912 | * add music dynamically 913 | * 914 | * @param {Array} newMusic 915 | */ 916 | addMusic (newMusic) { 917 | const wasSingle = !this.isMultiple(); 918 | 919 | this.option.music = this.option.music.concat(newMusic); 920 | 921 | const list = this.element.getElementsByClassName('aplayer-list')[0]; 922 | const listEle = list.getElementsByTagName('ol')[0]; 923 | let newItemHTML = ``; 924 | for (let i = 0; i < newMusic.length; i++) { 925 | newItemHTML += ` 926 |