AudioAsset
class AudioAsset implements Asset, HtmlRenderable
Audio asset.
Properties
$duration | Duration in seconds |
Methods
__construct(string $url, string|null $mimeType = null, string|null $file = null, float|null $duration = null)
No description
string
__toString()
Allows direct echoing of the object to get the URL.
Html
getImportElement()
Returns HTML tag name and attributes for rendering the asset.
Html
getPreloadElement()
Returns HTML tag name and attributes for preloading the asset.
Details
at line 21
__construct(string $url, string|null $mimeType = null, string|null $file = null, float|null $duration = null)
No description
at line 33
string
__toString()
Allows direct echoing of the object to get the URL.
at line 39
Html
getImportElement()
Returns HTML tag name and attributes for rendering the asset.
at line 48
Html
getPreloadElement()
Returns HTML tag name and attributes for preloading the asset.
Traits
Lazy-loading of properties as a workaround for PHP < 8.4.