Remove multipart upload and 10-minute video feature gates

Ship both video upload features unconditionally:

- Multipart upload is now always attempted. The MultipartFallbackError
  path to the legacy single-request upload is unchanged, so a video
  service without multipart support still works. This makes the plain
  'legacy' upload transport unreachable, so drop it from
  VideoUploadTransport and default the telemetry value to 'multipart'.
- The 10-minute duration cap now applies to everyone.
  VIDEO_10_MINUTE_MAX_DURATION_MS is folded into VIDEO_MAX_DURATION_MS,
  and the composer's duration error message no longer branches on the
  gate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mn8DoxP5wQk6NbPmapWs9A
This commit is contained in:
Claude
2026-08-21 19:45:43 +00:00
committed by Samuel Newman
parent 56bff45546
commit 4bb0e1971a
9 changed files with 42 additions and 100 deletions
+1 -2
View File
@@ -194,8 +194,7 @@ export const MAX_LABELERS = 20
export const VIDEO_SERVICE = 'https://video.bsky.app'
export const VIDEO_SERVICE_DID = 'did:web:video.bsky.app'
export const VIDEO_MAX_DURATION_MS = 3 * 60 * 1000 // 3 minutes in milliseconds
export const VIDEO_10_MINUTE_MAX_DURATION_MS = 10 * 60 * 1000
export const VIDEO_MAX_DURATION_MS = 10 * 60 * 1000 // 10 minutes in milliseconds
/**
* Maximum size of a video in megabytes, _not_ mebibytes. Backend uses
* ISO megabytes.
+1 -1
View File
@@ -72,7 +72,7 @@ export function createVideoTelemetry({
let phaseStartedAt = startedAt
let jobId: string | undefined
let uploadBytes: number | undefined
let uploadTransport: VideoUploadTransport = 'legacy'
let uploadTransport: VideoUploadTransport = 'multipart'
let txnEnded = false
let abortBound = true
+1 -1
View File
@@ -5,7 +5,7 @@
export type VideoCompressSkipReason =
'gif' | 'below-byte-threshold' | 'no-webcodecs' | 'compress-error-fallback'
export type VideoUploadTransport = 'multipart' | 'legacy' | 'legacy-fallback'
export type VideoUploadTransport = 'multipart' | 'legacy-fallback'
export type CompressedVideo = {
uri: string
+13 -18
View File
@@ -10,7 +10,6 @@ import {
type CompressedVideo,
type VideoUploadTransport,
} from '#/lib/media/video/types'
import {Features, features} from '#/analytics/features'
import {type app} from '#/lexicons'
import {MultipartFallbackError, uploadVideoMultipart} from './multipart/upload'
import {
@@ -45,23 +44,19 @@ export async function uploadVideo({
}
await getVideoUploadLimits(client, i18n)
if (features.isOn(Features.VideoMultipartUploadEnable)) {
try {
return await uploadVideoMultipart({
video,
client,
dispatchUrl,
setProgress,
signal,
onStarted: () => onTransport?.('multipart'),
})
} catch (err) {
if (!(err instanceof MultipartFallbackError)) throw err
onTransport?.('legacy-fallback')
setProgress(0)
}
} else {
onTransport?.('legacy')
try {
return await uploadVideoMultipart({
video,
client,
dispatchUrl,
setProgress,
signal,
onStarted: () => onTransport?.('multipart'),
})
} catch (err) {
if (!(err instanceof MultipartFallbackError)) throw err
onTransport?.('legacy-fallback')
setProgress(0)
}
const uri = createVideoEndpointUrl('/xrpc/app.bsky.video.uploadVideo', {
+13 -18
View File
@@ -9,7 +9,6 @@ import {
type CompressedVideo,
type VideoUploadTransport,
} from '#/lib/media/video/types'
import {Features, features} from '#/analytics/features'
import {type app} from '#/lexicons'
import {MultipartFallbackError, uploadVideoMultipart} from './multipart/upload'
import {
@@ -44,23 +43,19 @@ export async function uploadVideo({
}
await getVideoUploadLimits(client, i18n)
if (features.isOn(Features.VideoMultipartUploadEnable)) {
try {
return await uploadVideoMultipart({
video,
client,
dispatchUrl,
setProgress,
signal,
onStarted: () => onTransport?.('multipart'),
})
} catch (err) {
if (!(err instanceof MultipartFallbackError)) throw err
onTransport?.('legacy-fallback')
setProgress(0)
}
} else {
onTransport?.('legacy')
try {
return await uploadVideoMultipart({
video,
client,
dispatchUrl,
setProgress,
signal,
onStarted: () => onTransport?.('multipart'),
})
} catch (err) {
if (!(err instanceof MultipartFallbackError)) throw err
onTransport?.('legacy-fallback')
setProgress(0)
}
const uri = createVideoEndpointUrl('/xrpc/app.bsky.video.uploadVideo', {