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

77 feature request support for returning pause ads #86

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

AxelHolst
Copy link

@AxelHolst AxelHolst commented Jul 1, 2024

Add Support for Pause Ads

This PR implements a new feature to support Pause Ads in the test-adserver. It adds a new endpoint /pause-ad that returns a VAST XML response suitable for pause ads.

Changes

  • Added a new /pause-ad endpoint that generates and returns a VAST XML for pause ads
  • Implemented PauseAdVastBuilder to create VAST XML specifically for pause ads
  • Updated the Session class to handle pause ad requests
  • Added a new response format PAUSE_AD to constants

Testing

The VAST XML generated has been tested with the Video Suite Inspector (https://googleads.github.io/googleads-ima-html5/vsi/).

Observations:

  • The image is visible, but only a cropped part of it is shown.
  • The image is displayed continuously, regardless of whether the video is paused or not.

Questions:

  1. Is it correct that the pause logic cannot be implemented in the XML and must be handled by the video player's logic?
  2. Are there other ways to test if a pausing functionality could work with this XML?
  3. What might be causing only a cropped part of the image to be visible, and how can we address this? (Fixed)

Notes

  • The pause ad is implemented as a non-linear ad with a static image resource.
  • Users can specify the parameters User ID, Vast version, width and height for the pause ad image. (Thoughts?)
  • The VAST response includes tracking events for start, complete, and pause, which can be used by compatible video players.

AxelHolst added 4 commits July 1, 2024 14:43
- Add new /pause-ad endpoint schema in routes.js
- Implement GET handler for /pause-ad in routes.js
- Create new file utils/pause-ad-vast-maker.js
- Implement PauseAdVastBuilder function
- Update Session class to handle pause ad requests
- Add getPauseAdVast method to Session class
- Add PAUSE_AD to RESPONSE_FORMATS in constants.js
@AxelHolst AxelHolst linked an issue Jul 1, 2024 that may be closed by this pull request
@AxelHolst AxelHolst requested a review from Nfrederiksen July 1, 2024 13:04
@AxelHolst AxelHolst self-assigned this Jul 1, 2024
Updated .addStaticResource in pause-ad-vast-maker.js so that the attributes of the NonLinear ad is recognised properly (such as maintainAspectRatio), also removed some console logging.
@Kajlid Kajlid marked this pull request as ready for review July 2, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Support for returning Pause Ads
2 participants