Elementor\Widget_Video::_register_controls PHP Method

_register_controls() protected method

protected _register_controls ( )
    protected function _register_controls()
    {
        $this->start_controls_section('section_video', ['label' => __('Video', 'elementor')]);
        $this->add_control('video_type', ['label' => __('Video Type', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'youtube', 'options' => ['youtube' => __('YouTube', 'elementor'), 'vimeo' => __('Vimeo', 'elementor')]]);
        $this->add_control('link', ['label' => __('Link', 'elementor'), 'type' => Controls_Manager::TEXT, 'placeholder' => __('Enter your YouTube link', 'elementor'), 'default' => 'https://www.youtube.com/watch?v=9uOETcuFjbE', 'label_block' => true, 'condition' => ['video_type' => 'youtube']]);
        $this->add_control('vimeo_link', ['label' => __('Vimeo Link', 'elementor'), 'type' => Controls_Manager::TEXT, 'placeholder' => __('Enter your Vimeo link', 'elementor'), 'default' => 'https://vimeo.com/170933924', 'label_block' => true, 'condition' => ['video_type' => 'vimeo']]);
        $this->add_control('hosted_link', ['label' => __('Link', 'elementor'), 'type' => Controls_Manager::TEXT, 'placeholder' => __('Enter your video link', 'elementor'), 'default' => '', 'label_block' => true, 'condition' => ['video_type' => 'hosted']]);
        $this->add_control('aspect_ratio', ['label' => __('Aspect Ratio', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['169' => '16:9', '43' => '4:3', '32' => '3:2'], 'default' => '169', 'prefix_class' => 'elementor-aspect-ratio-']);
        $this->add_control('heading_youtube', ['label' => __('Video Options', 'elementor'), 'type' => Controls_Manager::HEADING, 'separator' => 'before']);
        // YouTube
        $this->add_control('yt_autoplay', ['label' => __('Autoplay', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['no' => __('No', 'elementor'), 'yes' => __('Yes', 'elementor')], 'condition' => ['video_type' => 'youtube'], 'default' => 'no']);
        $this->add_control('yt_rel', ['label' => __('Suggested Videos', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['no' => __('Hide', 'elementor'), 'yes' => __('Show', 'elementor')], 'default' => 'no', 'condition' => ['video_type' => 'youtube']]);
        $this->add_control('yt_controls', ['label' => __('Player Control', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['yes' => __('Show', 'elementor'), 'no' => __('Hide', 'elementor')], 'default' => 'yes', 'condition' => ['video_type' => 'youtube']]);
        $this->add_control('yt_showinfo', ['label' => __('Player Title & Actions', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['yes' => __('Show', 'elementor'), 'no' => __('Hide', 'elementor')], 'default' => 'yes', 'condition' => ['video_type' => 'youtube']]);
        // Vimeo
        $this->add_control('vimeo_autoplay', ['label' => __('Autoplay', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['no' => __('No', 'elementor'), 'yes' => __('Yes', 'elementor')], 'default' => 'no', 'condition' => ['video_type' => 'vimeo']]);
        $this->add_control('vimeo_loop', ['label' => __('Loop', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['no' => __('No', 'elementor'), 'yes' => __('Yes', 'elementor')], 'default' => 'no', 'condition' => ['video_type' => 'vimeo']]);
        $this->add_control('vimeo_title', ['label' => __('Intro Title', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['yes' => __('Show', 'elementor'), 'no' => __('Hide', 'elementor')], 'default' => 'yes', 'condition' => ['video_type' => 'vimeo']]);
        $this->add_control('vimeo_portrait', ['label' => __('Intro Portrait', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['yes' => __('Show', 'elementor'), 'no' => __('Hide', 'elementor')], 'default' => 'yes', 'condition' => ['video_type' => 'vimeo']]);
        $this->add_control('vimeo_byline', ['label' => __('Intro Byline', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['yes' => __('Show', 'elementor'), 'no' => __('Hide', 'elementor')], 'default' => 'yes', 'condition' => ['video_type' => 'vimeo']]);
        $this->add_control('vimeo_color', ['label' => __('Controls Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'condition' => ['video_type' => 'vimeo']]);
        // Self Hosted
        //$this->add_control(
        //	'hosted_width',
        //	[
        //		'label' => __( 'Width', 'elementor' ),
        //		'type' => Controls_Manager::NUMBER,
        //		'default' => '640',
        //		'condition' => [
        //			'video_type' => 'hosted',
        //		],
        //	]
        //);
        //
        //$this->add_control(
        //	'hosted_height',
        //	[
        //		'label' => __( 'Height', 'elementor' ),
        //		'type' => Controls_Manager::NUMBER,
        //		'default' => '360',
        //		'condition' => [
        //			'video_type' => 'hosted',
        //		],
        //	]
        //);
        //
        //$this->add_control(
        //	'hosted_autoplay',
        //	[
        //		'label' => __( 'Autoplay', 'elementor' ),
        //		'type' => Controls_Manager::SELECT,
        //		'options' => [
        //			'no' => __( 'No', 'elementor' ),
        //			'yes' => __( 'Yes', 'elementor' ),
        //		],
        //		'default' => 'no',
        //		'condition' => [
        //			'video_type' => 'hosted',
        //		],
        //	]
        //);
        //
        //$this->add_control(
        //	'hosted_loop',
        //	[
        //		'label' => __( 'Loop', 'elementor' ),
        //		'type' => Controls_Manager::SELECT,
        //		'options' => [
        //			'no' => __( 'No', 'elementor' ),
        //			'yes' => __( 'Yes', 'elementor' ),
        //		],
        //		'default' => 'no',
        //		'condition' => [
        //			'video_type' => 'hosted',
        //		],
        //	]
        //);
        $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'youtube']);
        $this->end_controls_section();
        $this->start_controls_section('section_image_overlay', ['label' => __('Image Overlay', 'elementor')]);
        $this->add_control('show_image_overlay', ['label' => __('Image Overlay', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'no', 'options' => ['no' => __('Hide', 'elementor'), 'yes' => __('Show', 'elementor')]]);
        $this->add_control('image_overlay', ['label' => __('Image', 'elementor'), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src()], 'condition' => ['show_image_overlay' => 'yes']]);
        $this->add_control('show_play_icon', ['label' => __('Play Icon', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'yes', 'options' => ['yes' => __('Yes', 'elementor'), 'no' => __('No', 'elementor')], 'condition' => ['show_image_overlay' => 'yes', 'image_overlay[url]!' => '']]);
        $this->end_controls_section();
    }