Reputation: 21
I have a problem with 'expo-video-player' package. I want to show a video through expo-video-player but when I load the component it throws an error and I don't know how to resolve it, so I need help..
I've tried change the package source code and the component props but it doesn't works
Here is the code: (Example code from expo-video-player)
import { Video } from 'expo'
import VideoPlayer from 'expo-video-player'
<VideoPlayer
videoProps={{
shouldPlay: true,
resizeMode: Video.RESIZE_MODE_CONTAIN,
source: {
uri: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
},
}}
isPortrait={true}
playFromPositionMillis={0}
/>
Here is the error:
Error: , setAudioModeAsync error, 1, [Error: Audio mode attempted to be set without the required keys: ["staysActiveInBackground"]] - node_modules\react-native\Libraries\YellowBox\YellowBox.js:59:8 in error - node_modules\expo\build\environment\muteWarnings.fx.js:27:24 in error - ... 17 more stack frames from framework internals
Can anyone help me? Thanks
Upvotes: 2
Views: 1458
Reputation: 195
This issue was created by Expo SDK 33, where some modules has been removed from the core.
Upgrade to the latest version (1.3.0
). It is fixed here.
https://www.npmjs.com/package/expo-video-player
Upvotes: 1