PHP Class VideoPress_Video, jetpack

Since: 1.3
Afficher le fichier Open project: automattic/jetpack

Méthodes publiques

Свойство Type Description
$age_rating integer Recommended minimum age of the viewer.
$blog_id integer WordPress.com blog identifier
$calculated_height integer Video height calculated based on original video dimensions and the requested maxwidth
$calculated_width integer Video width calculated based on original video dimensions and the requested maxwidth
$captions array Closed captions if available for the given video. Associative array of ISO 639-2 language code and a WebVTT URI
$description string Video description
$duration integer Video duration in whole seconds
$expires integer Expiration of the video expressed in Unix time
$guid string VideoPress unique identifier
$language string Text and audio language as ISO 639-2 language code
$maxwidth integer Maximum desired width.
$players stdClass Video player information
$post_id integer Remote blog attachment identifier
$poster_frame_uri string Poster frame image URI for the given video guid and calculated dimensions.
$restricted_embed boolean Video author has restricted video embedding or sharing
$skin array Video player skinning preferences including background color and watermark
$text_direction string Directionality of title text. ltr or rtl
$title string Video title
$version
$videos stdClass Video files associated with the given guid for the calculated dimensions.

Méthodes publiques

Méthode Description
__construct ( $guid, $maxwidth = 640 ) Setup the object.
calculate_expiration ( $expires_header ) : integer | boolean Convert an Expires HTTP header value into Unix time for use in WP Cache
hostname ( string $url ) : boolean | string Extract the site's host domain for statistics and comparison against an allowed site list in the case of restricted embeds.

Private Methods

Méthode Description
get_data ( ) : stdClass | WP_Error Request data from WordPress.com for the given guid, maxwidth, and calculated blog hostname.

Method Details

__construct() public méthode

Request video information from VideoPress servers and process the response.
Since: 1.3
public __construct ( $guid, $maxwidth = 640 )

calculate_expiration() public static méthode

Convert an Expires HTTP header value into Unix time for use in WP Cache
Since: 1.3
public static calculate_expiration ( $expires_header ) : integer | boolean
Résultat integer | boolean Unix time or false

hostname() public static méthode

Extract the site's host domain for statistics and comparison against an allowed site list in the case of restricted embeds.
Since: 1.2
public static hostname ( string $url ) : boolean | string
$url string absolute URL
Résultat boolean | string host component of the URL, or false if none found

Property Details

$age_rating public_oe property

Recommended minimum age of the viewer.
Since: 1.3
public int $age_rating
Résultat integer

$blog_id public_oe property

WordPress.com blog identifier
Since: 1.5
public int $blog_id
Résultat integer

$calculated_height public_oe property

Video height calculated based on original video dimensions and the requested maxwidth
Since: 1.3
public int $calculated_height
Résultat integer

$calculated_width public_oe property

Video width calculated based on original video dimensions and the requested maxwidth
Since: 1.3
public int $calculated_width
Résultat integer

$captions public_oe property

Closed captions if available for the given video. Associative array of ISO 639-2 language code and a WebVTT URI
Since: 1.5
public array $captions
Résultat array

$description public_oe property

Video description
Since: 4.4
public string $description
Résultat string

$duration public_oe property

Video duration in whole seconds
Since: 1.3
public int $duration
Résultat integer

$expires public_oe property

Expiration of the video expressed in Unix time
Since: 1.3
public int $expires
Résultat integer

$guid public_oe property

VideoPress unique identifier
Since: 1.3
public string $guid
Résultat string

$language public_oe property

Text and audio language as ISO 639-2 language code
Since: 1.3
public string $language
Résultat string

$maxwidth public_oe property

Maximum desired width.
Since: 1.3
public int $maxwidth
Résultat integer

$players public_oe property

Video player information
Since: 1.3
public stdClass $players
Résultat stdClass

$post_id public_oe property

Remote blog attachment identifier
Since: 1.5
public int $post_id
Résultat integer

$poster_frame_uri public_oe property

Poster frame image URI for the given video guid and calculated dimensions.
Since: 1.3
public string $poster_frame_uri
Résultat string

$restricted_embed public_oe property

Video author has restricted video embedding or sharing
Since: 1.3
public bool $restricted_embed
Résultat boolean

$skin public_oe property

Video player skinning preferences including background color and watermark
Since: 1.5
public array $skin
Résultat array

$text_direction public_oe property

Directionality of title text. ltr or rtl
Since: 1.3
public string $text_direction
Résultat string

$title public_oe property

Video title
Since: 1.3
public string $title
Résultat string

$version public_oe property

public $version

$videos public_oe property

Video files associated with the given guid for the calculated dimensions.
Since: 1.3
public stdClass $videos
Résultat stdClass