mirror of
https://github.com/androidx/media.git
synced 2025-05-14 02:59:52 +08:00

We currently get float ad cue points from IMA, but store these as longs in microseconds. The cast from double to long would take the floor of the value, which could lead to stored ad cue points being off-by-one. Use Math.round to avoid this. ImaAdsLoader also has code to map a double AdPodInfo position (which should match a cue point) onto the corresponding ad group index by searching the long ad cue points. Match the calculation used where we map float cue points, including narrowing the position to a float first to avoid regressions if IMA SDK behavior changes to represent positions in more than float precision later, and also remove the requirement that the ad positions match exactly as a defensive measure. PiperOrigin-RevId: 317607017
ExoPlayer extensions
ExoPlayer extensions are modules that depend on external libraries to provide additional functionality. Browse the individual extensions and their READMEs to learn more.