Spoke icon indicating copy to clipboard operation
Spoke copied to clipboard

Change `onloadeddata` to `oncanplay`

Open EthanMichalicek opened this issue 3 years ago • 0 comments

Due to an obscure timing issue with HTML5Video in certain browsers, i.e. Chrome, video.onloadeddata can fire a split-second before the data is actually ready. In this chunk of code, this can occasionally cause certain video files (I believe it to be some HD video files, specifically) to fail to upload during thumbnail generation with the error "file not found" because the blobbed URL is sometimes revoked too quickly. This was an issue my team ran into with a high resolution video (2048x1024, ~50MB).

I'm not sure if replacing onloadeddata with oncanplay is the best solution, but it did fix the problem we were having, since the video now relies on being able to start video playback before revoking the data URL.

┆Issue is synchronized with this Jira Task

EthanMichalicek avatar Jul 01 '21 14:07 EthanMichalicek