Problem/Motivation
When trying to override the video-embed-iframe.html.twig template to wrap a contextual consent around the iframe it is a bit tricky to extract the provider ID. There is only the {{ theme_hook_original }} which is e.g. video_embed_iframe__youtube, so in order to extract youtube you would need to do ugly replacing like:
{% set provider = theme_hook_original|replace({'video_embed_iframe__': ''}) %}
Proposed resolution
Add a provider variable via preprocess so no ugly replacing is needed.
Issue fork video_embed_field-3572046
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mably commentedA new
providervariable should be available in the twig. Please review.Comment #5
yannickooThank you for this! Really nice that this was the only change to expose it, RTBC!
Comment #6
mably commented