aboutsummaryrefslogtreecommitdiff
path: root/src/components/moments/TrimmerPlayer.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/moments/TrimmerPlayer.tsx')
-rw-r--r--src/components/moments/TrimmerPlayer.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/moments/TrimmerPlayer.tsx b/src/components/moments/TrimmerPlayer.tsx
index 87b3a786..8d1cd156 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, payload.duration);
+ } else {
+ handleLoad(width, height, payload.duration);
+ }
}}
onProgress={(e) => {
if (!paused) {