diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-28 10:23:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-28 10:23:21 +0200 |
commit | b224ddd88b767b9a6402e3648993b4f2707057ef (patch) | |
tree | 77ae8a19bea4e52da97f623e82fd21a6ac4c00b8 /client/src/assets/player/peertube-chunk-store.ts | |
parent | ee1fc23a8794364687ea06cbb738bc5f6ce70d7f (diff) | |
download | PeerTube-b224ddd88b767b9a6402e3648993b4f2707057ef.tar.gz PeerTube-b224ddd88b767b9a6402e3648993b4f2707057ef.tar.zst PeerTube-b224ddd88b767b9a6402e3648993b4f2707057ef.zip |
Fix player playback (video never ends)
Diffstat (limited to 'client/src/assets/player/peertube-chunk-store.ts')
-rw-r--r-- | client/src/assets/player/peertube-chunk-store.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/assets/player/peertube-chunk-store.ts b/client/src/assets/player/peertube-chunk-store.ts index e14e31c04..767e46821 100644 --- a/client/src/assets/player/peertube-chunk-store.ts +++ b/client/src/assets/player/peertube-chunk-store.ts | |||
@@ -118,7 +118,13 @@ export class PeertubeChunkStore extends EventEmitter { | |||
118 | 118 | ||
119 | // IndexDB could be slow, use our memory index first | 119 | // IndexDB could be slow, use our memory index first |
120 | const memoryChunk = this.memoryChunks[index] | 120 | const memoryChunk = this.memoryChunks[index] |
121 | if (memoryChunk === undefined) return cb(null, new Buffer(0)) | 121 | if (memoryChunk === undefined) { |
122 | const err = new Error('Chunk not found') | ||
123 | err['notFound'] = true | ||
124 | |||
125 | return process.nextTick(() => cb(err)) | ||
126 | } | ||
127 | |||
122 | // Chunk in memory | 128 | // Chunk in memory |
123 | if (memoryChunk !== true) return cb(null, memoryChunk) | 129 | if (memoryChunk !== true) return cb(null, memoryChunk) |
124 | 130 | ||