Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. VideoFile.php

function VideoFile::createSourceField

Overrides File::createSourceField

File

core/modules/media/src/Plugin/media/Source/VideoFile.php, line 27

Class

VideoFile
Media source wrapping around a video file.

Namespace

Drupal\media\Plugin\media\Source

Code

public function createSourceField(MediaTypeInterface $type) {
    return parent::createSourceField($type)->set('settings', [
        'file_extensions' => 'mp4',
    ]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal