Make GIFs look like GIFs (#9809)
* set presentation field in record * refer to it as a gif in the composer * video player gif presentation style * tweak badge * only do the "manual loop" when absolutely necessary * mute gifs * reuse gif controls component for tenor gifs * update media previews in notifications * edit comment * remove outdated prop
This commit is contained in:
@@ -2290,22 +2290,40 @@ function VideoUploadToolbar({state}: {state: VideoState}) {
|
||||
|
||||
let text = ''
|
||||
|
||||
const isGif = state.video?.mimeType === 'image/gif'
|
||||
|
||||
switch (state.status) {
|
||||
case 'compressing':
|
||||
text = _(msg`Compressing video...`)
|
||||
if (isGif) {
|
||||
text = _(msg`Compressing GIF...`)
|
||||
} else {
|
||||
text = _(msg`Compressing video...`)
|
||||
}
|
||||
break
|
||||
case 'uploading':
|
||||
text = _(msg`Uploading video...`)
|
||||
if (isGif) {
|
||||
text = _(msg`Uploading GIF...`)
|
||||
} else {
|
||||
text = _(msg`Uploading video...`)
|
||||
}
|
||||
break
|
||||
case 'processing':
|
||||
text = _(msg`Processing video...`)
|
||||
if (isGif) {
|
||||
text = _(msg`Processing GIF...`)
|
||||
} else {
|
||||
text = _(msg`Processing video...`)
|
||||
}
|
||||
break
|
||||
case 'error':
|
||||
text = _(msg`Error`)
|
||||
wheelProgress = 100
|
||||
break
|
||||
case 'done':
|
||||
text = _(msg`Video uploaded`)
|
||||
if (isGif) {
|
||||
text = _(msg`GIF uploaded`)
|
||||
} else {
|
||||
text = _(msg`Video uploaded`)
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import {useRef} from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {Image} from 'expo-image'
|
||||
import {type ImagePickerAsset} from 'expo-image-picker'
|
||||
@@ -24,7 +24,7 @@ export function VideoPreview({
|
||||
clear: () => void
|
||||
}) {
|
||||
const t = useTheme()
|
||||
const playerRef = React.useRef<BlueskyVideoView>(null)
|
||||
const playerRef = useRef<BlueskyVideoView>(null)
|
||||
const autoplayDisabled = useAutoplayDisabled()
|
||||
let aspectRatio = asset.width / asset.height
|
||||
|
||||
|
||||
Reference in New Issue
Block a user