Add super-simple SimpleExoPlayer factory method.
The DefaultTrackSelector can now be constructed without leaving out a vital part of the initialization. This allows this new simple factory method. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=213438163
This commit is contained in:
parent
a89645d092
commit
decbb33490
@ -22,6 +22,7 @@ import com.google.android.exoplayer2.analytics.AnalyticsCollector;
|
||||
import com.google.android.exoplayer2.audio.AudioAttributes;
|
||||
import com.google.android.exoplayer2.drm.DrmSessionManager;
|
||||
import com.google.android.exoplayer2.drm.FrameworkMediaCrypto;
|
||||
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
||||
import com.google.android.exoplayer2.trackselection.TrackSelector;
|
||||
import com.google.android.exoplayer2.upstream.BandwidthMeter;
|
||||
import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter;
|
||||
@ -131,6 +132,15 @@ public final class ExoPlayerFactory {
|
||||
context, renderersFactory, trackSelector, loadControl, drmSessionManager);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link SimpleExoPlayer} instance.
|
||||
*
|
||||
* @param context A {@link Context}.
|
||||
*/
|
||||
public static SimpleExoPlayer newSimpleInstance(Context context) {
|
||||
return newSimpleInstance(context, new DefaultTrackSelector());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link SimpleExoPlayer} instance.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user