Home > front end >  SimpleExoPlayer.Builder(this).build() deprecated
SimpleExoPlayer.Builder(this).build() deprecated

Time:11-24

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?

CodePudding user response:

Deprecate SimpleExoPlayer. 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()

Can you check the changes done in library for version 2.16.0 in release notes

  • Related