androidx / androidx/media

IMA DAI SDK indicates AD_BREAK_ENDED before ad playback completes

Open
#1,538 5 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Jul 12, 2024.

bug
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Version

Media3 pre-release (alpha, beta or RC not in this list)

More version details

Currently on 1.4.0-alpha02

Devices that reproduce the issue

Samsung Galaxy A13 - Running Android 13
Galaxy Tab A7 Lite - Running Android 12
Moto G Stylus - Running Android 13

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps
  1. In the demo app -> demo module -> PlayerActivity.java add an adEventListener callback that prints the adEvent to the console, to the ImaServerSideAdInsertionMediaSource.AdsLoader.Builder (line 306):
 ImaServerSideAdInsertionMediaSource.AdsLoader.Builder serverSideAdLoaderBuilder =
        new ImaServerSideAdInsertionMediaSource.AdsLoader.Builder(/* context= */ this, playerView)
            .setAdEventListener( adEvent ->
                    System.out.println("+++ adEvent: " + adEvent)
                );
  1. Open the demo app
  2. Scroll down to IMA DAI streams
  3. Select the first option - HLS VOD: Demo (skippable pre/post), single ad [30s]
  4. Occasionally, the ad countdown timer will stop shortly after the ad starts playing, but the ad continues to play. It may take a few tries to repro this bug.
  5. When this happens, observe the logs. You will see that AdEvents are fired in rapid succession, with ~200ms between AdEvent.type == LOADED and AdEvent.type == AD_BREAK_ENDED
Expected result

AdEvents should fire at correct intervals, and continue to fire until the ad stops playing. The ad countdown timer should display for the duration of the ad.

Actual result

AdEvents fire in rapid succession before the ad stops playing. The ad countdown timer disappears quickly after the ad begins playback

Media

HLS VOD: Demo (skippable pre/post), single ads [30s]

Below are the console logs showing the error. Observe the timestamps of the last 4 adEvents.
Media3 Demo App IMA bug.txt

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.