Waive ads when seek/start at the beginning

Open
#3,496 3 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 5 days

@microkatz is already working on this.

Since Oct 28, 2026.

Assessment

This issue has not been assessed yet.

Description

enhancement

We are using the following to present SGAI content.

  • Exoplayer 1.10.1
  • HlsInterstitialsAdsLoader

We found a symptom

When joining a live stream/seek in a live stream. ExoPlayer would always find the previous AVAILABLE Ad in the timeline and play it. After finishing the ad, it would resume to the content.

Take the following state as an example. We join the playback at 15:33:19.008. ExoPlayer would automatically falls back to AdGroup5 and play them.

 ===== LIVE timeline =====
 WINDOW start=13:33:40.408 end=15:33:38.208 duration=7197.800s
 LIVE EDGE 15:34:23.597
 DEFAULT 15:33:19.008
 CURRENT 15:33:19.008 playingAd=false
 AD period=0 group=0 ids=[763485073_7109900583261803647_0] start=13:36:24.968 duration=unknown resume=13:43:23.528 resumeOffset=418.560s states=[AVAILABLE]
 AD period=0 group=1 ids=[763485073_5202997340818149119_0] start=14:11:09.128 duration=unknown resume=14:13:08.168 resumeOffset=119.040s states=[AVAILABLE]
 AD period=0 group=2 ids=[763485073_3959235339181683986_0] start=14:24:55.608 duration=unknown resume=14:30:56.568 resumeOffset=360.960s states=[AVAILABLE]
 AD period=0 group=3 ids=[763485073_1938461458152811493_0] start=14:40:04.968 duration=unknown resume=14:47:03.528 resumeOffset=418.560s states=[AVAILABLE]
 AD period=0 group=4 ids=[763485073_4363027643061820056_0] start=15:12:00.368 duration=unknown resume=15:13:59.408 resumeOffset=119.040s states=[AVAILABLE]
 AD period=0 group=5 ids=[763485073_771285004374321729_0] start=15:21:57.888 duration=unknown resume=15:28:56.448 resumeOffset=418.560s states=[AVAILABLE]
 ADS     [-AAAAA----------------AA------AAAA-----AAAAA--------------AA----AAAAA---]
 CURRENT [                                                                      ^ ]
                                                                           

What do we want

We really don't want to force our users to watch the previous Ad whenever seek/play. Is there simply way to do this?

Dominant language
Java
Stars
3.1k
Forks
1k
Avg merge
8d 4h
Merged PRs (30d)
5

Getting set up

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.

More from androidx/media

All issues in androidx/media

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.