Search in sources :

Example 1 with ExoVideoControlsMobile

use of com.flymegoc.exolibrary.widget.ExoVideoControlsMobile in project 91Pop by DanteAndroid.

the class PlayPigAvActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_play_pig_av);
    ButterKnife.bind(this);
    setVideoViewHeight(playContainer);
    initDialog();
    videoControlsMobile = (ExoVideoControlsMobile) videoPlayer.getVideoControls();
    videoPlayer.setOnPreparedListener(this);
    videoControlsMobile.setOnBackButtonClickListener(new ExoVideoControlsMobile.OnBackButtonClickListener() {

        @Override
        public void onBackClick(View view) {
            onBackPressed();
        }
    });
    PigAv pigAv = (PigAv) getIntent().getSerializableExtra(Keys.KEY_INTENT_PIG_AV_ITEM);
    if (pigAv != null) {
        parseVideoUrl(pigAv);
    } else {
        showMessage("参数错误,无法播放", TastyToast.WARNING);
    }
}
Also used : ExoVideoControlsMobile(com.flymegoc.exolibrary.widget.ExoVideoControlsMobile) PigAv(com.dante.data.model.PigAv) BindView(butterknife.BindView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) ExoVideoView(com.flymegoc.exolibrary.widget.ExoVideoView)

Aggregations

RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 BindView (butterknife.BindView)1 PigAv (com.dante.data.model.PigAv)1 ExoVideoControlsMobile (com.flymegoc.exolibrary.widget.ExoVideoControlsMobile)1 ExoVideoView (com.flymegoc.exolibrary.widget.ExoVideoView)1