Problem/Motivation
When adding a vimeo video using media and the core oEmbed external video field.
The settings made in Vimeo are not honored.
What I want is that the video is autoplaying/muted/and not showing title or navigation.
The link should look like:
https://player.vimeo.com/video/[id]?autoplay=1&loop=1&autopause=0&background=1&muted=1&color=000000&title=0&byline=0&portrait=0
But instead is cut off after the video id:
https://player.vimeo.com/video/[id]?app_id=122963
Issue fork drupal-3218217
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 #2
pameeela commentedI think this is a feature request, in that it's not currently supported, but I'm not sure that it can be supported as described. There is much relevant discussion in #3009003: Expose oEmbed resource object to iframe template, which provides support for adding parameters via your theme.
In #3218217: Support settings via URL parameters for remote Vimeo videos joshua.boltz says that Oembed API doesn't carry the params along when it builds and provides the iframe, and I would guess the same is true for Vimeo. So it probably can't be done simply via the URL.
It could be done via configuration, but in #3218217: Support settings via URL parameters for remote Vimeo videos phenaproxima suggests that this find of feature is better done in contrib.
Comment #3
phenaproximaThis has been discussed as something that could be added to the oEmbed Providers contrib module; see #3227566-3: oEmbed with access_token. I'm still not certain it belongs in core; we already provide hook_oembed_resource_url_alter() for this purpose.
Comment #7
jcandan commentedOEmbedIframeControllerTest::testResourcePassedToPreprocess()seems to ensure parameters can be passed (not actually sure what this test is doing).And this comment's example uses a similar method to
media_test_oembed_preprocess_media_oembed_iframe()to allow YouTube URL parameters to be passed. I am using this successfully. It does seem like something that should just work.Comment #8
dalemoore commented@jcandan Thanks for linking that. I also see this post by @phenaproxima announcing this. I'm trying to get autoplaying, muted background videos for Layout Builder. Will try this...
Comment #9
jcandan commentedI just published an article on this: Full-width, Drupal core Remote Video with YouTube parameters. Also talks about getting full-width YouTube video into a Layout Builder block.