Skip to content

Instantly share code, notes, and snippets.

@mscottford
Last active March 23, 2023 16:03
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mscottford/16f0222b75e5f0ac70e4b2076ecf7b15 to your computer and use it in GitHub Desktop.
Save mscottford/16f0222b75e5f0ac70e4b2076ecf7b15 to your computer and use it in GitHub Desktop.
Small snippet to recover local recordings Zencastr has stored in IndexedDB. I used this to recover an audio file that failed to upload.
app.location.recordings.each(function (recording) {
recording.tracks.each(function (track) {
track.downloadFromLocal(window.location.href);
})
})

Zencastr Recovery Script

This is a small snippet to recover local recordings Zencastr has stored in IndexedDB. I used this to recover an audio file that failed to upload.

To run it (instrutions for Google Chrome, you may have to adapt for other web browsers):

  1. open the web browser you were using when you made the recording,
  2. visit the Zencastr URL where you made the recording,
  3. right click on the page and select "Inspect",
  4. click on the "Console" tab,
  5. paste the script into the prompt and hit enter.

The file should then show up as a typical download does. For me that's to automatically download in my Downloads directory.

@tylerlwhite
Copy link

Hey @mscottford! Thank you for posting this. This is what happens when I try out your script:
Screen Shot 2021-03-03 at 11 00 01 AM
Screen Shot 2021-03-03 at 11 00 18 AM

@timbit-bot
Copy link

Thank you @mscottford! This worked fabulously. I followed your instructions and was able to retrieve the mp3 file when the recovery link by Zencastr did not work. You saved my life!

@marcosdelgadosacristan
Copy link

Hola buenas, porfavor alguien sabe que hacer cuando no puedo acceder al ordenador de mi invitado.
Tengo mis archivos pero los suyos están en un limbo y necesito recuperarlos

@joaquimrocha
Copy link

I am getting Uncaught (in promise) Error: Store is empty which looks like the same issue as https://gist.github.com/mscottford/16f0222b75e5f0ac70e4b2076ecf7b15#gistcomment-3652565 .
This happened with Chromium. Apparently I have to re-record everything...

@mscottford
Copy link
Author

@tylerlwhite:

Hey @mscottford! Thank you for posting this. This is what happens when I try out your script: Screen Shot 2021-03-03 at 11 00 01 AM Screen Shot 2021-03-03 at 11 00 18 AM

@ joaquimrocha:

I am getting Uncaught (in promise) Error: Store is empty which looks like the same issue as https://gist.github.com/mscottford/16f0222b75e5f0ac70e4b2076ecf7b15#gistcomment-3652565 . This happened with Chromium. Apparently I have to re-record everything...

It could be that you've found an edge case that this little snippet doesn't work for. Do you see anything saved in localStorage?

@joaquimrocha
Copy link

I don't have anything indeed in the local storage. This happened on Chromium, no UI feedback at all during the recording that things were not getting stored. 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment