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:
Samuel Newman
2026-02-04 21:05:17 +02:00
committed by GitHub
parent da5c356fc7
commit b3cbb3440a
9 changed files with 239 additions and 145 deletions
+22 -4
View File
@@ -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