APP-2670: add multipart video upload transport (#11222)

This commit is contained in:
Spence Pope
2026-07-29 12:54:03 -04:00
committed by GitHub
parent c6a40088dd
commit a35c4ac4ba
22 changed files with 1240 additions and 6 deletions
+15 -1
View File
@@ -326,6 +326,7 @@ export async function processVideo(
did,
signal,
i18n,
onTransport: telemetry.uploadTransport,
setProgress: p => {
dispatch({type: 'update_progress', progress: p, signal})
},
@@ -387,7 +388,7 @@ export async function processVideo(
telemetry.processingFailed(e)
dispatch({
type: 'to_error',
error: i18n._(msg`Video failed to process`),
error: getProcessingErrorMessage(status?.error, i18n),
signal,
})
return // Exit async loop
@@ -420,6 +421,19 @@ export async function processVideo(
}
}
function getProcessingErrorMessage(error: string | undefined, i18n: I18n) {
switch (error) {
case 'video_too_long':
return i18n._(msg`The selected video is too long.`)
case 'bad_aspect_ratio':
return i18n._(msg`The selected video has an unsupported aspect ratio.`)
case 'unsupported_codec':
return i18n._(msg`The selected video uses an unsupported format.`)
default:
return i18n._(msg`Video failed to process`)
}
}
function getCompressErrorMessage(e: unknown, i18n: I18n): string | null {
if (e instanceof AbortError) {
return null