Fix webtorrent resolution issue

pull/2438/head
Chocobozzz 2020-01-29 14:20:32 +01:00
parent c910f667d2
commit cf57794e9b
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 4 additions and 3 deletions

View File

@ -30,11 +30,12 @@ declare module 'video.js' {
qualityLevels (): { height: number, id: number }[] & {
selectedIndex: number
selectedIndex_: number
addQualityLevel (representation: {
id: number
label: string
height: number,
height: number
_enabled: boolean
}): void
}

View File

@ -650,8 +650,8 @@ class WebTorrentPlugin extends Plugin {
}
for (let i = 0; i < qualityLevels.length; i++) {
const q = this.player.qualityLevels[i]
if (q.height === resolutionId) qualityLevels.selectedIndex = i
const q = qualityLevels[i]
if (q.height === resolutionId) qualityLevels.selectedIndex_ = i
}
}
}