Improve the exit action for media player

This commit is contained in:
SondreB 2023-01-19 00:57:05 +01:00
parent 5aa0bd94c6
commit ae8063a0af
No known key found for this signature in database
GPG Key ID: D6CC44C75005FDBF

View File

@ -62,17 +62,14 @@ export class MediaService {
}
exit() {
if (!this.audio) {
return;
if (this.audio) {
this.audio.pause();
this.audio.currentTime = 0;
this.audio = undefined;
}
this.audio.pause();
this.audio.currentTime = 0;
this.index = -1;
this.audio = undefined;
this.current = undefined;
this.options.options.showMediaPlayer = false;
this.media = [];
}