Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Position discontinuity behavior is different between last mid ad point and others. ( This behavior causes audio lag in some devices ) #9929

Closed
dev-platong opened this issue Feb 3, 2022 · 3 comments
Assignees
Labels

Comments

@dev-platong
Copy link

dev-platong commented Feb 3, 2022

I have a problem of audio lag at specific device. So I investigated, finally I found position discontinuity behavior is different between final mid ad point and others.

This behavior is always replicated when vast is empty and IMA SDK cannot insert an ad.

  1. Final mid ad point

Position Discontinuity reason is always AUTO_TRANSITION. This cause an audio lag issue in some devices.

  1. Others (except final mid ad point)

Position Discontinuity reason is always SKIP.

So that I think SKIP is correct when IMA SDK failed to insert ad at last mid ad point.

Reproduction Step

I prepare reproduction demo app at https://github.com/dev-platong/ExoPlayer/tree/issues-position-discontinuity-reason branch.

  1. Open demo app
  2. Select a stream ( I removed other streams )
  • ExoPlayer version number r.2.16.1
  • Android version 11 ( I think any android os versions reproduction )
  • Android device Any devices and emulators

Video

2022-02-03.15.05.25.mov
@dev-platong dev-platong changed the title Position discontinuity behavior is different between last mid ad point and others. Position discontinuity behavior is different between last mid ad point and others. ( This behavior causes audio lag in some devices ) Feb 3, 2022
@dev-platong
Copy link
Author

@tonihei tonihei self-assigned this Feb 3, 2022
@tonihei
Copy link
Collaborator

tonihei commented Feb 7, 2022

Thanks for reporting! We can provide a fix for this.

icbaker pushed a commit to androidx/media that referenced this issue Feb 8, 2022
We have logic to not immediately interrupt playback when an ad group
fails to load and instead let the current content play and transition
at the point where the ad group should have been.

This logic was broken by dcbdbe5 because of one of the conditions
used MediaPeriodId.adGroupIndex, which is always -1 for content ids.
It still worked for the last ad group because the next ad group index
was C.INDEX_UNSET.

Fix the issue and amend the test that was meant to catch this to test
the ad failures for the last ad and previous ads.

Also fix the PositionInfo reported in such a case, which was also wrong.

Issue: google/ExoPlayer#9929

#minor-release

PiperOrigin-RevId: 427143223
icbaker pushed a commit that referenced this issue Feb 8, 2022
We have logic to not immediately interrupt playback when an ad group
fails to load and instead let the current content play and transition
at the point where the ad group should have been.

This logic was broken by dcbdbe5 because of one of the conditions
used MediaPeriodId.adGroupIndex, which is always -1 for content ids.
It still worked for the last ad group because the next ad group index
was C.INDEX_UNSET.

Fix the issue and amend the test that was meant to catch this to test
the ad failures for the last ad and previous ads.

Also fix the PositionInfo reported in such a case, which was also wrong.

Issue: #9929

#minor-release

PiperOrigin-RevId: 427143223
@tonihei
Copy link
Collaborator

tonihei commented Feb 11, 2022

Fixed by the commit above.

@tonihei tonihei closed this as completed Feb 11, 2022
icbaker pushed a commit that referenced this issue Feb 23, 2022
We have logic to not immediately interrupt playback when an ad group
fails to load and instead let the current content play and transition
at the point where the ad group should have been.

This logic was broken by dcbdbe5 because of one of the conditions
used MediaPeriodId.adGroupIndex, which is always -1 for content ids.
It still worked for the last ad group because the next ad group index
was C.INDEX_UNSET.

Fix the issue and amend the test that was meant to catch this to test
the ad failures for the last ad and previous ads.

Also fix the PositionInfo reported in such a case, which was also wrong.

Issue: #9929

#minor-release

PiperOrigin-RevId: 427143223
icbaker pushed a commit to androidx/media that referenced this issue Feb 25, 2022
We have logic to not immediately interrupt playback when an ad group
fails to load and instead let the current content play and transition
at the point where the ad group should have been.

This logic was broken by dcbdbe5 because of one of the conditions
used MediaPeriodId.adGroupIndex, which is always -1 for content ids.
It still worked for the last ad group because the next ad group index
was C.INDEX_UNSET.

Fix the issue and amend the test that was meant to catch this to test
the ad failures for the last ad and previous ads.

Also fix the PositionInfo reported in such a case, which was also wrong.

Issue: google/ExoPlayer#9929

#minor-release

PiperOrigin-RevId: 427143223
@google google locked and limited conversation to collaborators Apr 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants