ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix player playback (video never ends)
Chocobozzzb224ddd88b76
diff --git a/client/src/assets/player/peertube-chunk-store.ts b/client/src/assets/player/peertube-chunk-store.tsindex e14e31c046..767e468219 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 {// IndexDB could be slow, use our memory index firstconst 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 memoryif (memoryChunk !== true) return cb(null, memoryChunk)diff --git a/client/src/assets/player/peertube-player-local-storage.ts b/client/src/assets/player/peertube-player-local-storage.tsindex 6882f68a60..dac54c5a4d 100644--- a/client/src/assets/player/peertube-player-local-storage.ts+++ b/client/src/assets/player/peertube-player-local-storage.ts@@ -52,7 +52,6 @@ function getAverageBandwidthInStore () {return undefined}-// ---------------------------------------------------------------------------export {