Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

React native video not playing video from uri response from React native cameraroll on iOS

$
0
0

I am trying to play react native video from uri returned by react native cameraroll. but video is blank. Code for camera roll is:

CameraRoll.getPhotos({ first: 100, assetType: 'videos', }) .then(r => {

      this.getPhotosFromCamera(r.edges);
    })
    .catch((err) => {
      console.log("here in error : ", err)
      //Error Loading Images
    });

and when I pass an individual uri into react native video player, it is still showing blank.

<Video
        ref={(ref) => this.videoPlayer = ref}
        source={{ uri: item.node.image.uri  }}
        rate={1.0}
        volume={1.0}
        muted={false}
        paused={true}
        stop={!this.props.screenAppearing}
        ignoreSilentSwitch='ignore'
        resizeMode="contain"
        startTime={this.state.videoStartTime}
        endTime={this.state.videoEndTime}
        onLoad={ev => this.videoDuration = ev.duration}
        onProgress={ev => {
          Animated.event([
            { left: this.progressPan }
          ])({
            left: (ev.currentTime/this.videoDuration)*Dimensions.get('window').width
          })
        }}
        style={{
          height: Dimensions.get('window').width*0.8
        }}
      />

Please help. Thanks.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>