aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/resolution-menu-item.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-22 15:06:33 +0200
committerChocobozzz <me@florianbigard.com>2018-06-22 15:11:04 +0200
commitc4082b8b4e3684baae0172e97297c936d7419f2c (patch)
tree226e2734b1d1945b25a69a661393c861cb933178 /client/src/assets/player/resolution-menu-item.ts
parent1a49822c321c34c39faf0411189a7073effa7eb7 (diff)
downloadPeerTube-c4082b8b4e3684baae0172e97297c936d7419f2c.tar.gz
PeerTube-c4082b8b4e3684baae0172e97297c936d7419f2c.tar.zst
PeerTube-c4082b8b4e3684baae0172e97297c936d7419f2c.zip
Disable auto resolution on HTTP fallback
Diffstat (limited to 'client/src/assets/player/resolution-menu-item.ts')
-rw-r--r--client/src/assets/player/resolution-menu-item.ts11
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