video docking: should toggle the `mask` during Ad play
By @Binipro:
I am currently working on integration of this AMP component with Brightcove player and I noticed that when the player is in dock state during ads playback the click-though on ads click is lost. Is there a way to re-gain this feature?
@alanorozco we should toggle the docking mask between AD_START and AD_END similar to how autoplay does it:
https://github.com/ampproject/amphtml/blob/7d973cd128bead73f99fb21304e20a40da322c38/src/service/video-manager-impl.js#L800
We should keep the "X" button visible and at the corner during Ad play however.
Will need some refactoring of the controls, but definitely a bad issue.
@alanorozco , any news about this issue?
@Binipro Prioritized, expect an update soon.
@alanorozco any update?
@aghassemi
Please let me know as soon as this issue is fixed!
Meanwhile I want to add a point to this issue. As most of the ads on mobile has a "learn more" link on the left corner it collapses with the "X" button, it would be nice if the button could be outside of the tech area.
Screenshot below:

Fixed by #23149
#23149 fixes the autoplay mask, not the docked controls overlay
@alanorozco hiding the autoplay mask only doesn't solve the issue!
My bad, reopening.
/cc @andrewwatterson
Hey there @Binipro - sorry it's been such a slog to get this resolved!
tl;dr Can you provide some more details about what kinds of clicks you care the most about capturing? It looks like the learn more link is directly below the close button. Is there any solution where leaving the close button where it is solves this issue?
In more detail, my understanding is that the issue here is:
amp-video applies overlays to videos in certain situations (controls while mobile and docked, autoplaying-and-muted) that respond to click actions. This conflicts with click actions on the video itself, particularly with respect to clicking through to video ads. Publishers would like us to allow video ad UI to be clickable in all situations of amp-video, to ensure consistent functionality and monetization in all situations.
Is that accurate?
If it is:
- It sounds like the autoplay mask case has already been fixed. Boom.
- Overlays over video content are pretty common - players almost always put controls (on hover or tap) over the actual video content, so I don't think it's reasonable to insist that video content can have an array of tap actions we need to preserve.
- For space reasons, and because video docking implies users will only be giving part of their attention to the video, we are even more limited and can't/don't need to support as many actions on a docked video as we usually can. So what actions do we prioritize?
Highest Priority: close button - as users shift their focus to other things it may be distracting or in the way of other page elements
Second Priority: [controls] pause and control volume - both of these give the user some options if the video becomes distracting but they only want to temporarily quiet it instead of closing it entirely fullscreen - this allows the user to reengage with the video (or ad) if they want to restore their focus to it [ad calls to action] click - allows monetization ?? - are there others?
Third Priority: skip the ad - usually I'd be very against removing the ability to skip the ad, but as shown in the screenshot above it's pretty comically/unusably small
In the "second priority" group, we had been prioritizing the controls, but we could prioritize ad clicks instead (only when ads are playing). The upside is that we'd restore monetization, but the downside is that users would only have one option to deal with a distracting video: completely closing it.
I can see two proposals:
- We could take all controls and put them outside the video content frame. This has the upside of giving us nearly unlimited space for controls. The downside is the amount of space a docked video takes up would be larger, which seems against the spirit of video docking. A perhaps bigger technical downside is that this would make the shape of the docked video very difficult to reason about which, in cases where the developer specifies an element that the video should dock into, may make it difficult for them to style around it. So I'm pretty against this solution.
- We can disable the pause/volume/fullscreen controls while ads are playing to allow taps to land on the video player. Some questions:
- In the picture above, it looks like the learn more link is directly below the close button. Would this solution even allow users to tap the area you're most interested in? Is it just the "learn more" link that's clickable, or is it the whole video ad area?
- We'd probably expect to see MORE closes with this design (compared to current video docking) since the user has fewer options, and FEWER ad clicks (compared to non-docked videos) since users are distracted. If we saw more ad clicks, I'd be concerned that users were accidentally tapping on ads while trying to close the docked video. To proactively mitigate this we'd probably make the close button touch target pretty large to guard against people trying to close it and instead launching a whole new window with ad content.
We're happy to go forward with the second proposal if that satisfies your concerns.
Again, it's unfortunate that we can't be more explicit about which touch areas do what (see also, the teeny "skip video" link), but we're pretty limited in the space we have and how we can control the various elements at this size.
Hi @andrewwatterson,
sorry for my late reply as we were out of office.
Your understanding about the issue is correct.
I discussed with our Advertisement team and we agreed that the second proposal satisfies our concern. To Answer your question “Is it just the "learn more" link that's clickable, or is it the whole video ad area?” It depends on the ads publisher, the whole video ad area could be clickable or they could provide a link as example with “learn more” in any position(left/right) of the area. That is why we strongly recommend if the X button can be outside of the video area.
Can you confirm that by the second proposal “We can disable the pause/volume/fullscreen controls” is ONLY when video ad is playing , not the video content? Would it be enabled when the ad ended? Regardless of the above controls, the X button is always present, correct? Meanwhile would it be possible for us to test the fix in Dev first before deploying it on your production?
Hi @andrewwatterson,
do you have any update?
Thank you
@Binipro We decided to switch the docked controls to a single button that scrolls back to the video's inline box when an ad is playing.
Rationale being that a docked video's area is too small to interact with an ad. So we're switching to a single option to return to the video only during this scenario. While a video plays normally, you'll still see the normal playback controls.
Follow up on details via #25752