-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Description
Description
amp-video[cache=google] sends a XHR request to a Google hosted backend to retrieve cached sources.
The AMP Cache is now inlining the cached sources for the first 5 videos of each Story. amp-video should try to get the sources from the script id=amp-google-video-cache-response before sending the XHR request.
<head>
<script id=amp-google-video-cache-response type=application/json>{
"1": {
"sources": [
{
"url": "http://foo_kyoto.mov",
"codec": "h264",
"type": "video/mp4",
"bitrate_kbps": 400
},
{
"url": "http://bar.mp4",
"codec": "h264",
"type": "video/mp4",
"bitrate_kbps": 2000
}
],
"has_audio": false
},
"2": {
"sources": [
{
"url": "http://foo_osaka.mov",
"codec": "h264",
"type": "video/mp4",
"bitrate_kbps": 400
},
{
"url": "http://bar.mp4",
"codec": "h264",
"type": "video/mp4",
"bitrate_kbps": 2000
}
],
"has_audio": false
}
}
</script>
</head>
<body>
...
<amp-video amp-google-cache-video-id=0 cache="google" ...
cc @ampproject/wg-stories
Alternatives Considered
Additional Context
No response
Reactions are currently unavailable