eneim / toro

Video list auto playback made simple, specially built for RecyclerView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stop Player after change tab - viewpager

lucazin opened this issue · comments

Hello!
Someone can help me?

How can i stop de video when a change my tab on viewpager?

i used this..but not work

@OverRide
public void setUserVisibleHint(boolean isVisibleToUser) {

	ListaFeed_Estabelecimento.this.setUserVisibleHint(isVisibleToUser);
	super.setUserVisibleHint(isVisibleToUser);
}

i have fragment and load video list in recycleview.. how cani stop all when i change tab?

i use the last version of toro and my android is 9.0

thanks!

you can use EventBus for that.
First on the adapter item where you have toroplayer you need to write the metod to get messages event from eventbus and instantiate too, inside that method you need to call pause() and other logic that you need to work.