3 Commits
Author SHA1 Message Date
DIYgod 07a9ae9925 release v1.9.1 2018-03-14 23:58:10 +08:00
DIYgod bede0645ea remove loading when paused 2018-03-14 23:21:22 +08:00
DIYgod 52388dd4c1 changeable template.listCurs 2018-03-14 23:11:22 +08:00
5 changed files with 13 additions and 10 deletions
+1 -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
+2 -2
View File
@@ -16,9 +16,9 @@
gtag('config', 'UA-48084758-8');
</script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.9.0/dist/APlayer.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.9.1/dist/APlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.9.0/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.9.1/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/color-thief-don@2.0.2/src/color-thief.js"></script>
<style>
body {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "aplayer",
"version": "1.9.0",
"version": "1.9.1",
"description": "Wow, such a beautiful html5 music player",
"main": "dist/APlayer.min.js",
"style": "dist/APlayer.min.css",
+8 -5
View File
@@ -355,6 +355,7 @@ class APlayer {
this.audio.pause();
this.container.classList.remove('aplayer-loading');
this.timer.disable('loading');
});
}
@@ -466,11 +467,11 @@ class APlayer {
this.container.classList.add('aplayer-withlist');
this.audio.loop = false;
}
const songListLength = this.container.querySelectorAll('.aplayer-list li').length;
this.template.list.style.height = songListLength * 33 - 1 + 'px';
this.template.listOl.style.height = songListLength * 33 - 1 + 'px';
this.template.list.style.height = this.options.audio.length * 33 - 1 + 'px';
this.template.listOl.style.height = this.options.audio.length * 33 - 1 + 'px';
this.randomOrder = utils.randomOrder(this.options.audio.length);
this.template.listCurs = this.container.querySelectorAll('.aplayer-list-cur');
}
/**
@@ -502,8 +503,10 @@ class APlayer {
if (this.options.audio.length === 1) {
this.container.classList.remove('aplayer-withlist');
}
this.template.list.style.height = parseInt(this.template.list.style.height, 10) - 33 + 'px';
this.template.listOl.style.height = parseInt(this.template.listOl.style.height, 10) - 33 + 'px';
this.template.list.style.height = this.options.audio.length * 33 - 1 + 'px';
this.template.listOl.style.height = this.options.audio.length * 33 - 1 + 'px';
this.template.listCurs = this.container.querySelectorAll('.aplayer-list-cur');
}
}