From 185123dab2fa8e9327a8baebfda1bef04c176197 Mon Sep 17 00:00:00 2001 From: janWilejan <119548498+janWilejan@users.noreply.github.com> Date: Thu, 6 Jul 2023 04:41:50 +0000 Subject: [PATCH] fail silently when no codces are found (#3142) Co-authored-by: janWilejan <> --- web/components/video/metrics/playback.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/video/metrics/playback.js b/web/components/video/metrics/playback.js index bd6338fa4..65481e510 100644 --- a/web/components/video/metrics/playback.js +++ b/web/components/video/metrics/playback.js @@ -102,7 +102,7 @@ class PlaybackMetrics { const tech = this.player.tech({ IWillNotUseThisInPlugins: true }); this.supportsDetailedMetrics = !!tech; - tech.on('usage', e => { + tech?.on('usage', e => { if (e.name === 'vhs-unknown-waiting') { this.setIsBuffering(true); }