showlrc -> lrc

This commit is contained in:
DIYgod 2018-03-08 00:35:14 +08:00
parent 021df59e85
commit f29066f1b6
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
3 changed files with 10 additions and 10 deletions

View File

@ -2,7 +2,7 @@ const ap1 = new APlayer({
element: document.getElementById('player1'),
narrow: false,
autoplay: true,
showlrc: false,
lrc: false,
mutex: true,
theme: '#e6d0b2',
preload: 'metadata',
@ -39,7 +39,7 @@ const ap2 = new APlayer({
element: document.getElementById('player2'),
narrow: true,
autoplay: false,
showlrc: false,
lrc: false,
mutex: true,
theme: '#e6d0b2',
music: {
@ -54,7 +54,7 @@ const ap3 = new APlayer({
element: document.getElementById('player3'),
narrow: false,
autoplay: false,
showlrc: 3,
lrc: 3,
mutex: true,
theme: '#615754',
music: {
@ -70,7 +70,7 @@ const ap4 = new APlayer({
element: document.getElementById('player4'),
narrow: false,
autoplay: false,
showlrc: false,
lrc: false,
mutex: true,
theme: '#ad7a86',
music: [
@ -99,7 +99,7 @@ const ap5 = new APlayer({
element: document.getElementById('player5'),
narrow: false,
autoplay: false,
showlrc: 3,
lrc: 3,
mutex: true,
theme: '#ad7a86',
listFolded: true,

View File

@ -6,7 +6,7 @@ export default (options) => {
narrow: false,
autoplay: false,
mutex: true,
showlrc: 0,
lrc: 0,
theme: '#b7daff',
loop: 'all',
order: 'list',

View File

@ -30,7 +30,7 @@ class APlayer {
this.randomOrder = utils.randomOrder(this.options.music.length);
if (this.options.showlrc) {
if (this.options.lrc) {
this.container.classList.add('aplayer-withlrc');
}
if (this.options.music.length > 1) {
@ -49,7 +49,7 @@ class APlayer {
// save lrc
this.container = this.options.container;
if (this.options.showlrc === 2 || this.options.showlrc === true) {
if (this.options.lrc === 2 || this.options.lrc === true) {
const lrcEle = this.container.getElementsByClassName('aplayer-lrc-content');
for (let i = 0; i < lrcEle.length; i++) {
if (this.options.music[i]) {
@ -67,10 +67,10 @@ class APlayer {
this.template.time.classList.add('aplayer-time-narrow');
}
if (this.options.showlrc) {
if (this.options.lrc) {
this.lrc = new Lrc({
container: this.template.lrc,
async: this.options.showlrc === 3,
async: this.options.lrc === 3,
content: this.options.music.map((item) => item.lrc),
player: this,
});