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

Pause player while playing VMAP #4143

Closed
Veeyikpong opened this issue Apr 18, 2018 · 6 comments
Closed

Pause player while playing VMAP #4143

Veeyikpong opened this issue Apr 18, 2018 · 6 comments
Assignees

Comments

@Veeyikpong
Copy link

Hi,
I am implementing ExoPlayer and its ImaAdsLoader to play VMAP.
There are 4 ads in my playlist, 3 are 10 seconds and one is 15 seconds.

When the ads are playing the 10 seconds ads, we pause and resume the player, everything works fine.

However, when playing the 15 seconds ad, if we pause BEFORE 10 seconds remaining, and resume the ad, after this ad has completed, the remaining ads will be skipped automatically. Then the content resume.

Please help on this issue. We tried a lot of ways but it still didnt work.

@andrewlewis
Copy link
Collaborator

Please could you provide your ad tag here or via email to [email protected] (with subject line "Issue #4143")? Thanks.

@Veeyikpong
Copy link
Author

Hi @andrewlewis
I might have found the fix. I noticed that in ImaAdsLoader, when we pause the ad, the state is set to IMA_AD_STATE_PAUSED;

imaAdState = IMA_AD_STATE_PAUSED;

and when RESUMED is triggered, we need to set the state back to IMA_AD_STATE_PLAYING to ensure the pause and resume works correctly for VMAP ads.

In handleAdEvent(AdEvent adEvent) function,

 case RESUMED:
                imaAdState = IMA_AD_STATE_PLAYING;
                break;

Please help to verify that this is correct and might be able to help others.
Thank you.

@andrewlewis
Copy link
Collaborator

Thanks for providing the ad tag via email. I can reproduce the issue. If I background the demo app two seconds into the first ad I find that the remaining ads in the group are skipped even with the proposed fix in #4153. Is that consistent with what you're seeing, or did this fix work for you?

After background/resume we get an unexpected PAUSED event from IMA when there are still five seconds of the ad to play. After that we get the URI for the third ad in the pod, which suggests that IMA thinks we are already playing the second ad while we are still on the first. I'll investigate further.

@andrewlewis
Copy link
Collaborator

@Veeyikpong Is your proposed fix working? I tried integrating it into the demo app and found that the issue was still reproducible.

@andrewlewis
Copy link
Collaborator

This is likely to be a duplicate of #4140, which seems to be an IMA bug: in both cases, ads are skipped after resuming the ads manager while in a midroll.

Marking as a duplicate for now, but we can reopen if this turned out to be different once that issue is fixed.

@andrewlewis
Copy link
Collaborator

@Veeyikpong Do you still see this issue? There was a recent update to IMA's JavaScript component which may have fixed this issue. This update will be picked up automatically by clients when they load IMA (it doesn't require an updated IMA dependency). I can't verify if this is fixed because the ad tag provided via email doesn't work any more.

@google google locked and limited conversation to collaborators Sep 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants