Thank you very much for this great module!

Just like oEmbed we should also consider to add (media) handling based on video_embed_field which might be used as alternative to oEmbed. It might be used in media entity types and in all other entity types.

In Drupal 7 this might also be relevant because https://www.drupal.org/project/video_embed_field was widely used? I didn't try this yet.

Comments

Anybody created an issue. See original summary.

anybody’s picture

Of we definitely need that feature in Drupal 8 so I'll have a look at this asap and try to create a proper patch. If anyone is interested to participate, please feel free to contact me.

steven buteneers’s picture

Supporting video embed field is something I would support in a sub module. We explicitly chose to go with Core oEmbed to provide an out of the box integration.

A key point to figure out is how we can support both without conflicts.

anybody’s picture

Hi Steven,

great yes, I completely agree!

anybody’s picture

And I think we will need this in some project so hopefully I'll find the time to create such a submodule.

anybody’s picture

Assigned: Unassigned » anybody
reszli’s picture

the following solution worked for me in D7:

/**
 * Implements hook_ideo_embed_handler_info_alter().
 */
function mymodule_video_embed_handler_info_alter(&$handlers) {
  foreach ($handlers as &$handler) {
    $new_function = "mymodule_" . $handler['function'];
    if (function_exists($new_function)) {
      $handler['function'] = $new_function;
    }
  }
}

/**
 * Custom handler for youtube videos.
 */
function mymodule_video_embed_field_handle_youtube($url, $settings) {
  $output = video_embed_field_handle_youtube($url, $settings);
  $output['#cookie_content_blocker'] = TRUE;
  return $output;
}

/**
 * Custom handler for vimeo videos.
 */
function mymodule_video_embed_field_handle_vimeo($url, $settings) {
  $output = video_embed_field_handle_vimeo($url, $settings);
  $output['#cookie_content_blocker'] = TRUE;
  return $output;
}

you would need two more handlers to cover Facebook and Brightcove handlers provieded by submodules.

anybody’s picture

@reszli what do you think about a submodule for this functionality so that @Steven Buteneers could decide if it might be added to the project?

Does it still work for you? I think there are a lot of Projects out there still using video_embed field but as it's deprecated, it shouldn't become key part of the module.

anybody’s picture

For others: https://www.drupal.org/project/cookies/ solved this for us instead of the combination from EUCC + cookie_content_blocker.

anybody’s picture

Assigned: anybody » Unassigned
Status: Active » Closed (won't fix)