You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello team, If I placed a short video instead of Image, then when I swipe the video it keeps on playing with sound. That means it is not destroying the video widget. Any workaround?
The text was updated successfully, but these errors were encountered:
@haidernaqvi87 Can't you stop the video the moment it is swiped? Depending on what widget you use to play the video, there should be a controller that lets you stop the video. (Usually video_player)
You can use the onWillMoveNext: (index, swipeDirection) param. This function is called before performing a swipe. It will return true or false depending on whether or not you want to allow the movement. Anyways, before returning a true or a false, stop the video from playing.
Now if you're worried about the memory because the video not being destroyed, I guess you can do the following. In the onSwipeCompleted: (index, direction) param, send a function that will nullify or clear or the video from the list. yourList[index] = null; and reset the state setState({}). It will rebuild, but nothing will change on the user's side the controller's index is index + 1 (cause you swiped already). Just make sure that on the card builder, you cater for the null.
Hello team, If I placed a short video instead of Image, then when I swipe the video it keeps on playing with sound. That means it is not destroying the video widget. Any workaround?
The text was updated successfully, but these errors were encountered: