Helper::get_duration( string $before = '<span class="duration">', string $after = '</span>', bool $echo = true )

Get the video duration


Parameters

$before

(Optional)

Default value: '<span class="duration">'

$after

(Optional)

Default value: '</span>'

$echo

(Optional)

Default value: true


Return

(string|void)


Source

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

	public static function get_duration( $before = '<span class="duration">', $after = '</span>', $echo = true ){
		$video = self::current_video_post();
		if( !$video ){
			return;
		}

		$output = sprintf(
			'%s%s%s',
			$before,
			\Vimeotheque\Helper::human_time( $video->duration ),
			$after
		);

		if( $echo ){
			echo $output;
		}

		return $output;
	}

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!