Update src/utils/thumbnailCreator.ts

Co-authored-by: thehairy <71461991+thehairy@users.noreply.github.com>
This commit is contained in:
Emre Can Minnet 2023-06-14 09:15:29 +03:00 committed by GitHub
parent 5d5ab76712
commit e105321b58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@ export default async function* extractThumbnails(
video.crossOrigin = "anonymous";
// Wait for the video metadata to load
const metadata = await new Promise((resolve, reject) => {
await new Promise((resolve, reject) => {
video.addEventListener("loadedmetadata", resolve);
video.addEventListener("error", reject);
});