Java Code Examples for com.shuyu.gsyvideoplayer.gsyvideomanager#releaseAllVideos()

The following examples show how to use com.shuyu.gsyvideoplayer.gsyvideomanager#releaseAllVideos() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PlayEmptyControlActivity.java    From GSYVideoPlayer with Apache License 2.0 6 votes vote down vote up
@Override
public void onBackPressed() {
    //释放所有
    videoPlayer.setVideoAllCallBack(null);
    GSYVideoManager.releaseAllVideos();
    if (isTransition && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        super.onBackPressed();
    } else {
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                finish();
                overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);
            }
        }, 500);
    }
}
 
Example 2
Source File: PlayActivity.java    From GSYVideoPlayer with Apache License 2.0 6 votes vote down vote up
@Override
public void onBackPressed() {
    //先返回正常状态
    if (orientationUtils.getScreenType() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
        videoPlayer.getFullscreenButton().performClick();
        return;
    }
    //释放所有
    videoPlayer.setVideoAllCallBack(null);
    GSYVideoManager.releaseAllVideos();
    if (isTransition && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        super.onBackPressed();
    } else {
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                finish();
                overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);
            }
        }, 500);
    }
}
 
Example 3
Source File: PlayPickActivity.java    From GSYVideoPlayer with Apache License 2.0 6 votes vote down vote up
@Override
public void onBackPressed() {
    //先返回正常状态
    if (orientationUtils.getScreenType() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
        videoPlayer.getFullscreenButton().performClick();
        return;
    }
    //释放所有
    videoPlayer.setVideoAllCallBack(null);
    GSYVideoManager.releaseAllVideos();
    if (isTransition && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        super.onBackPressed();
    } else {
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                finish();
                overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);
            }
        }, 500);
    }
}
 
Example 4
Source File: VideoFragment.java    From tysq-android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
    if (orientationUtils != null)
        orientationUtils.releaseListener();
}
 
Example 5
Source File: VideoDetailActivity.java    From LeanbackTvSample with MIT License 5 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
    if (orientationUtils != null)
        orientationUtils.releaseListener();
}
 
Example 6
Source File: SwitchDetailActivity.java    From GSYVideoPlayer with Apache License 2.0 5 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    detailPlayer.getGSYVideoManager().setListener(detailPlayer.getGSYVideoManager().lastListener());
    detailPlayer.getGSYVideoManager().setLastListener(null);
    GSYVideoManager.releaseAllVideos();
    if (orientationUtils != null)
        orientationUtils.releaseListener();

    SwitchUtil.release();
}
 
Example 7
Source File: VideoPlayActivity.java    From OpenEyes with Apache License 2.0 5 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
    if (orientationUtils != null) {
        orientationUtils.releaseListener();
    }
}
 
Example 8
Source File: ListVideoActivity.java    From GSYVideoPlayer with Apache License 2.0 5 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
    if (listNormalAdapter != null) {
        listNormalAdapter.onDestroy();
    }
}
 
Example 9
Source File: RecyclerView3Activity.java    From GSYVideoPlayer with Apache License 2.0 5 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();

    /// 关闭硬解码
    GSYVideoType.disableMediaCodec();


    smallVideoHelper.releaseVideoPlayer();
    GSYVideoManager.releaseAllVideos();
}
 
Example 10
Source File: SimplePlayer.java    From GSYVideoPlayer with Apache License 2.0 5 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
    if (orientationUtils != null)
        orientationUtils.releaseListener();
}
 
Example 11
Source File: GSYVideoPlayer.java    From GSYVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void releaseVideos() {
    GSYVideoManager.releaseAllVideos();
}
 
Example 12
Source File: ListVideo2Activity.java    From GSYVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    smallVideoHelper.releaseVideoPlayer();
    GSYVideoManager.releaseAllVideos();
}
 
Example 13
Source File: SimpleListVideoActivityMode1.java    From GSYVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
}
 
Example 14
Source File: SimpleListVideoActivityMode2.java    From GSYVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    smallVideoHelper.releaseVideoPlayer();
    GSYVideoManager.releaseAllVideos();
}
 
Example 15
Source File: RecyclerViewActivity.java    From GSYVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
}
 
Example 16
Source File: ListADVideoActivity2.java    From GSYVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
    GSYVideoADManager.releaseAllVideos();
}
 
Example 17
Source File: RecyclerView2Activity.java    From GSYVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    smallVideoHelper.releaseVideoPlayer();
    GSYVideoManager.releaseAllVideos();
}
 
Example 18
Source File: AutoPlayRecyclerViewActivity.java    From GSYVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
}
 
Example 19
Source File: SwitchListVideoActivity.java    From GSYVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
}
 
Example 20
Source File: ListADVideoActivity.java    From GSYVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();
    GSYVideoManager.releaseAllVideos();
    GSYVideoADManager.releaseAllVideos();
}