Fix webtorrent resolution issue
This commit is contained in:
parent
c910f667d2
commit
cf57794e9b
|
@ -30,11 +30,12 @@ declare module 'video.js' {
|
||||||
|
|
||||||
qualityLevels (): { height: number, id: number }[] & {
|
qualityLevels (): { height: number, id: number }[] & {
|
||||||
selectedIndex: number
|
selectedIndex: number
|
||||||
|
selectedIndex_: number
|
||||||
|
|
||||||
addQualityLevel (representation: {
|
addQualityLevel (representation: {
|
||||||
id: number
|
id: number
|
||||||
label: string
|
label: string
|
||||||
height: number,
|
height: number
|
||||||
_enabled: boolean
|
_enabled: boolean
|
||||||
}): void
|
}): void
|
||||||
}
|
}
|
||||||
|
|
|
@ -650,8 +650,8 @@ class WebTorrentPlugin extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < qualityLevels.length; i++) {
|
for (let i = 0; i < qualityLevels.length; i++) {
|
||||||
const q = this.player.qualityLevels[i]
|
const q = qualityLevels[i]
|
||||||
if (q.height === resolutionId) qualityLevels.selectedIndex = i
|
if (q.height === resolutionId) qualityLevels.selectedIndex_ = i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue