react-native-video: React native Video is not working on iOS.

Video player is working on android but not in iOS. “react-native”: “^0.42.3”, “react-native-video”: “^1.0.0”

this.url is the url without “.mp4”. <View style={styles.container} onLayout={this._handleLayout}> <TouchableOpacity style={styles.fullScreen} onPress={() => this.setState({ paused: !this.state.paused })}> <Video ref={(ref: Video) => { this.video = ref }} source={{uri:this.url}} style={styles.fullScreen} rate={this.state.rate} paused={this.state.paused} volume={this.state.volume} controls={true} muted={this.state.muted} resizeMode={this.state.resizeMode} onLoad={this.onLoad} onProgress={this.onProgress} onEnd={this.onEnd} repeat={false} /> </TouchableOpacity> </View>

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (1 by maintainers)

Most upvoted comments

Have you tried setting allow arbitrary loads to true in your info.plist for iOS?

<key>NSAppTransportSecurity</key>
<dict>
	<key>NSAllowsArbitraryLoads</key>
	<true/>
</dict>

More info here: https://stackoverflow.com/questions/30731785/how-do-i-load-an-http-url-with-app-transport-security-enabled-in-ios-9

Edit info.plist to allow the arbitrary load. This will solve the problem.

screen shot 2018-05-18 at 12 35 30 am

allowing arbitrary loads does not fix the issue. Any suggestions??

Same issue