mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
fix(player): fix player not being destroyed, fix ios player styles
This commit is contained in:
parent
a2eff95eb1
commit
28a230d5a0
2 changed files with 10 additions and 3 deletions
|
|
@ -242,8 +242,9 @@
|
|||
width: calc(100% - 6rem);
|
||||
align-self: flex-start;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
margin-top: calc(-0.75rem + 1px);
|
||||
margin-left: $player-height;
|
||||
margin-left: calc(#{$player-height} + 0.75rem);
|
||||
}
|
||||
|
||||
.timing {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Component, HostBinding, Input } from '@angular/core';
|
||||
import { Component, HostBinding, Input, OnDestroy } from '@angular/core';
|
||||
import { PlayerService, Track } from '../../../../@core/data/player.service';
|
||||
|
||||
@Component({
|
||||
|
|
@ -6,7 +6,7 @@ import { PlayerService, Track } from '../../../../@core/data/player.service';
|
|||
styleUrls: ['./player.component.scss'],
|
||||
templateUrl: './player.component.html',
|
||||
})
|
||||
export class PlayerComponent {
|
||||
export class PlayerComponent implements OnDestroy {
|
||||
@Input()
|
||||
@HostBinding('class.collapsed')
|
||||
collapsed: boolean;
|
||||
|
|
@ -20,6 +20,12 @@ export class PlayerComponent {
|
|||
this.createPlayer();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.player.pause();
|
||||
this.player.src = '';
|
||||
this.player.load();
|
||||
}
|
||||
|
||||
prev() {
|
||||
if (!this.player.loop) {
|
||||
if (this.shuffle) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue