mirror of https://github.com/Chocobozzz/PeerTube
Fix player playback (video never ends)
parent
ee1fc23a87
commit
b224ddd88b
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ function getAverageBandwidthInStore () {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
Loading…
Reference in New Issue