VideoFill
in package
implements
FillInterface
FinalYes
Video background fill.
Tags
Table of Contents
Interfaces
- FillInterface
- Interface for all fill types.
Constants
- FILL_COVER = 'cover'
- Valid fill modes.
- FILL_FIT = 'fit'
Properties
- $fillMode : string|null
- The fill mode.
- $horizontalAlignment : string|null
- The horizontal alignment.
- $loop : bool|null
- Whether to loop the video.
- $stillURL : string|null
- The still image URL to show while loading.
- $url : string
- $verticalAlignment : string|null
- The vertical alignment.
Methods
- __construct() : mixed
- Create a new VideoFill.
- fromBundle() : self
- Create a VideoFill from a bundle file.
- fromUrl() : self
- Create a VideoFill from a URL.
- getType() : string
- Get the fill type identifier.
- jsonSerialize() : array<string, mixed>
- {@inheritdoc}
- setFillMode() : $this
- Set the fill mode.
- setHorizontalAlignment() : $this
- Set the horizontal alignment.
- setLoop() : $this
- Set whether to loop the video.
- setStillURL() : $this
- Set the still image URL.
- setVerticalAlignment() : $this
- Set the vertical alignment.
Constants
FILL_COVER
Valid fill modes.
public
mixed
FILL_COVER
= 'cover'
FILL_FIT
public
mixed
FILL_FIT
= 'fit'
Properties
$fillMode
The fill mode.
private
string|null
$fillMode
= null
$horizontalAlignment
The horizontal alignment.
private
string|null
$horizontalAlignment
= null
$loop
Whether to loop the video.
private
bool|null
$loop
= null
$stillURL
The still image URL to show while loading.
private
string|null
$stillURL
= null
$url read-only
private
string
$url
$verticalAlignment
The vertical alignment.
private
string|null
$verticalAlignment
= null
Methods
__construct()
Create a new VideoFill.
public
__construct(string $url) : mixed
Parameters
- $url : string
-
The video URL.
fromBundle()
Create a VideoFill from a bundle file.
public
static fromBundle(string $filename) : self
Parameters
- $filename : string
-
The filename in the bundle.
Return values
self —A new instance.
fromUrl()
Create a VideoFill from a URL.
public
static fromUrl(string $url) : self
Parameters
- $url : string
-
The video URL.
Return values
self —A new instance.
getType()
Get the fill type identifier.
public
getType() : string
Return values
string —The fill type.
jsonSerialize()
{@inheritdoc}
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>setFillMode()
Set the fill mode.
public
setFillMode(string $mode) : $this
Parameters
- $mode : string
-
One of 'cover', 'fit'.
Return values
$thissetHorizontalAlignment()
Set the horizontal alignment.
public
setHorizontalAlignment(string $alignment) : $this
Parameters
- $alignment : string
-
One of 'left', 'center', 'right'.
Return values
$thissetLoop()
Set whether to loop the video.
public
setLoop(bool $loop) : $this
Parameters
- $loop : bool
-
Whether to loop.
Return values
$thissetStillURL()
Set the still image URL.
public
setStillURL(string $url) : $this
Parameters
- $url : string
-
The still image URL.
Return values
$thissetVerticalAlignment()
Set the vertical alignment.
public
setVerticalAlignment(string $alignment) : $this
Parameters
- $alignment : string
-
One of 'top', 'center', 'bottom'.