Fix "undefined" resolution in player stats

This commit is contained in:
Chocobozzz 2022-08-16 14:48:11 +02:00
parent 88ee99164c
commit 37229de26e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 1 deletions

View File

@ -145,7 +145,10 @@ class StatsCard extends Component {
? `${level?.videoCodec || ''} / ${level?.audioCodec || ''}`
: undefined
const resolution = `${level?.height}p${level?.attrs['FRAME-RATE'] || ''}`
const resolution = level?.height
? `${level?.height}p${level?.attrs['FRAME-RATE'] || ''}`
: undefined
const buffer = this.timeRangesToString(this.player().buffered())
let progress: number