[Video] Additional android fixes (#5373)

* rm unused code

* bump lib

* invert bool
This commit is contained in:
Hailey
2024-09-16 22:04:59 -07:00
committed by GitHub
parent b69fd23456
commit 0414b95c58
4 changed files with 7 additions and 16 deletions
@@ -44,7 +44,7 @@ export function VideoPreview({
]}>
<BlueskyVideoView
url={video.uri}
autoplay={autoplayDisabled}
autoplay={!autoplayDisabled}
beginMuted={true}
forceTakeover={true}
ref={playerRef}
@@ -7,7 +7,6 @@ import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {HITSLOP_30} from '#/lib/constants'
import {clamp} from '#/lib/numbers'
import {useAutoplayDisabled} from '#/state/preferences'
import {useVideoMuteState} from 'view/com/util/post-embeds/VideoVolumeContext'
import {atoms as a, useTheme} from '#/alf'
@@ -54,16 +53,8 @@ export const VideoEmbedInnerNative = React.forwardRef(
throw new Error(error)
}
let aspectRatio = 16 / 9
if (embed.aspectRatio) {
const {width, height} = embed.aspectRatio
aspectRatio = width / height
aspectRatio = clamp(aspectRatio, 1 / 1, 3 / 1)
}
return (
<View style={[a.flex_1, a.relative, {aspectRatio}]}>
<View style={[a.flex_1, a.relative]}>
<BlueskyVideoView
url={embed.playlist}
autoplay={!autoplayDisabled && !isWithinMessage}