diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/moments/TrimmerPlayer.tsx | 7 | ||||
-rw-r--r-- | src/screens/upload/EditMedia.tsx | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/components/moments/TrimmerPlayer.tsx b/src/components/moments/TrimmerPlayer.tsx index 87b3a786..247c270f 100644 --- a/src/components/moments/TrimmerPlayer.tsx +++ b/src/components/moments/TrimmerPlayer.tsx @@ -73,7 +73,12 @@ const TrimmerPlayer: React.FC<TrimmerPlayerProps> = ({ repeat={true} onLoad={(payload) => { setEnd(payload.duration); - handleLoad(payload.naturalSize); + const {width, height} = payload.naturalSize; + if (payload.naturalSize.orientation === 'portrait') { + handleLoad(height, width); + } else { + handleLoad(width, height); + } }} onProgress={(e) => { if (!paused) { diff --git a/src/screens/upload/EditMedia.tsx b/src/screens/upload/EditMedia.tsx index f8e7692d..10f5f2fb 100644 --- a/src/screens/upload/EditMedia.tsx +++ b/src/screens/upload/EditMedia.tsx @@ -338,8 +338,7 @@ export const EditMedia: React.FC<EditMediaProps> = ({route, navigation}) => { height: SCREEN_WIDTH / aspectRatio, }, ]} - handleLoad={(response: {width: number; height: number}) => { - const {width, height} = response; + handleLoad={(width: number, height: number) => { setOrigDimensions([width, height]); setAspectRatio(width / height); }} |