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

Video blocks can cause validation errors in AMP Stories #2109

Closed
westonruter opened this issue Apr 11, 2019 · 4 comments
Closed

Video blocks can cause validation errors in AMP Stories #2109

westonruter opened this issue Apr 11, 2019 · 4 comments
Assignees
Milestone

Comments

@westonruter
Copy link
Member

westonruter commented Apr 11, 2019

When adding a video block to an AMP Story page and hitting Save an AMP validation error appears:

Screen Shot 2019-04-11 at 09 52 25

This is due to the video not having:

  • autoplay
  • poster

When supplying these the validation error goes away:

image

When a video is shown in an AMP Stories context, the autoplay toggle should be enabled by default and either disabled or hidden entirely.

Also, the playsinline toggle needs to be removed in the stories context since it is not allowed:

image

Additionally, since we don't currently automatically extract a poster image from a video (see #903) there should be a warning displayed with either the poster field to indicate it is required.

@swissspidy swissspidy changed the title Prevent AMP validation errors when adding a video block to a story [AMP Stories] Prevent AMP validation errors for video blocks Apr 12, 2019
@westonruter westonruter self-assigned this May 3, 2019
@westonruter westonruter changed the title [AMP Stories] Prevent AMP validation errors for video blocks Video blocks can cause validation errors in AMP Stories May 3, 2019
@swissspidy swissspidy assigned csossi and unassigned westonruter May 14, 2019
@swissspidy
Copy link
Collaborator

To verify:

  • When a video is shown in an AMP Stories context, the autoplay toggle should be enabled by default
  • The "plays inline" option defaults to false
  • When inserting a video, and the video has a featured image set, the featured image is automatically used as a poster image

@westonruter
Copy link
Member Author

  • When a video is shown in an AMP Stories context, the autoplay toggle should be enabled by default
  • The "plays inline" option defaults to false

Note that the “autoplay” and “plays inline” options actually shouldn't be displayed at all:

image

The video should automatically be autoplaying when you preview on the frontend.

@csossi
Copy link

csossi commented May 15, 2019

On selecting a video from media Library and returning to editor, the controls that should be hidden appear (Weston's note above):
image

Note that if I remove focus from video (click somewhere else) and THEN click on the video, THEN the controls are removed:
image

@csossi csossi assigned swissspidy and unassigned csossi May 15, 2019
@swissspidy
Copy link
Collaborator

Thanks for testing! Given that we have #2283 for this specific issue with the hidden controls and focus, I am inclined to move this one to "Ready for merge" and continue testing on #2283 once that issue has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants