I am getting started with react-native development. I am using react-native-video to add a video in my application.
I wanted to seek back and forth in a video in a for-loop and hold it for a given timeout using React-Native. I am using react-native-video as the video component. The following is my code.
for (let i = 0; i < count; i++) {
var v1 = data.ModelList[i].Value;
var duration = data.ModelList[i].Duration;
new Promise((resolve) => {
setTimeout(() => resolve(this.player.seek((v1*10+15),0)), duration);
});
}
Expectation: In each iteration, I want to seek the video and wait for certain milliseconds and move to the next iteration of the for-loop.
Can someone help me with this