1
0
Fork 0

Fix start time on HLS videos

This commit is contained in:
Chocobozzz 2019-08-13 11:08:36 +02:00
parent dfe4294a72
commit e028d98372
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 16 deletions

View File

@ -98,25 +98,10 @@ class P2pMediaLoaderPlugin extends Plugin {
this.runStats() this.runStats()
this.hlsjs.on('hlsLevelLoaded', () => { this.player.one('canplay', () => {
console.log('hello1')
if (this.startTime) { if (this.startTime) {
this.player.currentTime(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')
}) })
} }