Видео Expo работает, но видео не отображается + происходит сбой моего приложенияIOS

Программируем под IOS
Ответить
Гость
 Видео Expo работает, но видео не отображается + происходит сбой моего приложения

Сообщение Гость »


I am currently building an app in React Native with Expo and I want to have a screen where I display a video. I am currently trying to do that with Expo Video but it isn't going that well. Here is the code of the screen:

Код: Выделить всё

function VideosScreen({ navigation }) {   const video = React.useRef(null);   const [status, setStatus] = React.useState({});   return (                      setStatus(() => status)}         />                                   status.isPlaying                 ? video.current.pauseAsync()                 : video.current.playAsync()             }           />                        ); } 
I have no errors, and the page looks like this:

https://imgur.com/a/4TwRyxJ

If I press play the video does play (I can hear the sound) and it does pause but the video just doesn't show up.

This code has been just copy pasted from their doc about it https://docs.expo.dev/versions/latest/sdk/video/.

For my second issue, when I exit out of this screen (either use the ui up top or create a separate button) it crashes my app after about 1s. I tried linking the button to multiple other screens with the same result.

Thank you in advance for your help.

I have tried to link the big buck bunny video instead with the same exact result.

I have double checked the video format and it is indeed .mp4.


Источник: https://stackoverflow.com/questions/781 ... ing-my-app
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»