Audio.php in Media entity audio 8.2
File
src/Plugin/media/Source/Audio.php
View source
<?php
namespace Drupal\media_entity_audio\Plugin\media\Source;
use Drupal\media\MediaTypeInterface;
use Drupal\media\Plugin\media\Source\File;
class Audio extends File {
public function createSourceField(MediaTypeInterface $type) {
return parent::createSourceField($type)
->set('settings', [
'file_extensions' => 'mp3 ogg wav wma aiff aac',
]);
}
}
Classes
Name |
Description |
Audio |
Provides media type plugin for Audio. |