[Video] Add dimension info to share intent (#5639)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user