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 199ca965b..cef1bdc45 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
@@ -48,15 +48,17 @@ export class HtmlVideoPlayerComponent implements OnChanges, OnDestroy {
*/
playChannel(channel: Channel): void {
if (this.hls) this.hls.destroy();
- const url = channel.url + channel.epgParams;
- if (Hls && Hls.isSupported()) {
- console.log('... switching channel to ', channel.name, url);
- this.hls = new Hls();
- this.hls.attachMedia(this.videoPlayer.nativeElement);
- this.hls.loadSource(url);
- this.handlePlayOperation();
- } else {
- console.error('something wrong with hls.js init...');
+ if (channel.url) {
+ const url = channel.url + channel.epgParams;
+ if (Hls && Hls.isSupported()) {
+ console.log('... switching channel to ', channel.name, url);
+ this.hls = new Hls();
+ this.hls.attachMedia(this.videoPlayer.nativeElement);
+ this.hls.loadSource(url);
+ this.handlePlayOperation();
+ } else {
+ console.error('something wrong with hls.js init...');
+ }
}
}
diff --git a/src/app/player/components/video-player/video-player.component.ts b/src/app/player/components/video-player/video-player.component.ts
index 3a9b35c63..140b6b781 100644
--- a/src/app/player/components/video-player/video-player.component.ts
+++ b/src/app/player/components/video-player/video-player.component.ts
@@ -52,7 +52,7 @@ export class VideoPlayerComponent implements OnInit, OnDestroy {
/** Active selected channel */
activeChannel$ = this.store
.select(selectActive)
- .pipe(filter((channel) => Boolean(channel)));
+ .pipe(filter((channel) => Boolean(channel?.url)));
/** Channels list */
channels$!: Observable;