1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Use the same subdomain for connect media

Preventing count as cache miss
This commit is contained in:
xmflsct
2023-01-31 14:26:43 +01:00
parent 602e010cfc
commit 624c1f172c
10 changed files with 36 additions and 22 deletions

View File

@ -1,6 +1,7 @@
import Button from '@components/Button'
import GracefullyImage from '@components/GracefullyImage'
import { Slider } from '@sharcoux/slider'
import { connectMedia } from '@utils/api/helpers/connect'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import { Audio } from 'expo-av'
@ -26,7 +27,7 @@ const AttachmentAudio: React.FC<Props> = ({ total, index, sensitiveShown, audio
const playAudio = useCallback(async () => {
if (!audioPlayer) {
const { sound } = await Audio.Sound.createAsync(
{ uri: audio.url },
connectMedia({ uri: audio.url }) as { uri: string },
{},
// @ts-ignore
props => setAudioPosition(props.positionMillis)