diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-29 14:20:32 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-01-29 14:20:32 +0100 |
commit | cf57794e9b104401884998c38b2dfa7cfe9638b0 (patch) | |
tree | 8fdccff10a2b718bd5e7c3426f0483cbb8733b6f /client/src/assets | |
parent | c910f667d29bf2ff1f1c954c6d8b5044cb54a1a6 (diff) | |
download | PeerTube-cf57794e9b104401884998c38b2dfa7cfe9638b0.tar.gz PeerTube-cf57794e9b104401884998c38b2dfa7cfe9638b0.tar.zst PeerTube-cf57794e9b104401884998c38b2dfa7cfe9638b0.zip |
Fix webtorrent resolution issue
Diffstat (limited to 'client/src/assets')
-rw-r--r-- | client/src/assets/player/peertube-videojs-typings.ts | 3 | ||||
-rw-r--r-- | client/src/assets/player/webtorrent/webtorrent-plugin.ts | 4 |
2 files changed, 4 insertions, 3 deletions
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' { | |||
30 | 30 | ||
31 | qualityLevels (): { height: number, id: number }[] & { | 31 | qualityLevels (): { height: number, id: number }[] & { |
32 | selectedIndex: number | 32 | selectedIndex: number |
33 | selectedIndex_: number | ||
33 | 34 | ||
34 | addQualityLevel (representation: { | 35 | addQualityLevel (representation: { |
35 | id: number | 36 | id: number |
36 | label: string | 37 | label: string |
37 | height: number, | 38 | height: number |
38 | _enabled: boolean | 39 | _enabled: boolean |
39 | }): void | 40 | }): void |
40 | } | 41 | } |
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 { | |||
650 | } | 650 | } |
651 | 651 | ||
652 | for (let i = 0; i < qualityLevels.length; i++) { | 652 | for (let i = 0; i < qualityLevels.length; i++) { |
653 | const q = this.player.qualityLevels[i] | 653 | const q = qualityLevels[i] |
654 | if (q.height === resolutionId) qualityLevels.selectedIndex = i | 654 | if (q.height === resolutionId) qualityLevels.selectedIndex_ = i |
655 | } | 655 | } |
656 | } | 656 | } |
657 | } | 657 | } |