Helper::get_player_size( string $before = ' style="', string $after = '"', bool $echo = true )


Parameters

$before

(string) (Optional)

Default value: ' style="'

$after

(string) (Optional)

Default value: '"'

$echo

(bool) (Optional)

Default value: true


Return

(string)


Source

File: includes/libs/themes/helper.class.php

	public static function get_player_size( $before = ' style="', $after='"', $echo = true ){
		$player = \Vimeotheque\Helper::get_embed_options( self::get_player_options() );
		$height = \Vimeotheque\Helper::calculate_player_height( $player['aspect_ratio'], $player['width'] );

		$output = sprintf(
			'width: %dpx; height: %dpx;',
			$player['width'],
			$height
		);

		if( $echo ){
			echo $before . $output . $after;
		}

		return $before . $output . $after;
	}

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!