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

Video keeps playing after pausing it (while playing ads via IMA) #8652

Closed
davlasq opened this issue Mar 21, 2024 · 4 comments
Closed

Video keeps playing after pausing it (while playing ads via IMA) #8652

davlasq opened this issue Mar 21, 2024 · 4 comments
Labels
needs: triage This issue needs to be reviewed

Comments

@davlasq
Copy link

davlasq commented Mar 21, 2024

Description

I use IMA for playing ads in my player. I have this setup for months and everything was fine until recently. The problem is video and ad are playing at the same time. I pause video before playing ad but it keeps playing. I can only replicate this problem on Chrome on Android but other users claim to have this issue in different scenarios. In production it happens very often but on my CodePen example only sparingly.

What I'm doing exactly: I have two endpoints for VAST responses - one internal source (which is often empty) and one external which I use when internal one fails. I need to request them from my domain so I manually fetch this endpoints and put response into IMA.

It goes like like this:

  1. User presses play or autoplay happens
  2. Video is paused - the issue is here, sometimes it keeps playing
  3. First VAST is fetch but it's empty
  4. Second VAST is fetched and put into IMA
  5. Ad is playing
  6. Ad is finished and video is resumed - when problem happens video is already in progress

I tried manually checking if ad is playing and pausing video if so but it doesn't fix the problem and breaks playback on iOS.

Reduced test case

https://codepen.io/davlasq/pen/RwOpJJV

Steps to reproduce

  1. Play video
  2. Video and ad are playing at the same time (video is not visible but you can hear audio)
  3. When ad ends video is already in progress
  4. Refresh if problem is not happening

Errors

No response

What version of Video.js are you using?

8.10.0

Video.js plugins used.

videojs-contrib-ads, videojs-ima

What browser(s) including version(s) does this occur with?

Chrome 122

What OS(es) and version(s) does this occur with?

Android 14

@davlasq davlasq added the needs: triage This issue needs to be reviewed label Mar 21, 2024
Copy link

welcome bot commented Mar 21, 2024

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@mister-ben
Copy link
Contributor

The videojs-ima repo would be a better place to get help for this. googleads/videojs-ima#1098 is possibly the same or related.

@davlasq
Copy link
Author

davlasq commented Mar 27, 2024

Yes, this is the same issue. Thanks

@davlasq
Copy link
Author

davlasq commented Mar 29, 2024

It looks like it's issue with IMA, i posted my workaround in previously mentioned issue.

@davlasq davlasq closed this as completed Mar 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: triage This issue needs to be reviewed
Projects
None yet
Development

No branches or pull requests

2 participants