Skip to content

Commit

Permalink
video: Fix clearTemporaryVideoDB method
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl committed Feb 21, 2024
1 parent a9bb59d commit dd567cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/stores/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,13 @@ export const useVideoStore = defineStore('video', () => {

// Used to clear the temporary video database
const clearTemporaryVideoDB = async (): Promise<void> => {
await tempVideoChunksDB.iterate((_, chunkName) => {
tempVideoChunksDB.removeItem(chunkName)
const tempChunks: string[] = []
await videoStoringDB.iterate((_, name) => {
tempChunks.push(name)
})
for (const chunk of tempChunks) {
await videoStoringDB.removeItem(chunk)
}
}

// Used to store chunks of an ongoing recording, that will be merged into a video file when the recording is stopped
Expand Down

0 comments on commit dd567cd

Please sign in to comment.