use of com.google.android.exoplayer2.SimpleExoPlayer in project ExoPlayer by google.
the class ExoHostedTest method buildExoPlayer.
@SuppressWarnings("unused")
protected SimpleExoPlayer buildExoPlayer(HostActivity host, Surface surface, MappingTrackSelector trackSelector, DrmSessionManager<FrameworkMediaCrypto> drmSessionManager) {
SimpleExoPlayer player = ExoPlayerFactory.newSimpleInstance(host, trackSelector, new DefaultLoadControl(), drmSessionManager, SimpleExoPlayer.EXTENSION_RENDERER_MODE_OFF, 0);
player.setVideoSurface(surface);
return player;
}
use of com.google.android.exoplayer2.SimpleExoPlayer in project PreviewSeekBar by rubensousa.
the class ExoPlayerManager method createPreviewPlayer.
private SimpleExoPlayer createPreviewPlayer() {
TrackSelection.Factory videoTrackSelectionFactory = new WorstVideoTrackSelection.Factory();
TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);
LoadControl loadControl = new PreviewLoadControl();
SimpleExoPlayer player = ExoPlayerFactory.newSimpleInstance(previewPlayerView.getContext(), trackSelector, loadControl);
player.setPlayWhenReady(false);
player.prepare(mediaSourceBuilder.getMediaSource(true));
return player;
}
use of com.google.android.exoplayer2.SimpleExoPlayer in project PreviewSeekBar by rubensousa.
the class ExoPlayerManager method createFullPlayer.
private SimpleExoPlayer createFullPlayer() {
TrackSelection.Factory videoTrackSelectionFactory = new AdaptiveVideoTrackSelection.Factory(new DefaultBandwidthMeter());
TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);
LoadControl loadControl = new DefaultLoadControl();
SimpleExoPlayer player = ExoPlayerFactory.newSimpleInstance(playerView.getContext(), trackSelector, loadControl);
player.setPlayWhenReady(true);
player.prepare(mediaSourceBuilder.getMediaSource(false));
player.addListener(this);
return player;
}
Aggregations