question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

amp-story MediaPool breaks media-based auto-advance

See original GitHub issue

amp-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:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
newmuiscommented, Jan 28, 2018

Yep, this example seems to work fine. Thanks for the work on this @sanjsanj!

1reaction
newmuiscommented, Jan 26, 2018

Sorry, I totally missed #12926! Approved and merged it now; I’ll use that to verify whether this issue can be marked as fixed.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found