This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Plugin::set_player_options()

Set video player options


Source

File: includes/libs/plugin.class.php

	private function set_player_options(){
		$defaults = [
			'title'	=> 1, 	// show video title
			'byline' => 1, 	// show player controls. Values: 0 or 1
			'portrait' => 1, 	// show author image
			'loop' => 0,
			// Autoplay may be blocked in some environments, such as IOS, Chrome 66+, and Safari 11+. In these cases, we’ll revert to standard playback requiring viewers to initiate playback.
			'autoplay' => 0, 	// 0 - on load, player won't play video; 1 - on load player plays video automatically
			'color'		=> '', 	// no color set by default; will use Vimeo's settings
			'dnt' => 0, // block Vimeo player from tracking session data or cookies (1) or allow it (0);
			// extra settings
			'aspect_ratio' => '16x9',
			'width'	=> 900,
			'max_height' => 0, // allows setup of a maximum embed height; must be a value over 50px to work
			'video_position' => 'below-content', // in front-end custom post, where to display the video: above or below post content
			'video_align' => 'align-left', // video alignment
			'lazy_load' => false, // lazy load videos
			'play_icon_color' => '#FF0000', // lazy load play icon color
			'volume' => 45, // video default volume
			// extra player settings controllable by widgets/shortcodes
			'playlist_loop' => 0,
			'aspect_override' => true,
			'start_time' => 0, // time in seconds when playback should start
			'muted' => false, // load video muted
			'background' => false, // load video in background mode (hides controls and mutes video)
			'transparent' => false, // video embed should be with background (false) or without it (true)
		];

		/**
		 * Player options filter.
		 *
		 * @param array $defaults Default options array.
		 */
		$defaults = apply_filters(
			'vimeotheque\player_options_default',
			$defaults
		);

		// get Plugin option
		$this->player_options = Options_Factory::get( '_cvm_player_settings', $defaults );
	}

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!