change default pic way

This commit is contained in:
DIYgod
2016-01-03 12:47:58 +08:00
parent 9928750208
commit 18a3ef0e1a
3 changed files with 3 additions and 8 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "aplayer",
"version": "1.2.12",
"version": "1.2.13",
"description": "Wow, such a beautiful html5 music player",
"main": "APlayer.js",
"scripts": {
+1 -6
View File
@@ -51,7 +51,7 @@ APlayer.prototype.init = function () {
// fill in HTML
this.element.innerHTML = ''
+ '<div class="aplayer-pic">'
+ '<div class="aplayer-pic"' + (this.music.pic ? ' style="background-image: url(&quot;' + encodeURI(this.music.pic) + '&quot;);"' : '') + '>'
+ '<div class="aplayer-button aplayer-pause aplayer-hide">'
+ '<i class="demo-icon aplayer-icon-pause"></i>'
+ '</div>'
@@ -90,11 +90,6 @@ APlayer.prototype.init = function () {
+ '</div>'
+ '</div>';
// music pic
if (this.music.pic) {
this.element.getElementsByClassName('aplayer-pic')[0].style.backgroundImage = 'url(' + encodeURI(this.music.pic) + ')';
}
// fill in lrc
if (this.option.showlrc) {
this.element.classList.add('aplayer-withlrc');