google / google/ExoPlayer

Player remains in Buffering state if a midroll ad has offset greater than Video length

Open
#5,534 7 comments 0 reactions 1 assignee Claimed by @andrewlewis View on GitHub
enhancement low priority
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### Issue description
If the AdsMediaSource has a mid-roll ad that has timeOffset > video duration, then on video end, STATE_BUFFERING is received instead of STATE_ENDED in onPlayerStateChanged.

### Reproduction steps
Configure a mid-roll ad with offset greater than video length. Play the video till end.
Observe the callbacks from player. Also the controller remains in playing state after this.

### Link to test content
Any test vmap would work satisfying the offset as specified in Title. [Example](https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator=)

### Version of ExoPlayer being used
2.9.5

### Device(s) and version(s) of Android being used
Samsung Galaxy S6, Android 7

### A full bug report captured from the device
Will mail.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.