Search in sources :

Example 11 with DefaultRenderersFactory

use of com.google.android.exoplayer2.DefaultRenderersFactory in project ExoPlayer by google.

the class ExoHostedTest method buildExoPlayer.

protected ExoPlayer buildExoPlayer(HostActivity host, Surface surface, MappingTrackSelector trackSelector) {
    DefaultRenderersFactory renderersFactory = new DefaultRenderersFactory(host);
    renderersFactory.setExtensionRendererMode(DefaultRenderersFactory.EXTENSION_RENDERER_MODE_OFF);
    renderersFactory.setAllowedVideoJoiningTimeMs(/* allowedVideoJoiningTimeMs= */
    0);
    ExoPlayer player = new ExoPlayer.Builder(host, renderersFactory).setTrackSelector(trackSelector).build();
    player.setVideoSurface(surface);
    return player;
}
Also used : ExoPlayer(com.google.android.exoplayer2.ExoPlayer) DefaultRenderersFactory(com.google.android.exoplayer2.DefaultRenderersFactory)

Aggregations

DefaultRenderersFactory (com.google.android.exoplayer2.DefaultRenderersFactory)10 DefaultTrackSelector (com.google.android.exoplayer2.trackselection.DefaultTrackSelector)8 DefaultLoadControl (com.google.android.exoplayer2.DefaultLoadControl)7 AdaptiveTrackSelection (com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection)5 ExtractorMediaSource (com.google.android.exoplayer2.source.ExtractorMediaSource)4 ExoPlayerFactory (com.google.android.exoplayer2.ExoPlayerFactory)3 DefaultExtractorsFactory (com.google.android.exoplayer2.extractor.DefaultExtractorsFactory)3 MediaSource (com.google.android.exoplayer2.source.MediaSource)3 HlsMediaSource (com.google.android.exoplayer2.source.hls.HlsMediaSource)3 DefaultBandwidthMeter (com.google.android.exoplayer2.upstream.DefaultBandwidthMeter)3 DefaultDataSourceFactory (com.google.android.exoplayer2.upstream.DefaultDataSourceFactory)3 Intent (android.content.Intent)2 Uri (android.net.Uri)2 LoadControl (com.google.android.exoplayer2.LoadControl)2 SimpleExoPlayer (com.google.android.exoplayer2.SimpleExoPlayer)2 OkHttpDataSourceFactory (com.google.android.exoplayer2.ext.okhttp.OkHttpDataSourceFactory)2 DashMediaSource (com.google.android.exoplayer2.source.dash.DashMediaSource)2 SsMediaSource (com.google.android.exoplayer2.source.smoothstreaming.SsMediaSource)2 TrackSelection (com.google.android.exoplayer2.trackselection.TrackSelection)2 TrackSelector (com.google.android.exoplayer2.trackselection.TrackSelector)2