aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-videojs-plugin.ts
diff options
context:
space:
mode:
authorNitesh Sawant <ns23@github.com>2018-06-30 15:14:50 +0530
committerChocobozzz <me@florianbigard.com>2018-06-30 12:44:10 +0200
commit06aa2726d72cccbd7045b5c687b2357b096de4b9 (patch)
tree14e73dbb504bfb7b704e56b7726c546ca78f4492 /client/src/assets/player/peertube-videojs-plugin.ts
parentb5c4bfd6acfa6b3430b81e3915658d0129b2cd5f (diff)
downloadPeerTube-06aa2726d72cccbd7045b5c687b2357b096de4b9.tar.gz
PeerTube-06aa2726d72cccbd7045b5c687b2357b096de4b9.tar.zst
PeerTube-06aa2726d72cccbd7045b5c687b2357b096de4b9.zip
filter to Cap the maximum resolution to the screen resolution
Diffstat (limited to 'client/src/assets/player/peertube-videojs-plugin.ts')
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts5
1 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 e268510fa..32cc4cd8f 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -365,8 +365,9 @@ class PeerTubePlugin extends Plugin {
365 365
366 if (!averageDownloadSpeed) averageDownloadSpeed = this.getAndSaveActualDownloadSpeed() 366 if (!averageDownloadSpeed) averageDownloadSpeed = this.getAndSaveActualDownloadSpeed()
367 367
368 // Filter videos we can play according to our bandwidth 368 // Filter videos we can play according to our screen resolution and bandwidth
369 const filteredFiles = this.videoFiles.filter(f => { 369 const filteredFiles = this.videoFiles.filter(f => f.resolution.id <= this.playerElement.width)
370 .filter(f => {
370 const fileBitrate = (f.size / this.videoDuration) 371 const fileBitrate = (f.size / this.videoDuration)
371 let threshold = fileBitrate 372 let threshold = fileBitrate
372 373