]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/webtorrent/webtorrent-plugin.ts
Merge branch 'release/2.1.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / webtorrent / webtorrent-plugin.ts
index 3d335acbc0adfb500440c5f288b8ffc1c778a85b..bf6b0a718dcbe024777916bf1ccf46ec091a27ea 100644 (file)
@@ -25,12 +25,13 @@ type PlayOptions = {
 const Plugin = videojs.getPlugin('plugin')
 
 class WebTorrentPlugin extends Plugin {
+  readonly videoFiles: VideoFile[]
+
   private readonly playerElement: HTMLVideoElement
 
   private readonly autoplay: boolean = false
   private readonly startTime: number = 0
   private readonly savePlayerSrcFunction: VideoJsPlayer['src']
-  private readonly videoFiles: VideoFile[]
   private readonly videoDuration: number
   private readonly CONSTANTS = {
     INFO_SCHEDULER: 1000, // Don't change this
@@ -650,8 +651,8 @@ class WebTorrentPlugin extends Plugin {
     }
 
     for (let i = 0; i < qualityLevels.length; i++) {
-      const q = this.player.qualityLevels[i]
-      if (q.height === resolutionId) qualityLevels.selectedIndex = i
+      const q = qualityLevels[i]
+      if (q.height === resolutionId) qualityLevels.selectedIndex_ = i
     }
   }
 }