[Video] Add dimension info to share intent (#5639)

This commit is contained in:
Hailey
2024-10-07 14:09:47 -07:00
committed by GitHub
parent 94e7bfbe40
commit ee25b89801
5 changed files with 47 additions and 14 deletions
+2 -1
View File
@@ -93,9 +93,10 @@ export function useComposeIntent() {
// Whenever a video URI is present, we don't support adding images right now.
if (videoUri) {
const [uri, width, height] = videoUri.split('|')
openComposer({
text: text ?? undefined,
videoUri,
videoUri: {uri, width: Number(width), height: Number(height)},
})
return
}
+1 -1
View File
@@ -38,7 +38,7 @@ export interface ComposerOpts {
openEmojiPicker?: (pos: DOMRect | undefined) => void
text?: string
imageUris?: {uri: string; width: number; height: number; altText?: string}[]
videoUri?: string
videoUri?: {uri: string; width: number; height: number}
}
type StateContext = ComposerOpts | undefined
+1 -1
View File
@@ -218,7 +218,7 @@ export const ComposePost = ({
// Whenever we receive an initial video uri, we should immediately run compression if necessary
useEffect(() => {
if (initVideoUri) {
selectVideo({uri: initVideoUri} as ImagePickerAsset)
selectVideo(initVideoUri)
}
}, [initVideoUri, selectVideo])