-
Notifications
You must be signed in to change notification settings - Fork 4k
🚀 [Story video] Use the inlined video response instead of issuing an XHR request, for the 1st video of the 1st web story page #37499
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
Conversation
…o response instead of issuing an XHR request.
I have tested this PR on a local server by doing the following steps:
|
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
|
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.
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
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