mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

This change makes adding ad events in live streams more robust by allowing ad groups to grow in number of ads if more ad events are received than initially announced by the SDK. With the IMA prefetch feature, an AdPod can grow in size in certain conditions like from initially 2 ads to 4 ads being part of the ad group. With this change, if an additional ad event arrives while the ad group is still being played, the ad group is expanded. If the event arrives late and the ad group is already completed, a new group is created for the remaining ads. This also covers the case where we join the live stream while an ad is being played and we missed at least one LOADED event from the SDK. Ads of the group before the first LOADED event are ignored in such a case. PiperOrigin-RevId: 484214760 (cherry picked from commit 64e9e888230be1874720ced001e8112fc3ee407b)
Demos
This directory contains apps that demonstrate how to use Android media modules, like ExoPlayer. Browse the individual demos and their READMEs to learn more.
Running a demo
From Android Studio
- File -> New -> Import Project -> Specify the root
media
folder. - Choose the demo from the run configuration dropdown list.
- Click Run.
Using gradle from the command line:
- Open a Terminal window at the root
media
folder. - Run
./gradlew projects
to show all projects. Demo projects start withdemo
. - Run
./gradlew :<demo name>:tasks
to view the list of available tasks for the demo project. Choose an install option from theInstall tasks
section. - Run
./gradlew :<demo name>:<install task>
.
For example, ./gradlew :demo:installNoDecoderExtensionsDebug
installs the
ExoPlayer demo app in debug mode with no optional modules.