Expo video plays in different time position on long press - react-native

I want to make this feature with React Native Expo-AV Video component.
When user long press on video component, video will play 1 second at 4 different time positions like in xvideos' videos.Or do they use gif in video's poster?

Related

How to play 2 videos in react native and that can play/pause by one button?? I am using react-native-video

I want to play 2 videos with play pause by one button. both Video will pause on same time and will play on same time when we clicked on button.
I am using react-native-video.
Give ref to both videos, video1Ref and video2Ref, and on button press just start videos on both refs.
Both Video having different different ref and add these properties.
ref={playerRef1}
disableFocus={true}
useTextureView={false}
playInBackground={true}

In react-native-video, how do I reset the video player when the video has finished playing?

I have a react-native app with videos that I am displaying using react-native-video. Right now when the video has finished playing you have to manually drag the control for the position of the video back to zero and then press play to have the video restart.
How can I make the video automatically reset when it has been played to the end? (Or even better, is there any way to add a replay button?)
Currently the app is only for iOS.
Try adding repeat value equals to true in Video Component. It will do your work and video will autoplay upon ending.
<Video...repeat={true}/>

Stop media player in webview while another is playing

I have two tabs on React Native application. Both tabs are WebView and can play audio inside.
Step 1. At Tab 1. I play an audio
Step 2. I switch to Tab 2 and click on play audio button to play other audio
=> Result is both audio play at the same time.
Could you please show me how to pause audio of Tab 1 before play audio on Tab 2?

How to Get the Playable duration in react native video when the video is paused

I am using the react-native https://github.com/react-native-community/react-native-video library to play the videos in my mobile app.
Now I wanted to show the playable duration ( amount of video that is already loaded in the player) as you can see in the picture
To get the playable duration i am using the following method
onProgress={this.onProgress.bind(this)}
Problem here is that this method only triggers when the video is playing ,this method is not called when the video is paused
so my question is is there any way i can get the playable duration when the video is paused

stop all videos when a new video is played in react native

i want to stop all video when new video is playing. I am using react-native-video library to play video. If I play a video it starts playing, if I click on another video in the list it also starts playing, both videos are getting played at the same time
Keep an array of video play/pause state to ensure that only one can be true at a time. Then update the Video component paused property on update.