aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-28 10:23:01 +0200
committerChocobozzz <me@florianbigard.com>2018-08-28 10:23:21 +0200
commitb224ddd88b767b9a6402e3648993b4f2707057ef (patch)
tree77ae8a19bea4e52da97f623e82fd21a6ac4c00b8 /client/src/assets
parentee1fc23a8794364687ea06cbb738bc5f6ce70d7f (diff)
downloadPeerTube-b224ddd88b767b9a6402e3648993b4f2707057ef.tar.gz
PeerTube-b224ddd88b767b9a6402e3648993b4f2707057ef.tar.zst
PeerTube-b224ddd88b767b9a6402e3648993b4f2707057ef.zip
Fix player playback (video never ends)
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/player/peertube-chunk-store.ts8
-rw-r--r--client/src/assets/player/peertube-player-local-storage.ts1
2 files changed, 7 insertions, 2 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
diff --git a/client/src/assets/player/peertube-player-local-storage.ts b/client/src/assets/player/peertube-player-local-storage.ts
index 6882f68a6..dac54c5a4 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 () {
52 return undefined 52 return undefined
53} 53}
54 54
55
56// --------------------------------------------------------------------------- 55// ---------------------------------------------------------------------------
57 56
58export { 57export {