-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Expose video playback events on amp-video #8971
Comments
@lexandera As for exposing events, there are not technical hurdles in doing so the issue we need to deal with is potential abuse. AMP does not expose events that do not come from direct user actions. Video events like 1- Start allowing A4A format to have more flexibility when it comes to non-user-initiated events as any UX abuse will be contained within the Ad box. Not sure if we have other AMP features that are that are A4A only. @jasti @lannka @rudygalfi 2- Built these features into
This approach is less flexible but more aligned with AMP principles, It will also turn |
@rudygalfi @jasti to you guys for prioritization. |
@aghassemi What about using an approach similar to what mobile browsers do where they allow certain actions from user initiated events only (and calls cannot be deferred), while allowing others in all cases? A "video ended" event in that case would allow things like showing/hiding/animating of existing objects, but not also automatic replaying of videos, or page redirects. Once amp-animation becomes available it's most likely going to be possible to hide a video element and replace it with a product shot at the end of the video by creating a long "empty" animation which performs the switch after (let's say) 30 seconds, and then starting both the scene and the video at the same time from a user triggered event; but it won't be possible to account for the video loading time, leading to premature switches on slower connections, and delays on faster ones. Making it possible to toggle visibility from a "video ended" event instead of using such hacks would just make it more predictable. |
@lexandera even That being said, as per my @jasti @ericlindley-g thoughts? (In short, I am suggesting we enable certain features only in A4A because A4A can not abuse them but an AMP page can) |
@aghassemi +1 for supporting custom events based on timeline because of ad size restrictions. |
CC @ampproject/a4a as heads-up if anyone has any concerns. |
+1 To this idea of whitelisting certain behaviors only for A4A — it seems like a low-risk way to enable a set of features that we just couldn't do in AMP. Would be good to review this with a larger group to get consensus. One tradeoff is the possible loss of semantics—do we care if developers use A4A not for ads at all, but only for some set of features that can only happen in the A4A context? Is it called something else at that point? |
@jpettitt brought up a good point in the design meeting today: This feature is useful outside of AMP in-a-box case and if we go with approach 1 (#8971 (comment)) then top-level AMP pages will either miss out on this feature or they will be forced to unnecessarily iframe another AMP page just to get this feature. At this point I am recommending to implement this feature on |
Approach 1 may be feasible if we implement a tiered trust levels for events and actions as suggested in #8901 (comment):
|
@aghassemi @jasti Is there any updated status on this? |
|
We have exposed a few ( Note these will stay Please file issues for others as needed. |
We are looking into supporting video playback in amp ads and have discovered that there are some missing features which would allow us to support some common patterns which appear in video ads:
The first pattern is doable if you also add several "hide" actions to the button which initiates playback, but there is no way of doing the second and the third one. All would be made possible if amp-video exposed a couple of playback related events that could be used for binding actions to.
Based on what we've been doing in ads so far, the most useful events to have would be:
The text was updated successfully, but these errors were encountered: