mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-17 07:50:12 +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,21 +21,25 @@ export class PlayerComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
prev() {
|
prev() {
|
||||||
|
if (!this.player.loop) {
|
||||||
if (this.shuffle) {
|
if (this.shuffle) {
|
||||||
this.track = this.playerService.random();
|
this.track = this.playerService.random();
|
||||||
} else {
|
} else {
|
||||||
this.track = this.playerService.prev();
|
this.track = this.playerService.prev();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.reload();
|
this.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
next() {
|
next() {
|
||||||
|
if (!this.player.loop) {
|
||||||
if (this.shuffle) {
|
if (this.shuffle) {
|
||||||
this.track = this.playerService.random();
|
this.track = this.playerService.random();
|
||||||
} else {
|
} else {
|
||||||
this.track = this.playerService.next();
|
this.track = this.playerService.next();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.reload();
|
this.reload();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue