Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1948749cd | ||
|
|
d2b673db39 | ||
|
|
d116c75a09 | ||
|
|
a5cc501f3b | ||
|
|
96b49d2734 | ||
|
|
9f9ded6e1e | ||
|
|
12fc04957d | ||
|
|
c5776b2a78 | ||
|
|
548faa4bf3 | ||
|
|
91566de67a | ||
|
|
7b8ad10c04 | ||
|
|
47270238cb | ||
|
|
04e950b1eb | ||
|
|
54f9d5dcf9 | ||
|
|
2b6ba28167 | ||
|
|
10ad8cd38d | ||
|
|
adb2cd4ed8 | ||
|
|
f1bc748330 | ||
|
|
008552940f | ||
|
|
40d95344fd | ||
|
|
da71e49dc0 | ||
|
|
b019271309 | ||
|
|
5206eed8e5 | ||
|
|
82b7f777f6 |
@@ -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.
|
||||
@@ -1,19 +1,19 @@
|
||||
# APlayer
|
||||
|
||||
[](https://www.npmjs.com/package/aplayer)
|
||||
[](https://www.npmjs.com/package/aplayer)
|
||||
[](https://github.com/DIYgod/APlayer/blob/master/LICENSE)
|
||||
[](https://david-dm.org/DIYgod/APlayer#info=devDependencies)
|
||||
[](https://www.npmjs.com/package/aplayer)
|
||||
[](https://travis-ci.org/DIYgod/APlayer)
|
||||
[](https://www.anotherhome.net/)
|
||||
|
||||
Wow, such a beautiful html5 music player
|
||||
> Wow, such a beautiful html5 music player
|
||||
|
||||
## Introduction
|
||||
|
||||
UI 参考网易云音乐外链播放器
|
||||
|
||||
[Demo](https://www.anotherhome.net/file/APlayer)
|
||||
[Demo](http://aplayer.js.org)
|
||||
|
||||
Screenshot
|
||||

|
||||
@@ -33,8 +33,6 @@ $ npm install aplayer --save
|
||||
### HTML
|
||||
|
||||
```HTML
|
||||
<link rel="stylesheet" href="APlayer.min.css">
|
||||
<!-- ... -->
|
||||
<div id="player1" class="aplayer"></div>
|
||||
<!-- ... -->
|
||||
<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
|
||||
mutex: true, // Optional, pause other players when this player playing
|
||||
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
|
||||
title: 'Preparation', // Required, music title
|
||||
author: 'Hans Zimmer/Richard Harvey', // Required, music author
|
||||
@@ -70,8 +70,12 @@ var option = {
|
||||
#### API
|
||||
|
||||
+ `ap.init()`
|
||||
+ `ap.play()`
|
||||
+ `ap.pause()`
|
||||
+ `ap.play()` // Resume play
|
||||
+ `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
|
||||
|
||||
@@ -190,11 +194,13 @@ $ npm run build
|
||||
|
||||
## 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
|
||||
|
||||
MIT © [DIYgod](http://github.com/DIYgod)
|
||||
[The Star And Thank Author License (SATA)](https://github.com/DIYgod/APlayer/blob/master/LICENSE)
|
||||
+19
-18
File diff suppressed because one or more lines are too long
@@ -4,7 +4,6 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>APlayer Demo</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="../dist/APlayer.min.css">
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
+3
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB |
Vendored
BIN
Binary file not shown.
Vendored
-20
@@ -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="" 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="" 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="" 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="" 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="" 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="" 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="" 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="" 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="" 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 |
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
-71
@@ -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
@@ -1,12 +1,11 @@
|
||||
{
|
||||
"name": "aplayer",
|
||||
"version": "1.4.2",
|
||||
"version": "1.5.0",
|
||||
"description": "Wow, such a beautiful html5 music player",
|
||||
"main": "dist/APlayer.min.js",
|
||||
"scripts": {
|
||||
"test": "gulp release",
|
||||
"dev": "gulp",
|
||||
"build": "gulp release"
|
||||
"test": "webpack",
|
||||
"start": "webpack-dev-server --hot --progress --inline"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -18,22 +17,24 @@
|
||||
"html5"
|
||||
],
|
||||
"author": "DIYgod",
|
||||
"license": "MIT",
|
||||
"license": "SATA",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DIYgod/APlayer/issues"
|
||||
},
|
||||
"homepage": "https://github.com/DIYgod/APlayer#readme",
|
||||
"devDependencies": {
|
||||
"babel-preset-es2015": "^6.6.0",
|
||||
"browser-sync": "^2.12.4",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-autoprefixer": "^3.1.0",
|
||||
"gulp-babel": "^6.1.2",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-cssnano": "^2.1.2",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-sass": "^2.3.1",
|
||||
"gulp-sourcemaps": "^1.6.0",
|
||||
"gulp-uglify": "^1.5.3"
|
||||
"autoprefixer": "^6.3.7",
|
||||
"babel-loader": "^6.2.4",
|
||||
"babel-preset-es2015": "^6.9.0",
|
||||
"css-loader": "^0.23.1",
|
||||
"exports-loader": "^0.6.3",
|
||||
"file-loader": "^0.9.0",
|
||||
"node-sass": "^3.8.0",
|
||||
"postcss-loader": "^0.9.1",
|
||||
"sass-loader": "^4.0.0",
|
||||
"style-loader": "^0.13.1",
|
||||
"url-loader": "^0.5.7",
|
||||
"webpack": "^1.13.1",
|
||||
"webpack-dev-server": "^1.9.0"
|
||||
}
|
||||
}
|
||||
|
||||
+664
-566
File diff suppressed because it is too large
Load Diff
+49
-77
@@ -2,17 +2,6 @@ $aplayer-height: 66px;
|
||||
$lrc-height: 40px;
|
||||
$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 {
|
||||
width: $aplayer-height;
|
||||
.aplayer-info {
|
||||
@@ -50,53 +39,20 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
[class^="aplayer-icon-"]:before, [class*=" aplayer-icon-"]:before {
|
||||
font-family: "aplayer-fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
text-align: center;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1em;
|
||||
}
|
||||
.aplayer-icon {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
opacity: .8;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
|
||||
.aplayer-icon-play:before {
|
||||
content: '\e806';
|
||||
}
|
||||
|
||||
.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-fill {
|
||||
transition: all .2s ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
.aplayer-lrc-content {
|
||||
@@ -114,7 +70,6 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
|
||||
.aplayer-button {
|
||||
position: absolute;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
opacity: 0.8;
|
||||
cursor: pointer;
|
||||
@@ -125,6 +80,10 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.aplayer-fill {
|
||||
fill: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.aplayer-hide {
|
||||
@@ -140,10 +99,10 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
margin: 0 -15px -15px 0;
|
||||
.aplayer-icon-play {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
top: 3px;
|
||||
left: 4px;
|
||||
font-size: 20px;
|
||||
line-height: 23px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,10 +114,10 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
right: 4px;
|
||||
.aplayer-icon-pause {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,7 +132,7 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-bottom: 17px;
|
||||
margin-bottom: 13px;
|
||||
|
||||
.aplayer-title {
|
||||
font-size: 14px;
|
||||
@@ -190,13 +149,14 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
|
||||
.aplayer-bar-wrap {
|
||||
margin: 0 140px 0 5px;
|
||||
padding: 4px 0;
|
||||
cursor: pointer !important;
|
||||
|
||||
.aplayer-bar {
|
||||
position: relative;
|
||||
height: 2px;
|
||||
width: 100%;
|
||||
background: #cdcdcd;
|
||||
cursor: pointer !important;
|
||||
|
||||
.aplayer-loaded {
|
||||
position: absolute;
|
||||
@@ -234,29 +194,41 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
.aplayer-time {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: -5px;
|
||||
bottom: -3px;
|
||||
height: 17px;
|
||||
color: #999;
|
||||
font-size: 11px;
|
||||
|
||||
i {
|
||||
color: #666;
|
||||
font-size: 15px;
|
||||
.aplayer-time-inner {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.aplayer-icon {
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
.aplayer-fill {
|
||||
fill: #666;
|
||||
}
|
||||
|
||||
&.aplayer-icon-loop {
|
||||
margin-right: 4px;
|
||||
}
|
||||
&.aplayer-noloop {
|
||||
color: #ddd;
|
||||
.aplayer-fill {
|
||||
fill: #ddd;
|
||||
}
|
||||
&:hover {
|
||||
color: #bbb;
|
||||
.aplayer-fill {
|
||||
fill: #bbb;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: #000;
|
||||
.aplayer-fill {
|
||||
fill: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,8 +256,8 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
.aplayer-volume-bar-wrap {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 17px;
|
||||
right: -5px;
|
||||
bottom: 15px;
|
||||
right: -3px;
|
||||
width: 25px;
|
||||
height: 40px;
|
||||
z-index: 99;
|
||||
@@ -373,12 +345,11 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
}
|
||||
|
||||
.aplayer-list {
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
transition: all 0.5s ease;
|
||||
|
||||
&.aplayer-list-hide {
|
||||
max-height: 0;
|
||||
height: 0 !important;
|
||||
}
|
||||
|
||||
ol {
|
||||
@@ -395,6 +366,7 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
|
||||
border-top: 1px solid #e9e9e9;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
overflow: hidden;
|
||||
|
||||
&:hover {
|
||||
background: #efefef;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
@@ -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="" 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="" 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="" 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="" 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="" 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="" 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="" 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="" 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="" 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.
@@ -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']
|
||||
})
|
||||
]
|
||||
};
|
||||
Reference in New Issue
Block a user