change default pic way
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -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
@@ -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("' + encodeURI(this.music.pic) + '");"' : '') + '>'
|
||||
+ '<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');
|
||||
|
||||
Reference in New Issue
Block a user