Fix player playback (video never ends)

pull/959/merge
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 // IndexDB could be slow, use our memory index first
const memoryChunk = this.memoryChunks[index] 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 // Chunk in memory
if (memoryChunk !== true) return cb(null, memoryChunk) if (memoryChunk !== true) return cb(null, memoryChunk)

View File

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