Fix auto quality with http fallback
authorChocobozzz <me@florianbigard.com>
Thu, 5 Apr 2018 14:22:08 +0000 (16:22 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 5 Apr 2018 14:22:08 +0000 (16:22 +0200)
client/src/assets/player/peertube-videojs-plugin.ts
client/src/assets/player/webtorrent-info-button.ts

index 91a3993a34cbd1ecf6df1164fd2c354686f008ac..84a5e7f1338d1d41d72cfb6476ea8a1cb62d231f 100644 (file)
@@ -313,7 +313,8 @@ class PeerTubePlugin extends Plugin {
 
   private runAutoQualityScheduler () {
     this.autoQualityInterval = setInterval(() => {
-      if (this.torrent === undefined) return
+      // Not initialized or in HTTP fallback
+      if (this.torrent === undefined || this.torrent === null) return
       if (this.isAutoResolutionOn() === false) return
       if (this.isAutoResolutionObservation === true) return
 
index 8a79e0e500bbf7d322f2e3701ad5d63927d9c658..baeb22b6455a3ea052969c17842eef1217da7c95 100644 (file)
@@ -62,7 +62,7 @@ class WebtorrentInfoButton extends Button {
     })
     const subDivFallbackText = videojsUntyped.dom.createEl('span', {
       className: 'peers-text',
-      textContent: 'fallback'
+      textContent: ' fallback'
     })
 
     subDivHttp.appendChild(subDivHttpText)