mute gifs
This commit is contained in:
@@ -58,7 +58,7 @@ export function VideoEmbedInnerNative({
|
|||||||
<BlueskyVideoView
|
<BlueskyVideoView
|
||||||
url={embed.playlist}
|
url={embed.playlist}
|
||||||
autoplay={!autoplayDisabled && !isWithinMessage}
|
autoplay={!autoplayDisabled && !isWithinMessage}
|
||||||
beginMuted={autoplayDisabled ? false : muted}
|
beginMuted={isGif || autoplayDisabled ? false : muted}
|
||||||
style={[a.rounded_sm]}
|
style={[a.rounded_sm]}
|
||||||
onActiveChange={e => {
|
onActiveChange={e => {
|
||||||
setIsActive(e.nativeEvent.isActive)
|
setIsActive(e.nativeEvent.isActive)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export function VideoEmbedInnerWeb({
|
|||||||
style={{width: '100%', height: '100%', objectFit: 'contain'}}
|
style={{width: '100%', height: '100%', objectFit: 'contain'}}
|
||||||
playsInline
|
playsInline
|
||||||
preload="none"
|
preload="none"
|
||||||
muted={!focused}
|
muted={embed.presentation === 'gif' || !focused}
|
||||||
aria-labelledby={embed.alt ? figId : undefined}
|
aria-labelledby={embed.alt ? figId : undefined}
|
||||||
onTimeUpdate={e => {
|
onTimeUpdate={e => {
|
||||||
lastKnownTime.current = e.currentTarget.currentTime
|
lastKnownTime.current = e.currentTarget.currentTime
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React from 'react'
|
import {useRef} from 'react'
|
||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
import {Image} from 'expo-image'
|
import {Image} from 'expo-image'
|
||||||
import {type ImagePickerAsset} from 'expo-image-picker'
|
import {type ImagePickerAsset} from 'expo-image-picker'
|
||||||
@@ -24,7 +24,7 @@ export function VideoPreview({
|
|||||||
clear: () => void
|
clear: () => void
|
||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const playerRef = React.useRef<BlueskyVideoView>(null)
|
const playerRef = useRef<BlueskyVideoView>(null)
|
||||||
const autoplayDisabled = useAutoplayDisabled()
|
const autoplayDisabled = useAutoplayDisabled()
|
||||||
let aspectRatio = asset.width / asset.height
|
let aspectRatio = asset.width / asset.height
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user