examples icon indicating copy to clipboard operation
examples copied to clipboard

React-native-video is not playing on android

Open akashdk opened this issue 7 years ago • 1 comments

Hello, @browniefed I really appreciate your work at codedaily. It is a great tutorial. I'm a react native beginner.I'm trying to play a basic video using react-native-video I get nothing only a blank screen is appear.is the version is a bug ? or android simulator is not working well? I have no clue. Thanks!

akashdk avatar Jun 05 '18 16:06 akashdk

hello @akashdk you need to provide width and height in style otherwise you cant see anything. see below how i added style, you can add the same

<Video 
                    paused = {this.state.paused}
                    source={{uri:`${Uri}`}}
                    resizeMode="cover"
                    style={{width:"100%", height: 250,}}
                    onError={this.handleError}
                    onLoad = {this.handleLoad}
                    onProgress = {this.handleProgress}
                    onEnd = {this.handleEnd}
                    ref = {ref=>this.player = ref}
                />     

AshishCd avatar Apr 05 '19 07:04 AshishCd