mirror of
https://github.com/androidx/media.git
synced 2025-05-21 23:56:32 +08:00

When an ad is inserted into a live period with an unset duration, the live period needs to be wrapped with a `ClippingMediaPeriod` and then actually be clipped to the end position when the duration gets known. Without this the renderers will never see an EOS which prevents the reading/playing period from advancing. In the case of a server side inserted ad on the other hand, the actual clipping needs to be prevented to keep the current behavior for SSAI streams. In an SSAI stream, an ad inserted before the current position should not produce a snap back to the newly inserted ad. This is currently prevented in both places, when the updated timeline is handled to not disable the renderers, and when the `mediaPeriodQueue` updates the queued periods. This behaviour is preserved to not create side effects of this change. PiperOrigin-RevId: 742642715
ExoPlayer module
This module provides ExoPlayer
, the Player
implementation for local media
playback on Android.
Getting the module
The easiest way to get the module is to add it as a gradle dependency:
implementation 'androidx.media3:media3-exoplayer:1.X.X'
where 1.X.X
is the version, which must match the version of the other media
modules being used.
Alternatively, you can clone this GitHub project and depend on the module locally. Instructions for doing this can be found in the top level README.