aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/p2p-media-loader
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-13 11:04:27 +0200
committerChocobozzz <me@florianbigard.com>2019-08-13 11:04:27 +0200
commitdfe4294a7249dc20b5a3625c446e642cdb0cd39d (patch)
tree8339a17f0664fb89ecdf0e55e545fa8d4bafbeca /client/src/assets/player/p2p-media-loader
parent9e3e3617dcea3e31dea60c4d41c9927da98cd560 (diff)
downloadPeerTube-dfe4294a7249dc20b5a3625c446e642cdb0cd39d.tar.gz
PeerTube-dfe4294a7249dc20b5a3625c446e642cdb0cd39d.tar.zst
PeerTube-dfe4294a7249dc20b5a3625c446e642cdb0cd39d.zip
Fix nl_NL locale
Diffstat (limited to 'client/src/assets/player/p2p-media-loader')
-rw-r--r--client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts18
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 () {