amp-story MediaPool breaks media-based auto-advance
See original GitHub issueamp-story has a feature where it can auto-advance to the next page based on the completion of the playback of a media element on the current page. This media element is specified by its ID, in the auto-advance-after
attribute of the current page. For example:
<amp-story-page id="page1" auto-advance-after="my-vid">
<amp-story-grid-layer template="fill">
<amp-video id="my-vid" src="cat.mp4" muted autoplay playsinline></amp-video>
</amp-story-grid-layer>
</amp-story-page>
However, MediaPool swaps out all media elements when the page becomes visible, so the video actually specified when the document is published (my-vid
, in the example above) is not the video that is in the DOM when the page becomes active.
We will need to somehow plumb this through.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Roadmap - amp.dev
Amp monetization - Fixed a Google Ads issue breaking ads' FIE rendering - Auto ... analytics macro update: experiment started - Auto advance...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yep, this example seems to work fine. Thanks for the work on this @sanjsanj!
Sorry, I totally missed #12926! Approved and merged it now; I’ll use that to verify whether this issue can be marked as fixed.