]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix start time on HLS videos
authorChocobozzz <me@florianbigard.com>
Tue, 13 Aug 2019 09:08:36 +0000 (11:08 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 13 Aug 2019 09:08:36 +0000 (11:08 +0200)
client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts

index 7a0af6e8a779bf853d90e25343cbe56095452357..8fb7ba2eab4ec42e34a4105bc0d773a80ed0128e 100644 (file)
@@ -98,25 +98,10 @@ class P2pMediaLoaderPlugin extends Plugin {
 
     this.runStats()
 
-    this.hlsjs.on('hlsLevelLoaded', () => {
-      console.log('hello1')
+    this.player.one('canplay', () => {
       if (this.startTime) {
         this.player.currentTime(this.startTime)
       }
-
-      this.hlsjs.off('hlsLevelLoaded', this)
-    })
-
-    this.hlsjs.on('hlsFragParsed', () => {
-      console.log('hello2')
-    })
-
-    this.hlsjs.on('hlsFragBuffered', () => {
-      console.log('hello 3')
-    })
-
-    this.player.one('loadedmetadata', () => {
-      console.log('hello 4')
     })
   }