diff --git a/src/app/player/components/html-video-player/html-video-player.component.ts b/src/app/player/components/html-video-player/html-video-player.component.ts
index 15b96433d..af6727522 100644
--- a/src/app/player/components/html-video-player/html-video-player.component.ts
+++ b/src/app/player/components/html-video-player/html-video-player.component.ts
@@ -3,6 +3,7 @@ import {
ElementRef,
Input,
OnChanges,
+ OnDestroy,
SimpleChanges,
ViewChild,
} from '@angular/core';
@@ -14,7 +15,7 @@ import * as Hls from 'hls.js';
templateUrl: './html-video-player.component.html',
styleUrls: ['./html-video-player.component.scss'],
})
-export class HtmlVideoPlayerComponent implements OnChanges {
+export class HtmlVideoPlayerComponent implements OnChanges, OnDestroy {
/** Channel to play */
@Input() channel: Channel;
@@ -58,4 +59,11 @@ export class HtmlVideoPlayerComponent implements OnChanges {
);
}
}
+
+ /**
+ * Destroy hls instance on component destroy
+ */
+ ngOnDestroy(): void {
+ this.hls.destroy();
+ }
}