AdvancedAndroid_ClassicalMusicQuiz
AdvancedAndroid_ClassicalMusicQuiz copied to clipboard
SimpleExoPlayerView deprecated
'com.google.android.exoplayer2.ui.SimpleExoPlayerView' is deprecated is the message getting when declaring a variable of this type. According to the Deprecated List of the ExoPlayer Library, PlayerView should be used.
It seems that there are several instances where deprecated examples are used, the developer guide seems the best place to see how it should be done now.
The way to create a MediaSource is also deprecated. This is the example from the developer guide:
// Produces DataSource instances through which media data is loaded.
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(context,
Util.getUserAgent(context, "applicationName"));
// This is the MediaSource representing the media to be played.
MediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
.createMediaSource(mp4VideoUri);
// Prepare the player with the source.
player.prepare(videoSource);