You are here

public function Video::prepareMediaSourceFieldFormatterRow in Media Migration 8

Overrides MediaDealerBase::prepareMediaSourceFieldFormatterRow

File

src/Plugin/media_migration/file_entity/Video.php, line 40

Class

Video
Video media migration plugin for local video media entities.

Namespace

Drupal\media_migration\Plugin\media_migration\file_entity

Code

public function prepareMediaSourceFieldFormatterRow(Row $row, Connection $connection) : void {
  parent::prepareMediaSourceFieldFormatterRow($row, $connection);
  $options = [
    'type' => 'file_video',
    'settings' => [
      'muted' => FALSE,
      'width' => 640,
      'height' => 480,
    ],
  ] + $row
    ->getSourceProperty('options') ?? [];
  $row
    ->setSourceProperty('options', $options);
}