aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-12-28 16:30:34 +0100
committerChocobozzz <me@florianbigard.com>2022-12-29 08:38:33 +0100
commitd97d36b486847689f6089a6877afc70ba4123e80 (patch)
treee69eda7f0b2a60b4ca3eb1f1be1dd4525327c52a /client/src
parent0e08a5e7492498a8c43c94277e6c3f311da8fa53 (diff)
downloadPeerTube-d97d36b486847689f6089a6877afc70ba4123e80.tar.gz
PeerTube-d97d36b486847689f6089a6877afc70ba4123e80.tar.zst
PeerTube-d97d36b486847689f6089a6877afc70ba4123e80.zip
More robust player stats card
Diffstat (limited to 'client/src')
-rw-r--r--client/src/assets/player/shared/stats/stats-card.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/assets/player/shared/stats/stats-card.ts b/client/src/assets/player/shared/stats/stats-card.ts
index f23ae48be..471a5e46c 100644
--- a/client/src/assets/player/shared/stats/stats-card.ts
+++ b/client/src/assets/player/shared/stats/stats-card.ts
@@ -182,7 +182,7 @@ class StatsCard extends Component {
182 let colorSpace = 'unknown' 182 let colorSpace = 'unknown'
183 let codecs = 'unknown' 183 let codecs = 'unknown'
184 184
185 if (metadata?.streams[0]) { 185 if (metadata?.streams?.[0]) {
186 const stream = metadata.streams[0] 186 const stream = metadata.streams[0]
187 187
188 colorSpace = stream['color_space'] !== 'unknown' 188 colorSpace = stream['color_space'] !== 'unknown'
@@ -193,7 +193,7 @@ class StatsCard extends Component {
193 } 193 }
194 194
195 const resolution = videoFile?.resolution.label + videoFile?.fps 195 const resolution = videoFile?.resolution.label + videoFile?.fps
196 const buffer = this.timeRangesToString(this.player().buffered()) 196 const buffer = this.timeRangesToString(this.player_.buffered())
197 const progress = this.player_.webtorrent().getTorrent()?.progress 197 const progress = this.player_.webtorrent().getTorrent()?.progress
198 198
199 return { 199 return {