[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unstable Api Annotations #1495

Closed
Faiyyaz opened this issue Jun 24, 2024 · 5 comments
Closed

Unstable Api Annotations #1495

Faiyyaz opened this issue Jun 24, 2024 · 5 comments
Labels

Comments

@Faiyyaz
Copy link
Faiyyaz commented Jun 24, 2024

Hi,

Thank you for such a great library.

I have a question if you see the sample main most of the classes like DemoUtil, DownloadTracker, TrackSelectionDialog etc are using @UnstableApi annotations.

Can you let me know why it is like that?

Also if it is unstable, can you provide a stable example for the same since in our app we need to give quality control, download features etc which used to work fine in exoplayer2 without such annotations.

@oceanjules
Copy link
Contributor

You can see what is meant by "stability" here in the README and UnstableAPI java doc.

In short: it doesn't have to do with quality or performance. You can assume the functions and classes behave as documented. However, the library is not ready to freeze these APIs and commit to long-term backwards compatibility. So use with caution to avoid breaking changes when upgrading the library version.

@Faiyyaz
Copy link
Author
Faiyyaz commented Jun 24, 2024

Okay so if you are saying those can be removed then can we have stable version of the same example if possible?

@oceanjules
Copy link
Contributor

Stabilising the API is a lengthy process and the full ExoPlayer/media3 API (everything accessible by an application developer like you) is too large to guarantee this kind of stability. We want to be sure that everything we add to the stable API is worth the long-term investment of the team supporting it. There is a trade-off between freezing the APIs too early and allowing the flexible experimental setup like this to evolve over time to something better.

When ExoPlayer moved to the androidx.media3 package, it went through a stabilising stage. We became a part of AndroidX libraries and hence we now adhere to backward-compatibility guarantees between minor versions.

When we do promote APIs to stable, it is announced in the release notes.

If you think your particular use-case cannot be achieved using the stable API only, you could file an issue about stabilising those components. However, looking at the list of classes you pasted: DemoUtil is utility methods for the main demo, DownloadTracker and TrackSelectionDialog are also just examples of how to achieve certain functionality. You are free to copy it over to your project and customize according to your needs. The library as a whole does not rely on these classes.

@Faiyyaz
Copy link
Author
Faiyyaz commented Jun 25, 2024

Okay the list of features I am trying to achieve are download track, quality control, speed control etc. I copied it over since the same code was used in exoplayer2 to do the same and it used to work fine since many years and even the sample app has the same code as of now

@icbaker
Copy link
Collaborator
icbaker commented Jun 25, 2024

I copied it over since the same code was used in exoplayer2 to do the same and it used to work fine since many years and even the sample app has the same code as of now

To be clear, nothing has got 'less stable' than in exoplayer2. Just some bits of media3 are now marked as 'more stable' than anything ever was in exoplayer2. You can see more info here: https://developer.android.com/media/media3/exoplayer/migration-guide#background

So if you were happy using the symbols in the exoplayer2 package you should be fine to continue using the same symbols in the media3 package, regardless of whether they're annotated @UnstableApi, and adding @OptIn or suppressing the lint.

@androidx androidx locked and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants