class Video extends AbstractMediaElement (View source)

The Video class.

Constants

PRELOAD_NONE

PRELOAD_METADATA

PRELOAD_AUTO

Methods

__construct(array $attribs = array())

Constructor.

string
toString(boolean $forcePair = false)

toString

string
render(boolean $forcePair = false)

Alias of toString()

string
__toString()

Convert this object to string.

mixed
getContent()

Get content.

setContent(mixed $content)

Set content.

string
getAttribute(string $name, mixed $default = null)

Get attributes.

setAttribute(string $name, string $value)

Set attribute value.

array
getAttributes()

Get all attributes.

setAttributes(array $attribs)

Set all attributes.

string
getName()

Get element tag name.

setName(string $name)

Set element tag name.

boolean
offsetExists(mixed $offset)

Whether a offset exists

mixed
offsetGet(mixed $offset)

Offset to retrieve

void
offsetSet(mixed $offset, mixed $value)

Offset to set

void
offsetUnset(mixed $offset)

Offset to unset

create(array $attribs = array())

Quick create for PHP 5.3

setMainSource(string $src)

setMainSource

$this
addSource(string $type, string $src, string $media = null)

addSource

addOggSource(string $src, string $media = null)

addOggSource

string
getNoSupportHint()

Method to get property Hint

setNoSupportHint(string $hint)

Method to set property hint

autoplay(boolean $bool)

autoplay

controls(boolean $bool)

controls

loop(boolean $bool)

loop

muted(boolean $bool)

muted

preload(string $data)

preload

addMp4Source(string $src, string $media = null)

addMp4Source

addWebMSource(string $src, string $media = null)

addWebMSource

poster(string $data)

poster

height(string $data)

height

width(string $data)

width

Details

__construct(array $attribs = array())

Constructor.

Parameters

array $attribs Element attributes.

string toString(boolean $forcePair = false)

toString

Parameters

boolean $forcePair

Return Value

string

in DomElement at line line 79
string render(boolean $forcePair = false)

Alias of toString()

Parameters

boolean $forcePair

Return Value

string

in DomElement at line line 89
string __toString()

Convert this object to string.

Return Value

string

in DomElement at line line 106
mixed getContent()

Get content.

Return Value

mixed

in DomElement at line line 118
DomElement setContent(mixed $content)

Set content.

Parameters

mixed $content Element content.

Return Value

DomElement Return self to support chaining.

in DomElement at line line 133
string getAttribute(string $name, mixed $default = null)

Get attributes.

Parameters

string $name Attribute name.
mixed $default Default value.

Return Value

string The attribute value.

in DomElement at line line 151
DomElement setAttribute(string $name, string $value)

Set attribute value.

Parameters

string $name Attribute name.
string $value The value to set into attribute.

Return Value

DomElement Return self to support chaining.

in DomElement at line line 163
array getAttributes()

Get all attributes.

Return Value

array All attributes.

in DomElement at line line 175
DomElement setAttributes(array $attribs)

Set all attributes.

Parameters

array $attribs All attributes.

Return Value

DomElement Return self to support chaining.

in DomElement at line line 187
string getName()

Get element tag name.

Return Value

string

in DomElement at line line 199
DomElement setName(string $name)

Set element tag name.

Parameters

string $name Set element tag name.

Return Value

DomElement Return self to support chaining.

in DomElement at line line 214
boolean offsetExists(mixed $offset)

Whether a offset exists

Parameters

mixed $offset An offset to check for.

Return Value

boolean True on success or false on failure. The return value will be casted to boolean if non-boolean was returned.

in DomElement at line line 226
mixed offsetGet(mixed $offset)

Offset to retrieve

Parameters

mixed $offset The offset to retrieve.

Return Value

mixed Can return all value types.

in DomElement at line line 244
void offsetSet(mixed $offset, mixed $value)

Offset to set

Parameters

mixed $offset The offset to assign the value to.
mixed $value The value to set.

Return Value

void

in DomElement at line line 256
void offsetUnset(mixed $offset)

Offset to unset

Parameters

mixed $offset The offset to unset.

Return Value

void

static AbstractMediaElement create(array $attribs = array())

Quick create for PHP 5.3

Parameters

array $attribs

Return Value

AbstractMediaElement

AbstractMediaElement setMainSource(string $src)

setMainSource

Parameters

string $src

Return Value

AbstractMediaElement

$this addSource(string $type, string $src, string $media = null)

addSource

Parameters

string $type
string $src
string $media

Return Value

$this

AbstractMediaElement addOggSource(string $src, string $media = null)

addOggSource

Parameters

string $src
string $media

Return Value

AbstractMediaElement

string getNoSupportHint()

Method to get property Hint

Return Value

string

AbstractMediaElement setNoSupportHint(string $hint)

Method to set property hint

Parameters

string $hint

Return Value

AbstractMediaElement Return self to support chaining.

AbstractMediaElement autoplay(boolean $bool)

autoplay

Parameters

boolean $bool

Return Value

AbstractMediaElement

AbstractMediaElement controls(boolean $bool)

controls

Parameters

boolean $bool

Return Value

AbstractMediaElement

AbstractMediaElement loop(boolean $bool)

loop

Parameters

boolean $bool

Return Value

AbstractMediaElement

AbstractMediaElement muted(boolean $bool)

muted

Parameters

boolean $bool

Return Value

AbstractMediaElement

AbstractMediaElement preload(string $data)

preload

Parameters

string $data

Return Value

AbstractMediaElement

at line line 33
Video addMp4Source(string $src, string $media = null)

addMp4Source

Parameters

string $src
string $media

Return Value

Video

at line line 46
Video addWebMSource(string $src, string $media = null)

addWebMSource

Parameters

string $src
string $media

Return Value

Video

at line line 58
Video poster(string $data)

poster

Parameters

string $data

Return Value

Video

at line line 72
Video height(string $data)

height

Parameters

string $data

Return Value

Video

at line line 86
Video width(string $data)

width

Parameters

string $data

Return Value

Video