react-nativereact-native-video

react-native-video only play first few seconds of video


Anyone knows how to only play the first few seconds, and repeat it in a react-native video?

I have a profile page which displays all the videos of the user. Currently its playing the whole video but i only want the first few seconds (something like Tiktok).


Solution

  • There is no sense in doing it that way. Probably TikTok takes the "five seconds" and transforms it into GIF using something like a GIFIFY (https://github.com/jclem/gifify). If someone asked me to do this, I would certainly do so.

    EDIT: I think that you can create a code/component that displays only the X seconds, I think its possible