🚀 [Story video] Use the inlined video response instead of issuing an XHR request, for the 1st video of the 1st web story page#37499
Merged
coreymasanto merged 25 commits intoampproject:mainfrom Feb 14, 2022
Conversation
…o response instead of issuing an XHR request.
Contributor
Author
|
I have tested this PR on a local server by doing the following steps:
|
Contributor
Author
|
I think my current logic won't work when there are multiple grid layers on the first page that each have its own video child, because I would expect such videos to all match the |
gmajoulet
reviewed
Jan 27, 2022
gmajoulet
reviewed
Jan 28, 2022
Contributor
gmajoulet
left a comment
There was a problem hiding this comment.
Can you write unit tests for this feature?
https://github.com/ampproject/amphtml/blob/main/extensions/amp-video/0.1/test/test-video-cache.js
I'd love to see at least:
- correctly adds sources from inline config
- doesn't send the XHR request if inline config
- sends XHR request if non first video or non first page
- sends XHR request if inline config (not provided|fails to parse|doesn't have the right data)
- etc
gmajoulet
reviewed
Feb 10, 2022
gmajoulet
approved these changes
Feb 11, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Google video cache will be inlining the 1st video in the 1st story page, removing the need for an XHR call. This PR prevents the XHR request for this video whenever the inlined response is present.
Fixes #37397