From: Chocobozzz Date: Wed, 29 Jan 2020 13:20:32 +0000 (+0100) Subject: Fix webtorrent resolution issue X-Git-Tag: v2.2.0-rc.1~576 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cf57794e9b104401884998c38b2dfa7cfe9638b0;p=oweals%2Fpeertube.git Fix webtorrent resolution issue --- diff --git a/client/src/assets/player/peertube-videojs-typings.ts b/client/src/assets/player/peertube-videojs-typings.ts index 7b0ea2074..e45722661 100644 --- a/client/src/assets/player/peertube-videojs-typings.ts +++ b/client/src/assets/player/peertube-videojs-typings.ts @@ -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 } diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts index 3d335acbc..d26fc38fa 100644 --- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts +++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts @@ -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 } } }