24 Commits
Author SHA1 Message Date
DIYgod a1948749cd build with webpack 2016-07-11 21:13:39 +08:00
DIYgod d2b673db39 fix long list title display error 2016-07-11 11:22:15 +08:00
DIYgod d116c75a09 improve UI; new API: toggle 2016-07-11 10:16:53 +08:00
DIYgod a5cc501f3b font -> inline svg 2016-07-08 16:15:22 +08:00
DIYgod 96b49d2734 change License 2016-07-08 12:20:11 +08:00
DIYgod 9f9ded6e1e API: play volume; Bug: encodeURI image link 2016-07-08 11:25:34 +08:00
DIYgod 12fc04957d new option: preload 2016-06-13 14:23:51 +08:00
DIYgod c5776b2a78 fix bugs in HTML 2016-06-13 14:06:27 +08:00
DIYgod 548faa4bf3 add related project: 163music-APlayer-you-get-docker 2016-05-15 18:32:58 +08:00
DIYgod 91566de67a new npm version 2016-05-14 22:38:42 +08:00
DIYgod 7b8ad10c04 Fix bug: multiple ended event in iOS; clicking list error in mobile 2016-05-14 22:37:48 +08:00
DIYgod 47270238cb Fix bug: Symbol is not defined 2016-05-14 21:40:03 +08:00
DIYgod 04e950b1eb bugs with mutex 2016-05-14 20:04:41 +08:00
DIYgod 54f9d5dcf9 new demo link 2016-05-14 15:44:20 +08:00
DIYgod 2b6ba28167 rm CNAME 2016-05-14 15:13:35 +08:00
DIYgod 10ad8cd38d CNAME 2016-05-14 00:55:46 +08:00
DIYgod adb2cd4ed8 change demo link 2016-05-12 18:11:53 +08:00
DIYgod f1bc748330 optimize 2016-05-10 01:00:16 +08:00
DIYgod 008552940f new demo page 2016-05-05 20:59:31 +08:00
DIYgod 40d95344fd fix drag bug, new option: loop 2016-05-05 20:57:30 +08:00
Wenjie Fan da71e49dc0 Merge pull request #41 from micooz/improve-mutex
Improve mutex
2016-05-02 00:02:09 +08:00
Micooz b019271309 update dist/* 2016-05-01 21:27:36 +08:00
Micooz 5206eed8e5 deprecate vars outside class 2016-05-01 21:27:17 +08:00
Micooz 82b7f777f6 remove redundant semicolon 2016-05-01 21:00:29 +08:00
22 changed files with 866 additions and 803 deletions
+37
View File
@@ -0,0 +1,37 @@
The Star And Thank Author License (SATA)
Copyright (c) 2016 DIYgod(i@html.love)
Project Url: https://github.com/DIYgod/APlayer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
And wait, the most important, you shall star/+1/like the project(s) in project url
section above first, and then thank the author(s) in Copyright section.
Here are some suggested ways:
- Email the authors a thank-you letter, and make friends with him/her/them.
- Report bugs or issues.
- Tell friends what a wonderful project this is.
- And, sure, you can just express thanks in your mind without telling the world.
Contributors of this project by forking have the option to add his/her name and
forked project url at copyright and project url sections, but shall not delete
or modify anything else in these two sections.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+16 -10
View File
@@ -1,19 +1,19 @@
# APlayer # APlayer
[![npm](https://img.shields.io/npm/v/aplayer.svg?style=flat-square)](https://www.npmjs.com/package/aplayer) [![npm](https://img.shields.io/npm/v/aplayer.svg?style=flat-square)](https://www.npmjs.com/package/aplayer)
[![npm](https://img.shields.io/npm/l/aplayer.svg?style=flat-square)](https://www.npmjs.com/package/aplayer) [![npm](https://img.shields.io/npm/l/aplayer.svg?style=flat-square)](https://github.com/DIYgod/APlayer/blob/master/LICENSE)
[![devDependency Status](https://img.shields.io/david/dev/DIYgod/aplayer.svg?style=flat-square)](https://david-dm.org/DIYgod/APlayer#info=devDependencies) [![devDependency Status](https://img.shields.io/david/dev/DIYgod/aplayer.svg?style=flat-square)](https://david-dm.org/DIYgod/APlayer#info=devDependencies)
[![npm](https://img.shields.io/npm/dt/aplayer.svg?style=flat-square)](https://www.npmjs.com/package/aplayer) [![npm](https://img.shields.io/npm/dt/aplayer.svg?style=flat-square)](https://www.npmjs.com/package/aplayer)
[![Travis](https://img.shields.io/travis/DIYgod/APlayer.svg?style=flat-square)](https://travis-ci.org/DIYgod/APlayer) [![Travis](https://img.shields.io/travis/DIYgod/APlayer.svg?style=flat-square)](https://travis-ci.org/DIYgod/APlayer)
[![%e2%9d%a4](https://img.shields.io/badge/made%20with-%e2%9d%a4-ff69b4.svg?style=flat-square)](https://www.anotherhome.net/) [![%e2%9d%a4](https://img.shields.io/badge/made%20with-%e2%9d%a4-ff69b4.svg?style=flat-square)](https://www.anotherhome.net/)
Wow, such a beautiful html5 music player > Wow, such a beautiful html5 music player
## Introduction ## Introduction
UI 参考网易云音乐外链播放器 UI 参考网易云音乐外链播放器
[Demo](https://www.anotherhome.net/file/APlayer) [Demo](http://aplayer.js.org)
Screenshot Screenshot
![image](https://i.imgur.com/JDrJXCr.png) ![image](https://i.imgur.com/JDrJXCr.png)
@@ -33,8 +33,6 @@ $ npm install aplayer --save
### HTML ### HTML
```HTML ```HTML
<link rel="stylesheet" href="APlayer.min.css">
<!-- ... -->
<div id="player1" class="aplayer"></div> <div id="player1" class="aplayer"></div>
<!-- ... --> <!-- ... -->
<script src="APlayer.min.js"></script> <script src="APlayer.min.js"></script>
@@ -57,6 +55,8 @@ var option = {
showlrc: 0, // Optional, show lrc, can be 0, 1, 2, see: ###With lrc showlrc: 0, // Optional, show lrc, can be 0, 1, 2, see: ###With lrc
mutex: true, // Optional, pause other players when this player playing mutex: true, // Optional, pause other players when this player playing
theme: '#e6d0b2', // Optional, theme color, default: #b7daff theme: '#e6d0b2', // Optional, theme color, default: #b7daff
loop: true, // Optional, loop play music, default: true
preload: 'metadata', // Optional, the way to load music, can be 'none' 'metadata' 'auto', default: 'metadata' in Desktop, 'none' in mobile
music: { // Required, music info, see: ###With playlist music: { // Required, music info, see: ###With playlist
title: 'Preparation', // Required, music title title: 'Preparation', // Required, music title
author: 'Hans Zimmer/Richard Harvey', // Required, music author author: 'Hans Zimmer/Richard Harvey', // Required, music author
@@ -70,8 +70,12 @@ var option = {
#### API #### API
+ `ap.init()` + `ap.init()`
+ `ap.play()` + `ap.play()` // Resume play
+ `ap.pause()` + `ap.play(time)` // Set currentTime
+ `ap.pause()` // Pause
+ `ap.toggle()` // Toggle between play and pause
+ `ap.volume(percentage)` // Set volume
+ `ap.on(event, handler)` // Event binding
#### Event binding #### Event binding
@@ -190,11 +194,13 @@ $ npm run build
## Related Projects ## Related Projects
+ [APlayer-Typecho-Plugin](https://github.com/zgq354/APlayer-Typecho-Plugin) - [APlayer-Typecho-Plugin](https://github.com/zgq354/APlayer-Typecho-Plugin)
+ [hexo-tag-aplayer](https://github.com/grzhan/hexo-tag-aplayer) - [hexo-tag-aplayer](https://github.com/grzhan/hexo-tag-aplayer)
- [163music-APlayer-you-get-docker](https://github.com/YUX-IO/163music-APlayer-you-get-docker)
## LICENSE ## LICENSE
MIT © [DIYgod](http://github.com/DIYgod) [The Star And Thank Author License (SATA)](https://github.com/DIYgod/APlayer/blob/master/LICENSE)
+19 -18
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -4,7 +4,6 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>APlayer Demo</title> <title>APlayer Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../dist/APlayer.min.css">
<style> <style>
body { body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
-1
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

BIN
View File
Binary file not shown.
-20
View File
@@ -1,20 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
<defs>
<font id="fontello" horiz-adv-x="1000" >
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="volume-off" unicode="&#xe800;" d="m429 654v-608q0-14-11-25t-25-10-25 10l-186 186h-146q-15 0-25 11t-11 25v214q0 15 11 25t25 11h146l186 186q10 10 25 10t25-10 11-25z" horiz-adv-x="428.6" />
<glyph glyph-name="volume-down" unicode="&#xe801;" d="m429 654v-608q0-14-11-25t-25-10-25 10l-186 186h-146q-15 0-25 11t-11 25v214q0 15 11 25t25 11h146l186 186q10 10 25 10t25-10 11-25z m214-304q0-42-24-79t-63-52q-5-3-14-3-14 0-25 10t-10 26q0 12 6 20t17 14 19 12 16 20 6 32-6 32-16 20-19 12-17 14-6 20q0 15 10 26t25 10q9 0 14-3 39-15 63-52t24-79z" horiz-adv-x="642.9" />
<glyph glyph-name="volume-up" unicode="&#xe802;" d="m429 654v-608q0-14-11-25t-25-10-25 10l-186 186h-146q-15 0-25 11t-11 25v214q0 15 11 25t25 11h146l186 186q10 10 25 10t25-10 11-25z m214-304q0-42-24-79t-63-52q-5-3-14-3-14 0-25 10t-10 26q0 12 6 20t17 14 19 12 16 20 6 32-6 32-16 20-19 12-17 14-6 20q0 15 10 26t25 10q9 0 14-3 39-15 63-52t24-79z m143 0q0-85-48-158t-125-105q-8-3-14-3-15 0-26 11t-10 25q0 22 21 33 32 16 43 25 41 30 64 75t23 97-23 97-64 75q-11 9-43 25-21 11-21 33 0 14 10 25t25 11q7 0 15-3 78-33 125-105t48-158z m143 0q0-128-71-236t-189-158q-7-3-14-3-15 0-26 11t-10 25q0 20 22 33 4 2 12 6t13 6q25 14 45 28 69 51 108 127t38 161-38 161-108 127q-20 14-45 28-4 3-13 6t-12 6q-22 13-22 33 0 14 10 25t26 11q7 0 14-3 118-51 189-158t71-236z" horiz-adv-x="928.6" />
<glyph glyph-name="loop" unicode="&#xe803;" d="m800 540q42 0 71-29t29-71l0-290q0-40-29-70t-71-30l-700 0q-40 0-70 30t-30 70l0 290q0 42 30 71t70 29l250 0 0 110 200-180-200-180 0 110-210 0 0-210 620 0 0 210-150 0 0 140 190 0z" horiz-adv-x="900" />
<glyph glyph-name="play" unicode="&#xe806;" d="m486 376q14-10 14-26 0-14-14-24l-428-266q-24-16-41-6t-17 40l0 514q0 30 17 40t41-6z" horiz-adv-x="500" />
<glyph glyph-name="pause" unicode="&#xe807;" d="m440 700q90 0 90-64l0-570q0-66-90-66t-90 66l0 570q0 64 90 64z m-350 0q90 0 90-64l0-570q0-66-90-66t-90 66l0 570q0 64 90 64z" horiz-adv-x="530" />
<glyph glyph-name="to-start" unicode="&#xe808;" d="m174 350q0 14 14 24l364 228q20 14 34 5t14-35l0-442q0-26-14-35t-34 5l-364 228q-14 10-14 22z m-174 234q0 58 76 58 74 0 74-58l0-466q0-58-74-58-76 0-76 58l0 466z" horiz-adv-x="600" />
<glyph glyph-name="to-end" unicode="&#xe809;" d="m412 374q14-10 14-24 0-12-14-22l-362-228q-22-14-36-5t-14 35l0 442q0 26 14 35t36-5z m114 268q74 0 74-58l0-466q0-58-74-58-76 0-76 58l0 466q0 58 76 58z" horiz-adv-x="600" />
<glyph glyph-name="menu" unicode="&#xe80b;" d="m650 400q22 0 36-15t14-35-15-35-35-15l-600 0q-20 0-35 15t-15 35 14 35 36 15l600 0z m-600 100q-20 0-35 15t-15 35 14 35 36 15l600 0q22 0 36-15t14-35-15-35-35-15l-600 0z m600-300q22 0 36-15t14-35-15-35-35-15l-600 0q-20 0-35 15t-15 35 14 35 36 15l600 0z" horiz-adv-x="700" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
-71
View File
@@ -1,71 +0,0 @@
var gulp = require('gulp');
var sass = require('gulp-sass');
var prefix = require('gulp-autoprefixer');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var cssNano = require('gulp-cssnano');
var rename = require('gulp-rename');
var babel = require("gulp-babel");
var sourcemaps = require("gulp-sourcemaps");
var browserSync = require('browser-sync').create();
// Launch the server
gulp.task('browser-sync', function() {
browserSync.init({
server: {
baseDir: './'
},
startPath: '/demo'
});
});
// Move files
gulp.task('copy', function () {
gulp.src('src/font/*')
.pipe(gulp.dest('dist/font'));
gulp.src(['src/*.jpg', 'src/*.png'])
.pipe(gulp.dest('dist'));
});
// Build js files
gulp.task('compressJS', function() {
gulp.src(['src/*.js'])
.pipe(sourcemaps.init())
.pipe(babel({
presets: ['es2015']
}))
.pipe(uglify())
.pipe(rename({
suffix: ".min"
}))
.pipe(sourcemaps.write("."))
.pipe(gulp.dest('dist'))
.pipe(browserSync.stream());
});
// Build css files
gulp.task('compressCSS', function() {
gulp.src('src/*.scss')
.pipe(sass())
.pipe(prefix(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], { cascade: true }))
.pipe(cssNano())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest('dist'))
.pipe(browserSync.stream());
});
// Watch files for changes & recompile
gulp.task('watch', function () {
gulp.watch(['src/*.js'], ['compressJS']);
gulp.watch(['src/*.scss'], ['compressCSS']);
gulp.watch('demo/*.html').on('change', browserSync.reload);
gulp.watch('demo/font/*', ['copy']);
});
// compile the project, including move font, compress js and scss, also be used to test
gulp.task('release', ['copy', 'compressJS', 'compressCSS']);
// Default task, running just `gulp` will move font, compress js and scss, launch server, watch files.
gulp.task('default', ['release', 'browser-sync', 'watch']);
+17 -16
View File
@@ -1,12 +1,11 @@
{ {
"name": "aplayer", "name": "aplayer",
"version": "1.4.2", "version": "1.5.0",
"description": "Wow, such a beautiful html5 music player", "description": "Wow, such a beautiful html5 music player",
"main": "dist/APlayer.min.js", "main": "dist/APlayer.min.js",
"scripts": { "scripts": {
"test": "gulp release", "test": "webpack",
"dev": "gulp", "start": "webpack-dev-server --hot --progress --inline"
"build": "gulp release"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@@ -18,22 +17,24 @@
"html5" "html5"
], ],
"author": "DIYgod", "author": "DIYgod",
"license": "MIT", "license": "SATA",
"bugs": { "bugs": {
"url": "https://github.com/DIYgod/APlayer/issues" "url": "https://github.com/DIYgod/APlayer/issues"
}, },
"homepage": "https://github.com/DIYgod/APlayer#readme", "homepage": "https://github.com/DIYgod/APlayer#readme",
"devDependencies": { "devDependencies": {
"babel-preset-es2015": "^6.6.0", "autoprefixer": "^6.3.7",
"browser-sync": "^2.12.4", "babel-loader": "^6.2.4",
"gulp": "^3.9.1", "babel-preset-es2015": "^6.9.0",
"gulp-autoprefixer": "^3.1.0", "css-loader": "^0.23.1",
"gulp-babel": "^6.1.2", "exports-loader": "^0.6.3",
"gulp-concat": "^2.6.0", "file-loader": "^0.9.0",
"gulp-cssnano": "^2.1.2", "node-sass": "^3.8.0",
"gulp-rename": "^1.2.2", "postcss-loader": "^0.9.1",
"gulp-sass": "^2.3.1", "sass-loader": "^4.0.0",
"gulp-sourcemaps": "^1.6.0", "style-loader": "^0.13.1",
"gulp-uglify": "^1.5.3" "url-loader": "^0.5.7",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.9.0"
} }
} }
+664 -566
View File
File diff suppressed because it is too large Load Diff
+49 -77
View File
@@ -2,17 +2,6 @@ $aplayer-height: 66px;
$lrc-height: 40px; $lrc-height: 40px;
$aplayer-height-lrc: $aplayer-height + $lrc-height; $aplayer-height-lrc: $aplayer-height + $lrc-height;
@font-face {
font-family: 'aplayer-fontello';
src: url('font/aplayer-fontello.eot?72550380');
src: url('font/aplayer-fontello.eot?72550380#iefix') format('embedded-opentype'),
url('font/aplayer-fontello.woff?72550380') format('woff'),
url('font/aplayer-fontello.ttf?72550380') format('truetype'),
url('font/aplayer-fontello.svg?72550380#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
.aplayer-narrow { .aplayer-narrow {
width: $aplayer-height; width: $aplayer-height;
.aplayer-info { .aplayer-info {
@@ -50,53 +39,20 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
box-sizing: content-box; box-sizing: content-box;
} }
[class^="aplayer-icon-"]:before, [class*=" aplayer-icon-"]:before { .aplayer-icon {
font-family: "aplayer-fontello"; width: 15px;
font-style: normal; height: 15px;
font-weight: normal; border: none;
display: inline-block; background-color: transparent;
text-decoration: inherit; outline: none;
width: 1em; cursor: pointer;
text-align: center; opacity: .8;
font-variant: normal; vertical-align: middle;
text-transform: none; padding: 0;
line-height: 1em;
}
.aplayer-icon-play:before { .aplayer-fill {
content: '\e806'; transition: all .2s ease-in-out;
} }
.aplayer-icon-pause:before {
content: '\e807';
}
.aplayer-icon-to-start:before {
content: '\e808';
}
.aplayer-icon-to-end:before {
content: '\e809';
}
.aplayer-icon-loop:before {
content: '\e803';
}
.aplayer-icon-menu:before {
content: '\e80b';
}
.aplayer-icon-volume-off:before {
content: '\e800';
}
.aplayer-icon-volume-down:before {
content: '\e801';
}
.aplayer-icon-volume-up:before {
content: '\e802';
} }
.aplayer-lrc-content { .aplayer-lrc-content {
@@ -114,7 +70,6 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
.aplayer-button { .aplayer-button {
position: absolute; position: absolute;
color: #fff;
border-radius: 50%; border-radius: 50%;
opacity: 0.8; opacity: 0.8;
cursor: pointer; cursor: pointer;
@@ -125,6 +80,10 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
&:hover { &:hover {
opacity: 1; opacity: 1;
} }
.aplayer-fill {
fill: #fff;
}
} }
.aplayer-hide { .aplayer-hide {
@@ -140,10 +99,10 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
margin: 0 -15px -15px 0; margin: 0 -15px -15px 0;
.aplayer-icon-play { .aplayer-icon-play {
position: absolute; position: absolute;
top: 2px; top: 3px;
left: 4px; left: 4px;
font-size: 20px; height: 20px;
line-height: 23px; width: 20px;
} }
} }
@@ -155,10 +114,10 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
right: 4px; right: 4px;
.aplayer-icon-pause { .aplayer-icon-pause {
position: absolute; position: absolute;
top: 1px; top: 2px;
left: 2px; left: 2px;
font-size: 12px; height: 12px;
line-height: 14px; width: 12px;
} }
} }
} }
@@ -173,7 +132,7 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
margin-bottom: 17px; margin-bottom: 13px;
.aplayer-title { .aplayer-title {
font-size: 14px; font-size: 14px;
@@ -190,13 +149,14 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
.aplayer-bar-wrap { .aplayer-bar-wrap {
margin: 0 140px 0 5px; margin: 0 140px 0 5px;
padding: 4px 0;
cursor: pointer !important;
.aplayer-bar { .aplayer-bar {
position: relative; position: relative;
height: 2px; height: 2px;
width: 100%; width: 100%;
background: #cdcdcd; background: #cdcdcd;
cursor: pointer !important;
.aplayer-loaded { .aplayer-loaded {
position: absolute; position: absolute;
@@ -234,29 +194,41 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
.aplayer-time { .aplayer-time {
position: absolute; position: absolute;
right: 0; right: 0;
bottom: -5px; bottom: -3px;
height: 17px; height: 17px;
color: #999; color: #999;
font-size: 11px; font-size: 11px;
i { .aplayer-time-inner {
color: #666; vertical-align: middle;
font-size: 15px; }
.aplayer-icon {
cursor: pointer; cursor: pointer;
transition: all 0.2s ease; transition: all 0.2s ease;
.aplayer-fill {
fill: #666;
}
&.aplayer-icon-loop { &.aplayer-icon-loop {
margin-right: 4px; margin-right: 4px;
} }
&.aplayer-noloop { &.aplayer-noloop {
color: #ddd; .aplayer-fill {
fill: #ddd;
}
&:hover { &:hover {
color: #bbb; .aplayer-fill {
fill: #bbb;
}
} }
} }
&:hover { &:hover {
color: #000; .aplayer-fill {
fill: #000;
}
} }
} }
@@ -284,8 +256,8 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
.aplayer-volume-bar-wrap { .aplayer-volume-bar-wrap {
display: none; display: none;
position: absolute; position: absolute;
bottom: 17px; bottom: 15px;
right: -5px; right: -3px;
width: 25px; width: 25px;
height: 40px; height: 40px;
z-index: 99; z-index: 99;
@@ -373,12 +345,11 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
} }
.aplayer-list { .aplayer-list {
max-height: 300px;
overflow: auto; overflow: auto;
transition: all 0.5s ease; transition: all 0.5s ease;
&.aplayer-list-hide { &.aplayer-list-hide {
max-height: 0; height: 0 !important;
} }
ol { ol {
@@ -395,6 +366,7 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
border-top: 1px solid #e9e9e9; border-top: 1px solid #e9e9e9;
cursor: pointer; cursor: pointer;
transition: all 0.2s ease; transition: all 0.2s ease;
overflow: hidden;
&:hover { &:hover {
background: #efefef; background: #efefef;
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.
-20
View File
@@ -1,20 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
<defs>
<font id="fontello" horiz-adv-x="1000" >
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="volume-off" unicode="&#xe800;" d="m429 654v-608q0-14-11-25t-25-10-25 10l-186 186h-146q-15 0-25 11t-11 25v214q0 15 11 25t25 11h146l186 186q10 10 25 10t25-10 11-25z" horiz-adv-x="428.6" />
<glyph glyph-name="volume-down" unicode="&#xe801;" d="m429 654v-608q0-14-11-25t-25-10-25 10l-186 186h-146q-15 0-25 11t-11 25v214q0 15 11 25t25 11h146l186 186q10 10 25 10t25-10 11-25z m214-304q0-42-24-79t-63-52q-5-3-14-3-14 0-25 10t-10 26q0 12 6 20t17 14 19 12 16 20 6 32-6 32-16 20-19 12-17 14-6 20q0 15 10 26t25 10q9 0 14-3 39-15 63-52t24-79z" horiz-adv-x="642.9" />
<glyph glyph-name="volume-up" unicode="&#xe802;" d="m429 654v-608q0-14-11-25t-25-10-25 10l-186 186h-146q-15 0-25 11t-11 25v214q0 15 11 25t25 11h146l186 186q10 10 25 10t25-10 11-25z m214-304q0-42-24-79t-63-52q-5-3-14-3-14 0-25 10t-10 26q0 12 6 20t17 14 19 12 16 20 6 32-6 32-16 20-19 12-17 14-6 20q0 15 10 26t25 10q9 0 14-3 39-15 63-52t24-79z m143 0q0-85-48-158t-125-105q-8-3-14-3-15 0-26 11t-10 25q0 22 21 33 32 16 43 25 41 30 64 75t23 97-23 97-64 75q-11 9-43 25-21 11-21 33 0 14 10 25t25 11q7 0 15-3 78-33 125-105t48-158z m143 0q0-128-71-236t-189-158q-7-3-14-3-15 0-26 11t-10 25q0 20 22 33 4 2 12 6t13 6q25 14 45 28 69 51 108 127t38 161-38 161-108 127q-20 14-45 28-4 3-13 6t-12 6q-22 13-22 33 0 14 10 25t26 11q7 0 14-3 118-51 189-158t71-236z" horiz-adv-x="928.6" />
<glyph glyph-name="loop" unicode="&#xe803;" d="m800 540q42 0 71-29t29-71l0-290q0-40-29-70t-71-30l-700 0q-40 0-70 30t-30 70l0 290q0 42 30 71t70 29l250 0 0 110 200-180-200-180 0 110-210 0 0-210 620 0 0 210-150 0 0 140 190 0z" horiz-adv-x="900" />
<glyph glyph-name="play" unicode="&#xe806;" d="m486 376q14-10 14-26 0-14-14-24l-428-266q-24-16-41-6t-17 40l0 514q0 30 17 40t41-6z" horiz-adv-x="500" />
<glyph glyph-name="pause" unicode="&#xe807;" d="m440 700q90 0 90-64l0-570q0-66-90-66t-90 66l0 570q0 64 90 64z m-350 0q90 0 90-64l0-570q0-66-90-66t-90 66l0 570q0 64 90 64z" horiz-adv-x="530" />
<glyph glyph-name="to-start" unicode="&#xe808;" d="m174 350q0 14 14 24l364 228q20 14 34 5t14-35l0-442q0-26-14-35t-34 5l-364 228q-14 10-14 22z m-174 234q0 58 76 58 74 0 74-58l0-466q0-58-74-58-76 0-76 58l0 466z" horiz-adv-x="600" />
<glyph glyph-name="to-end" unicode="&#xe809;" d="m412 374q14-10 14-24 0-12-14-22l-362-228q-22-14-36-5t-14 35l0 442q0 26 14 35t36-5z m114 268q74 0 74-58l0-466q0-58-74-58-76 0-76 58l0 466q0 58 76 58z" horiz-adv-x="600" />
<glyph glyph-name="menu" unicode="&#xe80b;" d="m650 400q22 0 36-15t14-35-15-35-35-15l-600 0q-20 0-35 15t-15 35 14 35 36 15l600 0z m-600 100q-20 0-35 15t-15 35 14 35 36 15l600 0q22 0 36-15t14-35-15-35-35-15l-600 0z m600-300q22 0 36-15t14-35-15-35-35-15l-600 0q-20 0-35 15t-15 35 14 35 36 15l600 0z" horiz-adv-x="700" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.
Binary file not shown.
+60
View File
@@ -0,0 +1,60 @@
var webpack = require('webpack');
var path = require('path');
var autoprefixer = require('autoprefixer');
var ROOT_PATH = path.resolve(__dirname);
var APP_PATH = path.resolve(ROOT_PATH, 'src');
var BUILD_PATH = path.resolve(ROOT_PATH, 'dist');
module.exports = {
devtool: 'source-map',
entry: './src/APlayer.js',
output: {
path: BUILD_PATH,
filename: 'APlayer.min.js',
libraryTarget: 'umd',
umdNamedDefine: true
},
devServer: {
publicPath: "/dist/",
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
include: APP_PATH,
query: {
presets: ['es2015']
}
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'postcss', 'sass'],
include: APP_PATH
},
{
test: /\.(png|jpg)$/,
loader: 'url?limit=40000'
}
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
],
postcss: [
autoprefixer({
browsers: ['last 15 versions', '> 1%', 'ie 8', 'ie 7']
})
]
};