Android: Video not loading
See original GitHub issueI’m using Expo.Video to render videos whose source is the Vimeo API. It can load the video seamlessly on iOS, however on Android, it loads them randomly, and 90% of the time none of the videos are loaded. They are the same video files on both systems, so they are not broken links.
Has anyone ever had problems loading videos to android and was able to resolve them?
Code fragment:
replay = async (PlaybackStatus) => {
if (PlaybackStatus.didJustFinish) {
await this.videoPlayer.setPositionAsync(0)
this.setState({ shouldPlay: false })
}
}
[…]
<Video
ref={(o) => (this.videoPlayer = o)}
source={{ uri }}
rate={1.0}
volume={1.0}
muted={false}
resizeMode="cover"
style={videoStyle}
shouldPlay={this.state.shouldPlay}
useNativeControls={Platform.OS === 'ios'}
onPlaybackStatusUpdate={(PlaybackStatus) => this.replay(PlaybackStatus)}
/>
P.S. I’m using native controls only on iOS because of the bizarre behavior of Android (it’s still frozen at the same point during scrolling).
Related Packages: “expo”: “^22.0.0”, “react-native”: “https://github.com/expo/react-native/archive/sdk-22.0.1.tar.gz”, “react”: “16.0.0-beta.5”, “axios”: “^0.16.2”, “react-redux”: “^5.0.6”, “redux”: “^3.7.2”, “redux-axios-middleware”: “^4.0.0”,
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (4 by maintainers)
I’m having some serious troubles with videos that work great in iOS and the native android video player. They either don’t show up, or skip many frames, sometimes appear to only show only 2-3 frames while the audio for the who video plays. The issue occurs on both the android simulator and my device. Any tips on how to diagnose?
Same issue with Videos in a Flatlist on Android. SDK32. https://github.com/expo/expo/issues/3443