Fix player playback (video never ends)
This commit is contained in:
parent
ee1fc23a87
commit
b224ddd88b
2 changed files with 7 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ function getAverageBandwidthInStore () {
|
|||
return undefined
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
|
|
Loading…
Reference in a new issue