Allow feature-gated 10-minute video uploads (#11388)
This commit is contained in:
@@ -194,6 +194,7 @@ 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
|
||||
/**
|
||||
* Maximum size of a video in megabytes, _not_ mebibytes. Backend uses
|
||||
* ISO megabytes.
|
||||
|
||||
@@ -47,8 +47,10 @@ export async function openPicker(opts?: ImagePickerOptions) {
|
||||
|
||||
export async function openUnifiedPicker({
|
||||
selectionCountRemaining,
|
||||
videoMaxDurationMs = VIDEO_MAX_DURATION_MS,
|
||||
}: {
|
||||
selectionCountRemaining: number
|
||||
videoMaxDurationMs?: number
|
||||
}) {
|
||||
return await launchImageLibraryAsync({
|
||||
exif: false,
|
||||
@@ -61,6 +63,6 @@ export async function openUnifiedPicker({
|
||||
preferredAssetRepresentationMode:
|
||||
UIImagePickerPreferredAssetRepresentationMode.Automatic,
|
||||
videoExportPreset: VideoExportPreset.Passthrough,
|
||||
videoMaxDuration: VIDEO_MAX_DURATION_MS / 1000,
|
||||
videoMaxDuration: videoMaxDurationMs / 1000,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user