I have viewPager with 3 pages , in one of these pages I have video player. I'm facing a problem that I video player keeps working on all pages. How can i pause video player will changing page ?

Adapter:

```
public class HomeTabsAdapter extends FragmentStatePagerAdapter {

    MainActivity activity;

    public HomeTabsAdapter(MainActivity activity, FragmentManager fm){
        super(fm);
        this.activity = activity;
    }

    @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)
    @Override
    public Fragment getItem(int position) {
        switch(position){
            case 0:
                return VideoTrendsFragment.newInstance();
            case 1:
                return MomytFragment.newInstance();
            case 2:
                return StoryFragment.newInstance();
                default:
                    return MomytFragment.newInstance();
        }
    }

    @Override
    public int getCount() {
        return 3;
    }
}

```