X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fmedia%2Fsrc%2FPlugin%2Fmedia%2FSource%2FVideoFile.php;fp=web%2Fcore%2Fmodules%2Fmedia%2Fsrc%2FPlugin%2Fmedia%2FSource%2FVideoFile.php;h=214d36c41a3d68a85b337e4f7b812ecf6b384039;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/media/src/Plugin/media/Source/VideoFile.php b/web/core/modules/media/src/Plugin/media/Source/VideoFile.php new file mode 100644 index 000000000..214d36c41 --- /dev/null +++ b/web/core/modules/media/src/Plugin/media/Source/VideoFile.php @@ -0,0 +1,39 @@ +set('settings', ['file_extensions' => 'mp4']); + } + + /** + * {@inheritdoc} + */ + public function prepareViewDisplay(MediaTypeInterface $type, EntityViewDisplayInterface $display) { + $display->setComponent($this->getSourceFieldDefinition($type)->getName(), [ + 'type' => 'file_video', + ]); + } + +}