‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\Rendering\AudioTagRenderer Class Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\Rendering\AudioTagRenderer:
TYPO3\CMS\Core\Resource\Rendering\FileRendererInterface TYPO3\CMS\Core\SingletonInterface

Public Member Functions

int getPriority ()
 
bool canRender (FileInterface $file)
 
string render (FileInterface $file, $width, $height, array $options=[])
 

Protected Attributes

array $possibleMimeTypes = array( 'audio/mpeg', 'audio/wav', 'audio/x-wav', 'audio/ogg' )
 

Detailed Description

Class AudioTagRenderer

Definition at line 25 of file AudioTagRenderer.php.

Member Function Documentation

◆ canRender()

bool TYPO3\CMS\Core\Resource\Rendering\AudioTagRenderer::canRender ( FileInterface  $file)

Check if given File(Reference) can be rendered

Parameters
FileInterface$fileFile or FileReference to render
Returns
‪bool

Implements TYPO3\CMS\Core\Resource\Rendering\FileRendererInterface.

Definition at line 53 of file AudioTagRenderer.php.

◆ getPriority()

int TYPO3\CMS\Core\Resource\Rendering\AudioTagRenderer::getPriority ( )

Returns the priority of the renderer This way it is possible to define/overrule a renderer for a specific file type/context. For example create a video renderer for a certain storage/driver type. Should be between 1 and 100, 100 is more important than 1

Returns
‪int

Implements TYPO3\CMS\Core\Resource\Rendering\FileRendererInterface.

Definition at line 42 of file AudioTagRenderer.php.

◆ render()

string TYPO3\CMS\Core\Resource\Rendering\AudioTagRenderer::render ( FileInterface  $file,
  $width,
  $height,
array  $options = [] 
)

Render for given File(Reference) HTML output

Parameters
int | string$widthTYPO3 known format; examples: 220, 200m or 200c
int | string$heightTYPO3 known format; examples: 220, 200m or 200c
array$options‪controls = TRUE/FALSE (default TRUE), autoplay = TRUE/FALSE (default FALSE), loop = TRUE/FALSE (default FALSE)
Returns
‪string

Implements TYPO3\CMS\Core\Resource\Rendering\FileRendererInterface.

Definition at line 66 of file AudioTagRenderer.php.

References TYPO3\CMS\Core\Resource\FileInterface\getProperty().

Member Data Documentation

◆ $possibleMimeTypes

array TYPO3\CMS\Core\Resource\Rendering\AudioTagRenderer::$possibleMimeTypes = array( 'audio/mpeg', 'audio/wav', 'audio/x-wav', 'audio/ogg' )
protected

Mime types that can be used in the HTML Video tag

Definition at line 31 of file AudioTagRenderer.php.