audio.theme
This commit is contained in:
+12
-6
@@ -48,7 +48,7 @@ const ap = new APlayer({
|
||||
name: 'name',
|
||||
artist: 'artist',
|
||||
url: 'url.mp3',
|
||||
cover: 'cover.jpg',
|
||||
cover: 'cover.jpg'
|
||||
}]
|
||||
});
|
||||
```
|
||||
@@ -80,6 +80,7 @@ audio.artist | - | audio artist
|
||||
audio.url | - | audio url
|
||||
audio.cover | - | audio cover
|
||||
audio.lrc | - | [see more details](https://aplayer.js.org/#/home?id=lrc)
|
||||
audio.theme | - | main color when switching to this audio, it has priority over the above theme
|
||||
mutex | true | prevent to play multiple player at the same time, pause other players when this player start play
|
||||
lrc | false | [see more details](https://aplayer.js.org/#/home?id=lrc)
|
||||
listFolded | false | indicate whether list should folded at first
|
||||
@@ -111,14 +112,16 @@ const ap = new APlayer({
|
||||
artist: 'artist1',
|
||||
url: 'url1.mp3',
|
||||
cover: 'cover1.jpg',
|
||||
lrc: 'lrc1.lrc'
|
||||
lrc: 'lrc1.lrc',
|
||||
theme: '#ebd0c2'
|
||||
},
|
||||
{
|
||||
name: 'name2',
|
||||
artist: 'artist2',
|
||||
url: 'url2.mp3',
|
||||
cover: 'cover2.jpg',
|
||||
lrc: 'lrc2.lrc'
|
||||
lrc: 'lrc2.lrc',
|
||||
theme: '#46718b'
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -157,7 +160,8 @@ const ap = new APlayer({
|
||||
artist: 'artist',
|
||||
url: 'url.mp3',
|
||||
cover: 'cover.jpg',
|
||||
lrc: 'lrc.lrc'
|
||||
lrc: 'lrc.lrc',
|
||||
theme: '#ebd0c2'
|
||||
}
|
||||
]);
|
||||
```
|
||||
@@ -353,14 +357,16 @@ const ap = new APlayer({
|
||||
artist: 'artist1',
|
||||
url: 'url1.mp3',
|
||||
cover: 'cover1.jpg',
|
||||
lrc: 'lrc1.lrc'
|
||||
lrc: 'lrc1.lrc',
|
||||
theme: '#ebd0c2'
|
||||
},
|
||||
{
|
||||
name: 'name2',
|
||||
artist: 'artist2',
|
||||
url: 'url2.mp3',
|
||||
cover: 'cover2.jpg',
|
||||
lrc: 'lrc2.lrc'
|
||||
lrc: 'lrc2.lrc',
|
||||
theme: '#46718b'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
+22
-12
@@ -88,19 +88,22 @@ function aplayer1 () {
|
||||
artist: 'Goose house',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.jpg',
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.lrc'
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.lrc',
|
||||
theme: '#ebd0c2'
|
||||
}, {
|
||||
name: 'トリカゴ',
|
||||
artist: 'XX:me',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.jpg',
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.lrc'
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.lrc',
|
||||
theme: '#46718b'
|
||||
}, {
|
||||
name: '前前前世',
|
||||
artist: 'RADWIMPS',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.jpg',
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.lrc'
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.lrc',
|
||||
theme: '#505d6b'
|
||||
}]
|
||||
});
|
||||
}
|
||||
@@ -108,12 +111,12 @@ function aplayer1 () {
|
||||
function aplayer2 () {
|
||||
window.ap2 = new APlayer({
|
||||
container: document.getElementById('aplayer2'),
|
||||
theme: '#e6d0b2',
|
||||
audio: [{
|
||||
name: '光るなら',
|
||||
artist: 'Goose house',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.jpg',
|
||||
theme: '#ebd0c2'
|
||||
}]
|
||||
});
|
||||
}
|
||||
@@ -123,7 +126,6 @@ function aplayer3 () {
|
||||
container: document.getElementById('aplayer3'),
|
||||
mini: false,
|
||||
autoplay: false,
|
||||
theme: '#FADFA3',
|
||||
loop: 'all',
|
||||
order: 'random',
|
||||
preload: 'auto',
|
||||
@@ -137,19 +139,22 @@ function aplayer3 () {
|
||||
artist: 'Goose house',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.jpg',
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.lrc'
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.lrc',
|
||||
theme: '#ebd0c2'
|
||||
}, {
|
||||
name: 'トリカゴ',
|
||||
artist: 'XX:me',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.jpg',
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.lrc'
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.lrc',
|
||||
theme: '#46718b'
|
||||
}, {
|
||||
name: '前前前世',
|
||||
artist: 'RADWIMPS',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.jpg',
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.lrc'
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.lrc',
|
||||
theme: '#505d6b'
|
||||
}]
|
||||
});
|
||||
}
|
||||
@@ -163,7 +168,8 @@ function aplayer4 () {
|
||||
artist: 'Goose house',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.jpg',
|
||||
lrc: "https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.lrc"
|
||||
lrc: "https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.lrc",
|
||||
theme: '#ebd0c2'
|
||||
}]
|
||||
});
|
||||
}
|
||||
@@ -177,19 +183,22 @@ function aplayer5 () {
|
||||
artist: 'Goose house',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.jpg',
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.lrc'
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.lrc',
|
||||
theme: '#ebd0c2'
|
||||
}, {
|
||||
name: 'トリカゴ',
|
||||
artist: 'XX:me',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.jpg',
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.lrc'
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/darling.lrc',
|
||||
theme: '#46718b'
|
||||
}, {
|
||||
name: '前前前世',
|
||||
artist: 'RADWIMPS',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.jpg',
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.lrc'
|
||||
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.lrc',
|
||||
theme: '#505d6b'
|
||||
}]
|
||||
});
|
||||
}
|
||||
@@ -203,6 +212,7 @@ function aplayer6 () {
|
||||
artist: 'Goose house',
|
||||
url: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.mp3',
|
||||
cover: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.jpg',
|
||||
theme: '#ebd0c2'
|
||||
}]
|
||||
});
|
||||
}
|
||||
+12
-6
@@ -49,7 +49,7 @@ const ap = new APlayer({
|
||||
name: 'name',
|
||||
artist: 'artist',
|
||||
url: 'url.mp3',
|
||||
cover: 'cover.jpg',
|
||||
cover: 'cover.jpg'
|
||||
}]
|
||||
});
|
||||
```
|
||||
@@ -81,6 +81,7 @@ audio.artist | - | 音频艺术家
|
||||
audio.url | - | 音频链接
|
||||
audio.cover | - | 音频封面
|
||||
audio.lrc | - | [详情](https://aplayer.js.org/#/home?id=lrc)
|
||||
audio.theme | - | 切换到此音频时的主题色,比上面的 theme 优先级高
|
||||
mutex | true | 互斥,阻止多个播放器同时播放,当前播放器播放时暂停其他播放器
|
||||
lrc | false | [详情](https://aplayer.js.org/#/home?id=lrc)
|
||||
listFolded | false | 列表默认折叠
|
||||
@@ -112,14 +113,16 @@ const ap = new APlayer({
|
||||
artist: 'artist1',
|
||||
url: 'url1.mp3',
|
||||
cover: 'cover1.jpg',
|
||||
lrc: 'lrc1.lrc'
|
||||
lrc: 'lrc1.lrc',
|
||||
theme: '#ebd0c2'
|
||||
},
|
||||
{
|
||||
name: 'name2',
|
||||
artist: 'artist2',
|
||||
url: 'url2.mp3',
|
||||
cover: 'cover2.jpg',
|
||||
lrc: 'lrc2.lrc'
|
||||
lrc: 'lrc2.lrc',
|
||||
theme: '#46718b'
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -158,7 +161,8 @@ const ap = new APlayer({
|
||||
artist: 'artist',
|
||||
url: 'url.mp3',
|
||||
cover: 'cover.jpg',
|
||||
lrc: 'lrc.lrc'
|
||||
lrc: 'lrc.lrc',
|
||||
theme: '#ebd0c2'
|
||||
}
|
||||
]);
|
||||
```
|
||||
@@ -354,14 +358,16 @@ const ap = new APlayer({
|
||||
artist: 'artist1',
|
||||
url: 'url1.mp3',
|
||||
cover: 'cover1.jpg',
|
||||
lrc: 'lrc1.lrc'
|
||||
lrc: 'lrc1.lrc',
|
||||
theme: '#ebd0c2'
|
||||
},
|
||||
{
|
||||
name: 'name2',
|
||||
artist: 'artist2',
|
||||
url: 'url2.mp3',
|
||||
cover: 'cover2.jpg',
|
||||
lrc: 'lrc2.lrc'
|
||||
lrc: 'lrc2.lrc',
|
||||
theme: '#46718b'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user