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
Fix amp-audio on the first page of a story. #21611
Conversation
mediaEl = /** @type {!./media-pool.DomElementDef} */ (mediaEl); | ||
const promises = [mediaPool.unmute(mediaEl)]; | ||
|
||
// Audio element on the first page of a story would not be playing since |
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.
nit: it's not necessarily just the first page, it could potentially be any page where the browser has rejected playback for whatever reason. Not sure if it's worth trying to message that here, for future readers
421573d
to
6616fde
Compare
PTAL |
fa76918
to
437b8e9
Compare
PTAL |
f8f4c1f
to
df039ce
Compare
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.
I changed the code so it respects the "loop" attribute. We don't want to play a 5s video after 10s on the page.
df039ce
to
8d12593
Compare
Using an
amp-audio
element on the first page of a story has two issues:Fixes #21604