aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-videojs-plugin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/peertube-videojs-plugin.ts')
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts
index fc07c35d6..208105d3c 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -57,6 +57,7 @@ class PeerTubePlugin extends Plugin {
57 private renderer 57 private renderer
58 private fakeRenderer 58 private fakeRenderer
59 private autoResolution = true 59 private autoResolution = true
60 private forbidAutoResolution = false
60 private isAutoResolutionObservation = false 61 private isAutoResolutionObservation = false
61 62
62 private videoViewInterval 63 private videoViewInterval
@@ -304,11 +305,17 @@ class PeerTubePlugin extends Plugin {
304 this.trigger('autoResolutionUpdate') 305 this.trigger('autoResolutionUpdate')
305 } 306 }
306 307
307 disableAutoResolution () { 308 disableAutoResolution (forbid = false) {
309 if (forbid === true) this.forbidAutoResolution = true
310
308 this.autoResolution = false 311 this.autoResolution = false
309 this.trigger('autoResolutionUpdate') 312 this.trigger('autoResolutionUpdate')
310 } 313 }
311 314
315 isAutoResolutionForbidden () {
316 return this.forbidAutoResolution === true
317 }
318
312 getCurrentVideoFile () { 319 getCurrentVideoFile () {
313 return this.currentVideoFile 320 return this.currentVideoFile
314 } 321 }
@@ -509,6 +516,8 @@ class PeerTubePlugin extends Plugin {
509 } 516 }
510 517
511 private fallbackToHttp (done?: Function, play = true) { 518 private fallbackToHttp (done?: Function, play = true) {
519 this.disableAutoResolution(true)
520
512 this.flushVideoFile(this.currentVideoFile, true) 521 this.flushVideoFile(this.currentVideoFile, true)
513 this.torrent = null 522 this.torrent = null
514 523
@@ -555,7 +564,7 @@ class PeerTubePlugin extends Plugin {
555 this.player.controlBar.on('mouseenter', () => disableInactivity()) 564 this.player.controlBar.on('mouseenter', () => disableInactivity())
556 settingsDialog.on('mouseenter', () => disableInactivity()) 565 settingsDialog.on('mouseenter', () => disableInactivity())
557 this.player.controlBar.on('mouseleave', () => enableInactivity()) 566 this.player.controlBar.on('mouseleave', () => enableInactivity())
558 settingsDialog.on('mouseleave', () => enableInactivity()) 567 // settingsDialog.on('mouseleave', () => enableInactivity())
559 } 568 }
560 569
561 private pickAverageVideoFile () { 570 private pickAverageVideoFile () {