react-native-video: Why does the app become slow on Andriod when I use react-native-video?

Why does the app become slow on Andriod when I use react-native-video? The prop.video is a local file URL, I’m using React Native new arch With the latest version of react-native-video ^6.0.0-alpha.7. On iOS I noticed it’s OK. But on Andriod both emulator and real device. It’s not smooth as other apps like TikTok and Instagram are when is comes to video.

import { Dimensions, StyleSheet, View } from 'react-native'
import React from 'react'
import Video from 'react-native-video';

type Props = {
  video: string
}

const { height, width } = Dimensions.get('window');

const Video = (props: Props) => {

  return (
    <View style={{ backgroundColor: 'gray' }}>
      <Video
        source={{ uri: props.video }}
        resizeMode="cover"
        repeat
        paused={true}
        style={styles.backgroundVideo} />
    </View>
  );
}

export default Video;

const styles = StyleSheet.create({
  backgroundVideo: {
    height,
    width,
  },
});

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 1
  • Comments: 30

Most upvoted comments

@freeboub I guess here I’m wrong! Because currently, I’m just pausing the video according to their index and current index values. Like if the current index is not equal to the index then pause.

@freeboub Olivier, I’m sorry! I just got the notification from a comment, 1: Use I tried to use a remote network URL, But I didn’t need any difference between the local file path vs. network URL 2: I see Yes I’m on an older arch, I thought new React native projects were in the new arch by default, I’m sorry my bad.

However, one thing I forgot to share with you is that The videos are displaying like YouTube shorts in a flash-list, And it lags when I move one video to another. So thinking in that case what can be the issue?

Wish you an amazing weekend!

Thank you, but don’t mix both issues…

Video with a path and performances shall be handled in different tickets.