Skip to content

Explicit signals from ExoPlayer when transitioning between content and break #2859

@work-keith

Description

@work-keith

Use case description
Playing VOD interstitial streams with postroll. To detect the start and the end of an interstitial break, one way is to inspect the Player.PositionInfo objects from Player.Listener.onPositionDiscontinuity() by comparing the oldPosition and the newPosition. A break would have an adGroupIndex in the Player.PositionInfo object. This works for midrolls where there is a transition between content and break. However, in the case of postroll, the break ended together with the whole playback without going back the content. So the end of an interstitial postroll break could not be detected by onPositionDiscontinuity(). Also, onAdCompleted() was not called.

The same case would probably happen for preroll breaks, as playback starts directly from the break without first transitioned from content.

Proposed solution
Add two new methods onInterstitialAdStart() and onInterstitialAdEnd() to HlsInterstitialsAdsLoader.Listener. They will be called at the beginning and the end of interstitial breaks.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions