3

I'm trying to display an Alert message when the video is done loading, but this event doesn't seem to be firing; I've seen that other people have had similar issues, but I haven't been able to find a solution yet.

  <Video
    onLoad={() => Alert.alert("LOADING")}
    ref={video}
    style={styles.video}
    source={{
      uri: "www.myvideo.com",
    }}
    repeat
  />
gerbileee
  • 125
  • 6

1 Answers1

-3

onLoadedData event does the trick:

  <Video
    onLoadedData={() => Alert.alert("LOADING")}
    ref={video}
    style={styles.video}
    source={{
      uri: "www.myvideo.com",
    }}
    repeat
  />
David
  • 5,882
  • 3
  • 33
  • 44
Yehuda Zvi
  • 239
  • 3
  • 9