expo-av: video need to start automatically

Please provide the following:

  1. SDK Version: 4.2.1
  2. Platforms: all
  3. video, expo-av

how to play a video automatically just after it’s been loaded
I tried this with expo-av

<Video
        ref={video}
        style={styles.video}
        source={{
          uri: 'http://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4',
        }}
        isLooping
        resizeMode="contain"
        onPlaybackStatusUpdate={status => setStatus(() => status)}
        onLoad={() => {video.setPositionAsync(0); video.current.playAsync()}}
        
      />

Hey @adminofsili, you can pass the shouldPlay prop to the Video component.

Cheers,
Adam

Thanks a lot. How come I skipped this! Need to read every documentation thoroughly before asking.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.