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 Captions Presets & Customization #11313

Closed
swissspidy opened this issue Apr 20, 2022 · 0 comments
Closed

Video Captions Presets & Customization #11313

swissspidy opened this issue Apr 20, 2022 · 0 comments

Comments

@swissspidy
Copy link
Collaborator

swissspidy commented Apr 20, 2022

Summary

amp-story-captions has a new style-preset attribute that will be used to support different types of presets for captions:

  • default
  • appear
  • karaoke (not yet implemented)
  • popout (not yet implemented)
  • rainbow (not yet implemented)

Presets like appear allow customizing font family and font size and other using CSS custom properties added via an inline style on the <amp-story-captions> element.

To implement this:

  • Provide a preset selection in the editor on a per-element basis, also for page background audio, ideally with some previews
    • In V2, add additional inputs for customizing presets further (out of scope for V1)
  • Update MediaCaptionsLayer in the editor to change appearance of captions depending on preset
    • Should be able to reuse existing styles from the AMP repo for this (see link below)
  • Update the allowlist for amp-story-captions in KSES.php to include style-preset

While we wait for implementation of the remaining presets, we can already build something here behind a feature flag

References

Relevant links from the AMP repo:

CSS file for all the presets:

https://github.com/processprocess/amphtml/blob/main/extensions/amp-story-captions/0.1/amp-story-captions-presets.css

Demo story

Screenshot of default captions preset

Screenshot of different captions presets

Alternatives Considered

Acceptance Criteria

Does this epic have any performance impact?

No

Does this epic have telemetry?

Not initially

@swissspidy swissspidy changed the title Video Captions Presets Video Captions Presets & Customization May 25, 2022
@swissspidy swissspidy closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant