Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prevent content from being restarted after Postroll ads (#4979)
After watching post roll ads, `this.video_.play()` was called on a completed content in the `onAdComplete` event. The content would then restart from the beginning. We now flag that the content is completed before we call `this.adsLoader_.contentComplete()`. On the callback, we prevent the video element from replaying if this flag is set. This fix is based on the Advanced Sample on the [googleads-ima-html5 repo](https://github.com/googleads/googleads-ima-html5/blob/main/advanced/ads.js#L128) Closes #4445
- Loading branch information