diff options
Diffstat (limited to 'client/src/assets')
-rw-r--r-- | client/src/assets/images/feather/octagon.svg | 3 | ||||
-rw-r--r-- | client/src/assets/player/stats/stats-card.ts | 8 | ||||
-rw-r--r-- | client/src/assets/player/utils.ts | 2 | ||||
-rw-r--r-- | client/src/assets/player/webtorrent/webtorrent-plugin.ts | 3 |
4 files changed, 10 insertions, 6 deletions
diff --git a/client/src/assets/images/feather/octagon.svg b/client/src/assets/images/feather/octagon.svg new file mode 100644 index 000000000..1ed9bacbf --- /dev/null +++ b/client/src/assets/images/feather/octagon.svg | |||
@@ -0,0 +1,3 @@ | |||
1 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-octagon"> | ||
2 | <polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon> | ||
3 | </svg> | ||
diff --git a/client/src/assets/player/stats/stats-card.ts b/client/src/assets/player/stats/stats-card.ts index d9f0d2fe9..a93f59506 100644 --- a/client/src/assets/player/stats/stats-card.ts +++ b/client/src/assets/player/stats/stats-card.ts | |||
@@ -89,9 +89,9 @@ class StatsCard extends Component { | |||
89 | this.container.style.display = 'block' | 89 | this.container.style.display = 'block' |
90 | this.updateInterval = setInterval(async () => { | 90 | this.updateInterval = setInterval(async () => { |
91 | try { | 91 | try { |
92 | const options = this.mode === 'webtorrent' | 92 | const options = this.mode === 'p2p-media-loader' |
93 | ? await this.buildWebTorrentOptions() | 93 | ? await this.buildHLSOptions() |
94 | : await this.buildHLSOptions() | 94 | : await this.buildWebTorrentOptions() // Default |
95 | 95 | ||
96 | this.list.innerHTML = this.getListTemplate(options) | 96 | this.list.innerHTML = this.getListTemplate(options) |
97 | } catch (err) { | 97 | } catch (err) { |
@@ -212,7 +212,7 @@ class StatsCard extends Component { | |||
212 | : undefined | 212 | : undefined |
213 | 213 | ||
214 | return ` | 214 | return ` |
215 | ${this.buildElement(player.localize('Player mode'), this.options_.mode)} | 215 | ${this.buildElement(player.localize('Player mode'), this.mode || 'HTTP')} |
216 | 216 | ||
217 | ${this.buildElement(player.localize('Video UUID'), this.options_.videoUUID)} | 217 | ${this.buildElement(player.localize('Video UUID'), this.options_.videoUUID)} |
218 | 218 | ||
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index d7451fa1d..1243526d2 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts | |||
@@ -95,7 +95,7 @@ function buildVideoLink (options: { | |||
95 | function buildPlaylistLink (options: { | 95 | function buildPlaylistLink (options: { |
96 | baseUrl?: string | 96 | baseUrl?: string |
97 | 97 | ||
98 | playlistPosition: number | 98 | playlistPosition?: number |
99 | }) { | 99 | }) { |
100 | const { baseUrl } = options | 100 | const { baseUrl } = options |
101 | 101 | ||
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts index 6f5fbe4c9..e27a16390 100644 --- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts +++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts | |||
@@ -557,7 +557,8 @@ class WebTorrentPlugin extends Plugin { | |||
557 | private pickAverageVideoFile () { | 557 | private pickAverageVideoFile () { |
558 | if (this.videoFiles.length === 1) return this.videoFiles[0] | 558 | if (this.videoFiles.length === 1) return this.videoFiles[0] |
559 | 559 | ||
560 | return this.videoFiles[Math.floor(this.videoFiles.length / 2)] | 560 | const files = this.videoFiles.filter(f => f.resolution.id !== 0) |
561 | return files[Math.floor(files.length / 2)] | ||
561 | } | 562 | } |
562 | 563 | ||
563 | private stopTorrent (torrent: WebTorrent.Torrent) { | 564 | private stopTorrent (torrent: WebTorrent.Torrent) { |