diff options
Diffstat (limited to 'client/src/assets')
-rw-r--r-- | client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | 18 |
1 files changed, 17 insertions, 1 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 bbd3e008d..7a0af6e8a 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 | |||
@@ -57,6 +57,7 @@ class P2pMediaLoaderPlugin extends Plugin { | |||
57 | initVideoJsContribHlsJsPlayer(player) | 57 | initVideoJsContribHlsJsPlayer(player) |
58 | 58 | ||
59 | this.startTime = timeToInt(options.startTime) | 59 | this.startTime = timeToInt(options.startTime) |
60 | console.log(this.startTime) | ||
60 | 61 | ||
61 | player.src({ | 62 | player.src({ |
62 | type: options.type, | 63 | type: options.type, |
@@ -98,10 +99,25 @@ class P2pMediaLoaderPlugin extends Plugin { | |||
98 | this.runStats() | 99 | this.runStats() |
99 | 100 | ||
100 | this.hlsjs.on('hlsLevelLoaded', () => { | 101 | this.hlsjs.on('hlsLevelLoaded', () => { |
101 | if (this.startTime) this.player.currentTime(this.startTime) | 102 | console.log('hello1') |
103 | if (this.startTime) { | ||
104 | this.player.currentTime(this.startTime) | ||
105 | } | ||
102 | 106 | ||
103 | this.hlsjs.off('hlsLevelLoaded', this) | 107 | this.hlsjs.off('hlsLevelLoaded', this) |
104 | }) | 108 | }) |
109 | |||
110 | this.hlsjs.on('hlsFragParsed', () => { | ||
111 | console.log('hello2') | ||
112 | }) | ||
113 | |||
114 | this.hlsjs.on('hlsFragBuffered', () => { | ||
115 | console.log('hello 3') | ||
116 | }) | ||
117 | |||
118 | this.player.one('loadedmetadata', () => { | ||
119 | console.log('hello 4') | ||
120 | }) | ||
105 | } | 121 | } |
106 | 122 | ||
107 | private runStats () { | 123 | private runStats () { |