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.

@adamdexter
Copy link

This works! Including on the new audio/video version of the platform. I accidentally ran a 01:53:00 show in an incognito tab and my track failed to upload. This script was able to recover the first 20 minutes of the video and .wav audio and thankfully 01:37:00 of my audio as mp3. I'm still missing the last 16 minutes but I'll take that over nothing. Thanks @mscottford!

@mscottford
Copy link
Author

Wow! I'm so glad this ended up helping someone. I would have thought for sure that this would have stopped working at some point. That's a real bummer about those last 16 minutes, @adamdexter.

@adamdexter
Copy link

It did! Thanks again. Bummer yes, though 97 minutes is better than 0. Fun fact, after a lot of back and forth the Zencastr support chat, the agent was the one to actually sent me the link to this repo as a "very unconventional" last-ditch option, so this is on their radar, pretty cool!

@nc7fsu
Copy link

nc7fsu commented Feb 24, 2021

Summary of my Problem. We had 4 different inputs being recorded... Audio and video. When we stopped the recording it uploaded half, then glitched and froze. We all left and reentered the room and it immediately began recording without anything being clicked. I stopped it at 10 seconds and that uploaded immediately. I couldn't find all of the files. I went back to the classic page and found all except my recording. I really need help finding it.

Everything looks simple except # 5.

  1. paste the script into the prompt and hit enter.

What script do I paste. I know nothing about coding or almost anything I see in the Console Tab.

Please help.

@nc7fsu
Copy link

nc7fsu commented Feb 24, 2021

Screen Shot 2021-02-24 at 5 34 28 PM

Screen Shot 2021-02-24 at 5 34 37 PM

@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