diff options
author | Shravya Ramesh <37447613+shravyaramesh@users.noreply.github.com> | 2021-07-23 16:01:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-23 16:01:16 -0700 |
commit | 93b0bdb6d5d3070ece012626f9d9d6634f0eb0d8 (patch) | |
tree | de1aab12445184023db6b7f1e5dce94e8416d233 /src/components/moments/TrimmerPlayer.tsx | |
parent | 6fcfb36b37dd51d3e9d5baf025b896cc6f6045ee (diff) | |
parent | 2f64db843b80229d08f8f0ae7e1d80b24ac38c12 (diff) |
Merge branch 'master' into tma936-pause-video
Diffstat (limited to 'src/components/moments/TrimmerPlayer.tsx')
-rw-r--r-- | src/components/moments/TrimmerPlayer.tsx | 7 |
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) { |