From 877b0528f80f129cdd00480bd5660b9f3caa8df4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 5 Apr 2018 16:22:08 +0200 Subject: [PATCH] Fix auto quality with http fallback --- client/src/assets/player/peertube-videojs-plugin.ts | 3 ++- client/src/assets/player/webtorrent-info-button.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index 91a3993a3..84a5e7f13 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts @@ -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 diff --git a/client/src/assets/player/webtorrent-info-button.ts b/client/src/assets/player/webtorrent-info-button.ts index 8a79e0e50..baeb22b64 100644 --- a/client/src/assets/player/webtorrent-info-button.ts +++ b/client/src/assets/player/webtorrent-info-button.ts @@ -62,7 +62,7 @@ class WebtorrentInfoButton extends Button { }) const subDivFallbackText = videojsUntyped.dom.createEl('span', { className: 'peers-text', - textContent: 'fallback' + textContent: ' fallback' }) subDivHttp.appendChild(subDivHttpText) -- 2.25.1