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

Template and styles for inline oembed videos #70

Open
1 of 3 tasks
alisonjo315 opened this issue Sep 13, 2023 · 2 comments
Open
1 of 3 tasks

Template and styles for inline oembed videos #70

alisonjo315 opened this issue Sep 13, 2023 · 2 comments

Comments

@alisonjo315
Copy link
Collaborator

alisonjo315 commented Sep 13, 2023

We're switching from video_embed_field to Drupal core "oembed" functionality for YouTube videos:
https://github.com/CU-CommunityApps/cd_drupal_upstream/issues/42

Accompanying tasks for our Drupal base theme -- can happen any time (no need to wait for the cd_drupal_upstream issue to be complete):

  • Remove extra "div" wrapper from video embed field output:
    • Create field--field-media-oembed-video.html.twig -- simply to use _field--less-wrapped.html.twig (same as field--image.html.twig).
  • Configure view modes (on CLASSE and VPUE and CVM, we provided "default" and "medium sized") -- THEN, check text formats and make sure "video"/"remote video" is enabled, and the "default" and "medium" view modes are available.
    • In theory, can skip this on CD Demo, and just do it on sites that use this functionality -- they can copy the view mode and CKEditor settings CLASSE/VPUE.
    • Don't forget to make sure Media Library "advanced UI" is enabled: /admin/config/media/media-library
  • Add style rule to Drupal stylesheet, for inline video embeds:
iframe.media-oembed-content {
  display: block;
  width: 100%; 
  height: auto;
  aspect-ratio: 16 / 9;
}

FWIW: This work is already happening on VPUE (as of 2023-09-13, the oembed field template is done, the style rule will be done soon).

alisonjo315 added a commit that referenced this issue Sep 13, 2023
@alisonjo315
Copy link
Collaborator Author

Aspect ratio issue on d.o is still open, but when I put videos on the under-development CLASSE site, they seem okay?? -- bottom of this demo page:
https://dev-classe.pantheonsite.io/about

@alisonjo315
Copy link
Collaborator Author

alisonjo315 commented Apr 16, 2024

Part 1 (new field template) is done and merged (#77). Per my comment in December, it's possible that part 2 is not necessary, I'm really not sure 🤷‍♀️

Edit: Then I added "part 3" this evening -- but maybe that doesn't need to happen on CD Demo itself........

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

1 participant