Skip to content

77 feature request support for returning pause ads#86

Merged
Nfrederiksen merged 6 commits intomainfrom
77-feature-request-support-for-returning-pause-ads
Feb 20, 2025
Merged

77 feature request support for returning pause ads#86
Nfrederiksen merged 6 commits intomainfrom
77-feature-request-support-for-returning-pause-ads

Conversation

@AxelHolst
Copy link
Contributor

@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
Copy link
Collaborator

@Nfrederiksen Nfrederiksen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I admit being late to review, but this PR looks good to me. It all works pretty much as desired. There is a second part to this though but I'll make a separate ticket for it.

Lovely done all involved

@Nfrederiksen Nfrederiksen merged commit 1e88820 into main Feb 20, 2025
2 checks passed
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

3 participants