]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Lazy load player captions
authorChocobozzz <me@florianbigard.com>
Tue, 13 Apr 2021 06:38:15 +0000 (08:38 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 13 Apr 2021 06:38:15 +0000 (08:38 +0200)
client/src/assets/player/peertube-player-manager.ts

index b112e231f7a5559abe2ceb4a06f44a30f80ca081..ed82e0496595611024ac9fe0703d0aa5bd4bc0bd 100644 (file)
@@ -220,7 +220,9 @@ export class PeertubePlayerManager {
     const isHLS = mode === 'p2p-media-loader'
 
     let autoplay = this.getAutoPlayValue(commonOptions.autoplay)
-    let html5 = {}
+    let html5 = {
+      preloadTextTracks: false
+    }
 
     const plugins: VideoJSPluginOptions = {
       peertube: {
@@ -248,7 +250,7 @@ export class PeertubePlayerManager {
     if (isHLS) {
       const { hlsjs } = PeertubePlayerManager.addP2PMediaLoaderOptions(plugins, options, p2pMediaLoaderModule)
 
-      html5 = hlsjs.html5
+      Object.assign(html5, hlsjs.html5)
     }
 
     if (mode === 'webtorrent') {