0

I have rendered my video element like this, but UI stucks when video element try to load the data from URL. I need it should not stuck, It can load and take time. But should not stuck.

const renderMessageVideo = (props) => {
        console.log('called');
        const { currentMessage } = props;
        return (
          
          <View style={{ position: 'relative', height: 150, width: 250 }}>

          <Video
          style={{
            position: 'absolute',
            left: 0,
            top: 0,
            height: 150,
            width: 250,
            borderRadius: 20,
          }}
          controls={true}
          rate={1.0}
          onBuffer={onBuffer}
          resizeMode="cover"
          paused={true}
          height={150}
          width={250}
          muted={true}
          source={{ uri: currentMessage.video }}
          allowsExternalPlayback={false}></Video>
      
          </View>
        );
      };

Help me to solve this, thanks

0 Answers0