Skip to content
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

Media Pool: generate HTMLSourceElement from the src attribute. #25003

Merged
merged 1 commit into from Oct 10, 2019

Conversation

gmajoulet
Copy link
Contributor

Cached videos don't fallback to the origin video when configured as attributes of <amp-video>.
The media pool will remove the src attribute before the amp-video.layoutCallback runs, preventing it from propagating the cached src as a source of the new <video> element.

Solution is to transform the src attribute as a HTMLSourceElement, that will later be picked up by amp-video.layoutCallback.

This fixes stories like this one (see page 2).

@gmajoulet gmajoulet merged commit b6bd628 into ampproject:master Oct 10, 2019
@gmajoulet gmajoulet deleted the video_cached_src branch October 10, 2019 16:12
micajuine-ho pushed a commit to micajuine-ho/amphtml that referenced this pull request Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants