1
0
Fork 0

Fix player playback (video never ends)

This commit is contained in:
Chocobozzz 2018-08-28 10:23:01 +02:00
parent ee1fc23a87
commit b224ddd88b
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 7 additions and 2 deletions

View file

@ -118,7 +118,13 @@ export class PeertubeChunkStore extends EventEmitter {
// IndexDB could be slow, use our memory index first
const memoryChunk = this.memoryChunks[index]
if (memoryChunk === undefined) return cb(null, new Buffer(0))
if (memoryChunk === undefined) {
const err = new Error('Chunk not found')
err['notFound'] = true
return process.nextTick(() => cb(err))
}
// Chunk in memory
if (memoryChunk !== true) return cb(null, memoryChunk)

View file

@ -52,7 +52,6 @@ function getAverageBandwidthInStore () {
return undefined
}
// ---------------------------------------------------------------------------
export {