3 namespace Drupal\media\Plugin\media\Source;
5 use Drupal\Component\Plugin\Derivative\DeriverBase;
8 * Derives media source plugin definitions for supported oEmbed providers.
11 * This is an internal part of the oEmbed system and should only be used by
12 * oEmbed-related code in Drupal core.
14 class OEmbedDeriver extends DeriverBase {
19 public function getDerivativeDefinitions($base_plugin_definition) {
20 $this->derivatives = [
23 'label' => t('Remote video'),
24 'description' => t('Use remote video URL for reusable media.'),
25 'providers' => ['YouTube', 'Vimeo'],
26 'default_thumbnail_filename' => 'video.png',
27 ] + $base_plugin_definition,
29 return parent::getDerivativeDefinitions($base_plugin_definition);