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

Command icon 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

zebda created an issue. See original summary.

pameeela’s picture

Title: Video oEmbed field not honoring Vimeo settings » Support settings via URL parameters for remote Vimeo videos
Version: 9.1.x-dev » 9.3.x-dev
Category: Bug report » Feature request
Issue tags: +Bug Smash Initiative

I 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.

phenaproxima’s picture

This 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.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

jcandan’s picture

OEmbedIframeControllerTest::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.

dalemoore’s picture

@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...

jcandan’s picture

I 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.

reenaraghavan made their first commit to this issue’s fork.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.