VideoMediaTrait uses trait:short, trait:short
Trait VideoMediaTrait
Table of Contents
Methods
- autoplay() : $this
- Allows to set the autoplay attribute
- controls() : $this
- Allows to set or remove the HTML5 default controls
- loop() : $this
- Allows to set the loop attribute
- muted() : $this
- Allows to set the muted attribute
- playsinline() : $this
- Allows to set the playsinline attribute
- poster() : $this
- Allows to set the video's poster image
- preload() : $this
- Allows to set the preload behaviour
- resetPlayer() : mixed
- Reset player.
- resize() : $this
- Resize media by setting attributes
- sourceParsedownElement() : array<string|int, mixed>
- Parsedown element for source display mode
Methods
autoplay()
Allows to set the autoplay attribute
public
autoplay([bool $status = false ]) : $this
Parameters
- $status : bool = false
Return values
$thiscontrols()
Allows to set or remove the HTML5 default controls
public
controls([bool $status = true ]) : $this
Parameters
- $status : bool = true
Return values
$thisloop()
Allows to set the loop attribute
public
loop([bool $status = false ]) : $this
Parameters
- $status : bool = false
Return values
$thismuted()
Allows to set the muted attribute
public
muted([bool $status = false ]) : $this
Parameters
- $status : bool = false
Return values
$thisplaysinline()
Allows to set the playsinline attribute
public
playsinline([bool $status = false ]) : $this
Parameters
- $status : bool = false
Return values
$thisposter()
Allows to set the video's poster image
public
poster(string $urlImage) : $this
Parameters
- $urlImage : string
Return values
$thispreload()
Allows to set the preload behaviour
public
preload([string|null $preload = null ]) : $this
Parameters
- $preload : string|null = null
Return values
$thisresetPlayer()
Reset player.
public
resetPlayer() : mixed
resize()
Resize media by setting attributes
public
resize([int|null $width = null ][, int|null $height = null ]) : $this
Parameters
- $width : int|null = null
- $height : int|null = null
Return values
$thissourceParsedownElement()
Parsedown element for source display mode
protected
sourceParsedownElement(array<string|int, mixed> $attributes[, bool $reset = true ]) : array<string|int, mixed>
Parameters
- $attributes : array<string|int, mixed>
- $reset : bool = true