mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
fix(dashboard): improve loop action for player
This commit is contained in:
parent
21339d327f
commit
4a752483c0
1 changed files with 12 additions and 8 deletions
|
|
@ -21,20 +21,24 @@ export class PlayerComponent {
|
|||
}
|
||||
|
||||
prev() {
|
||||
if (this.shuffle) {
|
||||
this.track = this.playerService.random();
|
||||
} else {
|
||||
this.track = this.playerService.prev();
|
||||
if (!this.player.loop) {
|
||||
if (this.shuffle) {
|
||||
this.track = this.playerService.random();
|
||||
} else {
|
||||
this.track = this.playerService.prev();
|
||||
}
|
||||
}
|
||||
|
||||
this.reload();
|
||||
}
|
||||
|
||||
next() {
|
||||
if (this.shuffle) {
|
||||
this.track = this.playerService.random();
|
||||
} else {
|
||||
this.track = this.playerService.next();
|
||||
if (!this.player.loop) {
|
||||
if (this.shuffle) {
|
||||
this.track = this.playerService.random();
|
||||
} else {
|
||||
this.track = this.playerService.next();
|
||||
}
|
||||
}
|
||||
|
||||
this.reload();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue