media/demos
bachinger 1607e3daf5 Make adding ad live breaks more robust
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 64e9e88823)
2022-10-27 11:10:10 +00:00
..
cast Switch incorrectly configured native multidex to legacy for demos 2022-08-25 16:09:00 +00:00
gl Switch incorrectly configured native multidex to legacy for demos 2022-08-25 16:09:00 +00:00
main Make adding ad live breaks more robust 2022-10-27 11:10:10 +00:00
session Set new playlist and start index with one command 2022-10-10 09:33:21 +00:00
surface Fix handling of content URIs by demo apps 2022-06-07 20:23:51 +00:00
transformer Mute input video player in transformer demo 2022-10-26 15:01:30 +00:00
README.md Update to androidx.media3 2021-10-27 09:12:46 +01:00

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 with demo.
  • Run ./gradlew :<demo name>:tasks to view the list of available tasks for the demo project. Choose an install option from the Install 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.