Skip to content

Add method to reset ad group to be played again. #9615

Closed
@chladto1

Description

@chladto1

We are updating ExoPlayer in our project from version 2.13.2 to 2.15.1. We are using modified IMA extension because of feature described in issue 8810. We had to change adPlaybackState.adGroups[i] = AdPlaybackState.AdGroup().withAdCount(1).withAdState(AdPlaybackState.AD_STATE_PLAYED, 0) to adPlaybackState = adPlaybackState.withNewAdGroup(i, timeUs).withAdCount(i, 1).withPlayedAd(i, 0) and adPlaybackState.adGroups[i] = AdPlaybackState.AdGroup() to adPlaybackState = adPlaybackState.withNewAdGroup(i, adTimeUs). But it looks like there are some internal changes and our application is crashing in newly added check on line 285 in AdsMediaSource that was not in 2.13.2 version.

Could you please help us how to set AdGroup directly into AdPlaybackState.adGroups and avoid increasing the AdPlaybackState.adGroupCount? Our code is in Kotlin language and we created extension AdPlaybackState.setAdGroup(index: Int, adGroup: AdPlaybackState.AdGroup) that is using reflection to set an AdGroup into AdPlaybackState.adGroups. But using reflection is not the best solution. Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions