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
Only allowing amp-audio layout=nodisplay within amp-story. #20969
Only allowing amp-audio layout=nodisplay within amp-story. #20969
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding in @aghassemi, who owns amp-audio
Approved for validator changes, not for the decision itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, scratch that. This change potentially breaks existing pages. Do you have a reason to believe that this will not be the case?
We've been talking offline about this, I should have added more context: If any publisher is currently using that, the pages would be very broken already (cf PR description). The sound would be playing right away on page load on desktop, and as you navigate on mobile. And all that even if the story is muted :((. Also, the audio controls would not work, trying to interact with the audio element would trigger a page navigation instead of a audio play or other action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gmajoulet I assume amp-story
has its own UI control for audio and amp-audio
is purely a sound source within amp-story
?
Correct :) |
Ack. I also confirmed that this wouldn't break anything in at least a small sample. |
Thanks everybody. :) |
* cl/234896906 Revision bump for #20969 * cl/235090073 Allow i-amphtml-layout on AMP elements only for Transformed AMP * cl/235216325 Disallow document properties in <form> attribute name. * cl/235271919 Revision bump for #20989 * cl/235833553 Revision bump for #20928 * cl/235843207 Revision bump for #20905
* cl/234896906 Revision bump for ampproject#20969 * cl/235090073 Allow i-amphtml-layout on AMP elements only for Transformed AMP * cl/235216325 Disallow document properties in <form> attribute name. * cl/235271919 Revision bump for ampproject#20989 * cl/235833553 Revision bump for ampproject#20928 * cl/235843207 Revision bump for ampproject#20905
* cl/234896906 Revision bump for ampproject#20969 * cl/235090073 Allow i-amphtml-layout on AMP elements only for Transformed AMP * cl/235216325 Disallow document properties in <form> attribute name. * cl/235271919 Revision bump for ampproject#20989 * cl/235833553 Revision bump for ampproject#20928 * cl/235843207 Revision bump for ampproject#20905
Forcing
amp-audio
withinamp-story
to uselayout="nodisplay"
.Using it with any other display breaks in different ways:
<audio>
element is created at a different time, potentially creating a race condition that results in the audio element not being handled byamp-story
. It'd play when it's not supposed to, and not react to the story mute/unmute buttons.