diff options
Diffstat (limited to 'client/src/assets/player/resolution-menu-item.ts')
-rw-r--r-- | client/src/assets/player/resolution-menu-item.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/client/src/assets/player/resolution-menu-item.ts b/client/src/assets/player/resolution-menu-item.ts index 3fe1d8f0f..0ab0f53b5 100644 --- a/client/src/assets/player/resolution-menu-item.ts +++ b/client/src/assets/player/resolution-menu-item.ts | |||
@@ -19,6 +19,8 @@ class ResolutionMenuItem extends MenuItem { | |||
19 | } | 19 | } |
20 | 20 | ||
21 | handleClick (event) { | 21 | handleClick (event) { |
22 | if (this.id === -1 && this.player_.peertube().isAutoResolutionForbidden()) return | ||
23 | |||
22 | super.handleClick(event) | 24 | super.handleClick(event) |
23 | 25 | ||
24 | // Auto resolution | 26 | // Auto resolution |
@@ -32,6 +34,15 @@ class ResolutionMenuItem extends MenuItem { | |||
32 | } | 34 | } |
33 | 35 | ||
34 | updateSelection () { | 36 | updateSelection () { |
37 | // Check if auto resolution is forbidden or not | ||
38 | if (this.id === -1) { | ||
39 | if (this.player_.peertube().isAutoResolutionForbidden()) { | ||
40 | this.addClass('disabled') | ||
41 | } else { | ||
42 | this.removeClass('disabled') | ||
43 | } | ||
44 | } | ||
45 | |||
35 | if (this.player_.peertube().isAutoResolutionOn()) { | 46 | if (this.player_.peertube().isAutoResolutionOn()) { |
36 | this.selected(this.id === -1) | 47 | this.selected(this.id === -1) |
37 | return | 48 | return |