Support timed messages (PlayerMessage) for ads
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
### ExoPlayer Version
2.18.1
### Devices that reproduce the issue
emulator api 30
### Devices that do not reproduce the issue
_No response_
### Reproducible in the demo app?
Not tested
### Reproduction steps
1. Have an `AdsLoader` implemented. Inserts ads in start of the content. Content is HLS.
2. When Player starts playing ad, in event callback register the following messages:
```kotlin
for (quartile in listOf(Quartile.Q25, Quartile.Q50, Quartile.Q75)) {
player
.createMessage { _, payload ->
onNewQuartileEvent(quartile, payload)
}
.setPayload(myPayload)
.setDeleteAfterDelivery(true)
.setPosition(quartile.getPositionForDuration(player.duration))
.send()
}
```
3. Registered callbacks will never happen during ad playback. Expected result: it happens during ad playback
If don't use `setPosition`, events will be successfully delivered but the whole point is lost.
### Expected result
PlayerMessage instances are delivered to their targets when an ad is currently playing and their positions are within ad duration.
### Actual result
PlayerMessage instances are not delivered to their targets when ad is playing.
### Media
Not applicable
### Bug Report
- [ ] You will email the zip file produced by `adb bugreport` to dev.exoplayer@gmail.com after filing this issue.
Contributor guide
Assessment
This issue has not been assessed yet.