mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 00:10:14 +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);
|
width: calc(100% - 6rem);
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
margin-top: calc(-0.75rem + 1px);
|
margin-top: calc(-0.75rem + 1px);
|
||||||
margin-left: $player-height;
|
margin-left: calc(#{$player-height} + 0.75rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.timing {
|
.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';
|
import { PlayerService, Track } from '../../../../@core/data/player.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
@ -6,7 +6,7 @@ import { PlayerService, Track } from '../../../../@core/data/player.service';
|
||||||
styleUrls: ['./player.component.scss'],
|
styleUrls: ['./player.component.scss'],
|
||||||
templateUrl: './player.component.html',
|
templateUrl: './player.component.html',
|
||||||
})
|
})
|
||||||
export class PlayerComponent {
|
export class PlayerComponent implements OnDestroy {
|
||||||
@Input()
|
@Input()
|
||||||
@HostBinding('class.collapsed')
|
@HostBinding('class.collapsed')
|
||||||
collapsed: boolean;
|
collapsed: boolean;
|
||||||
|
|
@ -20,6 +20,12 @@ export class PlayerComponent {
|
||||||
this.createPlayer();
|
this.createPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnDestroy() {
|
||||||
|
this.player.pause();
|
||||||
|
this.player.src = '';
|
||||||
|
this.player.load();
|
||||||
|
}
|
||||||
|
|
||||||
prev() {
|
prev() {
|
||||||
if (!this.player.loop) {
|
if (!this.player.loop) {
|
||||||
if (this.shuffle) {
|
if (this.shuffle) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue