set loop one to loop all if single music
This commit is contained in:
parent
dedc1bf62d
commit
f4ffe98bf6
|
|
@ -141,13 +141,13 @@ class Controller {
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (this.player.options.loop === 'one') {
|
||||
if (this.player.options.loop === 'one' || this.player.options.loop === 'all') {
|
||||
this.player.options.loop = 'none';
|
||||
this.player.template.loop.innerHTML = Icons.loopNone;
|
||||
}
|
||||
else if (this.player.options.loop === 'none') {
|
||||
this.player.options.loop = 'one';
|
||||
this.player.template.loop.innerHTML = Icons.loopOne;
|
||||
this.player.options.loop = 'all';
|
||||
this.player.template.loop.innerHTML = Icons.loopAll;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -21,5 +21,9 @@ export default (options) => {
|
|||
options.music = [options.music];
|
||||
}
|
||||
|
||||
if (options.music.length <= 1 && options.loop === 'one') {
|
||||
options.loop = 'all';
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue