Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SimpleExoPlayer.Builder(this).build() deprecated

I'm using Exoplayer in my app and initializing exoplayer as

player = SimpleExoPlayer.Builder(this).build()

But Android Studio is giving me warning as it is deprecated. When I get to the lower version of Exoplayer 2.15.1, then warning goes off. But in latest version 2.16.0, it is giving deprecation warning. How can we initialize exoplayer now with the latest version?

like image 811
Feroz Khan Avatar asked Jan 20 '26 18:01

Feroz Khan


1 Answers

SimpleExoPlayer Deprecated. All functionality has been moved to ExoPlayer instead. ExoPlayer.Builder can be used instead of SimpleExoPlayer.Builder.

Initialize your exoplayer as

player = ExoPlayer.Builder(this).build()

You can check the changes done in library for version 2.16.0 in release notes

like image 143
Nitish Avatar answered Jan 23 '26 10:01

Nitish