Apple News API PHP Client

VideoFill
in package
implements FillInterface

FinalYes

Video background fill.

Tags
see
https://developer.apple.com/documentation/apple_news/videofill

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'

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

$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
$this

setHorizontalAlignment()

Set the horizontal alignment.

public setHorizontalAlignment(string $alignment) : $this
Parameters
$alignment : string

One of 'left', 'center', 'right'.

Return values
$this

setLoop()

Set whether to loop the video.

public setLoop(bool $loop) : $this
Parameters
$loop : bool

Whether to loop.

Return values
$this

setStillURL()

Set the still image URL.

public setStillURL(string $url) : $this
Parameters
$url : string

The still image URL.

Return values
$this

setVerticalAlignment()

Set the vertical alignment.

public setVerticalAlignment(string $alignment) : $this
Parameters
$alignment : string

One of 'top', 'center', 'bottom'.

Return values
$this

        
On this page

Search results