From e028d983727f7826f5aebfe84770c5c37a712b4d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 13 Aug 2019 11:08:36 +0200 Subject: [PATCH] Fix start time on HLS videos --- .../p2p-media-loader/p2p-media-loader-plugin.ts | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts index 7a0af6e8a..8fb7ba2ea 100644 --- a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts @@ -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') }) } -- 2.25.1