amazon-ivs-react-native-player
amazon-ivs-react-native-player copied to clipboard
How to play repeating after a video ended playing
How can we enable a video to play again from start after end playing
const onPlayerStateChange = useCallback(
(onPlayerStateChange) => {
if (onPlayerStateChange === 'Ended') {
playerRef.current?.play();
}
},
[]
);
But I would find a loop prop more convenient too
Hi all, thanks for the feedback. We don’t have a loop
prop currently, but I will leave this open for others to +1.
Hey @maxstoller, what should be the ideal way to play videos in loop?
Hi @dmahajan980, the code snippet @hirbod provided above should work.
Hi @dreamrsio we now have support for loop
https://github.com/aws/amazon-ivs-react-native-player/blob/main/docs/ivs-player-reference.md#loop-optional