Search in sources :

Example 1 with ExoPlayerManager

use of com.github.rubensousa.previewseekbar.sample.exoplayer.ExoPlayerManager in project PreviewSeekBar by rubensousa.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    SimpleExoPlayerView playerView = (SimpleExoPlayerView) findViewById(R.id.player_view);
    SimpleExoPlayerView previewPlayerView = (SimpleExoPlayerView) findViewById(R.id.previewPlayerView);
    seekBar = (PreviewSeekBar) playerView.findViewById(R.id.exo_progress);
    seekBarLayout = (PreviewSeekBarLayout) findViewById(R.id.previewSeekBarLayout);
    seekBarLayout.setTintColorResource(R.color.colorPrimary);
    seekBar.addOnSeekBarChangeListener(this);
    exoPlayerManager = new ExoPlayerManager(playerView, previewPlayerView, seekBarLayout, getString(R.string.url_hls));
    requestFullScreenIfLandscape();
}
Also used : SimpleExoPlayerView(com.google.android.exoplayer2.ui.SimpleExoPlayerView) ExoPlayerManager(com.github.rubensousa.previewseekbar.sample.exoplayer.ExoPlayerManager)

Aggregations

ExoPlayerManager (com.github.rubensousa.previewseekbar.sample.exoplayer.ExoPlayerManager)1 SimpleExoPlayerView (com.google.android.exoplayer2.ui.SimpleExoPlayerView)1