Properties

$shown

$shown

Array of video GUIDs shown and their counts, moved from the old VideoPress class.

$video

$video : \VideoPress_Video

Video data for the requested guid and maximum width

Type

\VideoPress_Video

$video_container_id

$video_container_id : string

DOM identifier of the video container

Type

string

$video_id

$video_id : string

DOM identifier of the video element (video, object, embed)

Type

string

$options

$options : array

Array of playback options: force_flash or freedom

Type

array

Methods

__construct()

__construct( $guid,  $maxwidth,  $options)

Initiate a player object based on shortcode values and possible blog-level option overrides

Parameters

$guid
$maxwidth
$options

asXML()

asXML() : string

Output content suitable for a feed reader displaying RSS or Atom feeds We do not display error messages in the feed view due to caching concerns.

Flash content presented using markup for feed reader compatibility.

Returns

string —

HTML string or empty string if error

asHTML()

asHTML() : string

Video player markup for best matching the current request and publisher options

Returns

string —

HTML markup string or empty string if no video property found

esc_flash_params()

esc_flash_params(array $flash_params) : array

Only allow legitimate Flash parameters and their values

Parameters

array $flash_params

Flash parameters expressed in key-value form

Returns

array —

validated Flash parameters

html_wrapper()

html_wrapper( $content) : string

Wrap output in a VideoPress player container

Parameters

$content

Returns

string —

HTML string or blank string if nothing to wrap

error_message()

error_message( $error) : string

Display an error message to users capable of doing something about the error

Parameters

$error

Returns

string —

HTML string

age_gate_required()

age_gate_required() : bool

Rating agencies and industry associations require a potential viewer verify his or her age before a video or its poster frame are displayed.

Content rated for audiences 17 years of age or older requires such verification across multiple rating agencies and industry associations

Returns

bool —

true if video requires the viewer verify he or she is 17 years of age or older

html_age_gate()

html_age_gate() : string

Select a date of birth using HTML form elements.

Returns

string —

HTML markup

html5_static()

html5_static() : string

Return HTML5 video static markup for the given video parameters.

Use default browser player controls. No Flash fallback.

Returns

string —

HTML5 video element and children

html5_dynamic()

html5_dynamic() : string

Click to play dynamic HTML5-capable player.

The player displays a video preview section including poster frame, video title, play button and watermark on the original page load and calculates the playback capabilities of the browser. The video player is loaded when the visitor clicks on the video preview area. If Flash Player 10 or above is available the browser will display the Flash version of the video. If HTML5 video appears to be supported and the browser may be capable of MP4 (H.264, AAC) or OGV (Theora, Vorbis) playback the browser will display its native HTML5 player.

Returns

string —

HTML markup

get_flash_variables()

get_flash_variables() : array

Filter Flash variables from the response, taking into consideration player options.

Returns

array —

Flash variable key value pairs

get_flash_parameters()

get_flash_parameters() : array

Validate and filter Flash parameters

Returns

array —

Flash parameters passed through key and value validation

flash_embed()

flash_embed() : string

Flash player markup in a HTML embed element.

Returns

string —

HTML markup. Embed element with no children

flash_object()

flash_object() : \HTML

Double-baked Flash object markup for Internet Explorer and more standards-friendly consuming agents.

Returns

\HTML —

markup. Object and children.