Hello,
what is the best way to catch and handle video processing errors when uploading (unsupported) files using the JS VideoUploader
and a delegated token?
VideoUploader.upload()
happily accepts and uploads anything you throw at it. Uploading, for example, a PDF does not generate a catch
able error i.e. VideoUploader.upload().catch()
is not called.
Playing a broken/unsupported/unprocessed file does throw an error but I’d like to inform users that there’s an issue before they try to play the video i.e. right after their upload completes.
I’m currently polling https://ws.api.video/videos/{videoId}/status
and checking for encoding.playable === true
.
Is this the correct/best approach? How long should I wait for playable === true
before concluding that there was a processing error?
Or should I rather look at ingest.status
? If so, what status does a failed video get? missing
?
I’m looking for the best way to handle API/processing errors in general (vs. unsupported files only).