<?php
use Elementor\Modules\DynamicTags\Module as TagsModule;
class VAPFEM_Video_Player_Pro extends \Elementor\Widget_Base {
public function get_name() {
return "vapfem_video_player";
}
public function get_title() {
return esc_html__( "Video Player", 'vapfem' );
}
public function get_icon() {
return 'az_icon eicon-youtube';
}
public function get_categories() {
return array( 'general' );
}
public function get_script_depends() {
return [
'plyr',
'plyr-polyfilled',
'vapfem-main',
];
}
protected function _register_controls() {
$this->start_controls_section(
'content_section',
[
'label' => esc_html__( 'General Options', 'vapfem' ),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'video_type',
[
'label' => esc_html__( 'Video Type', 'vapfem' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => 'youtube',
'options' => [
'youtube' => esc_html__( 'Youtube', 'vapfem' ),
'vimeo' => esc_html__( 'Vimeo', 'vapfem' ),
'html5' => esc_html__( 'HTML5', 'vapfem' ),
],
]
);
$this->add_control(
'youtube_video_id',
[
'label' => esc_html__( 'Youtube Video ID', 'vapfem' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => esc_html__( 'bTqVqk7FSmY', 'vapfem' ),
'placeholder' => esc_html__( 'Put your video id here', 'vapfem' ),
'separator' => 'before',
'condition' => [
'video_type' => 'youtube',
]
]
);
$this->add_control(
'vimeo_video_id',
[
'label' => esc_html__( 'Vimeo Video ID', 'vapfem' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => esc_html__( '76979871', 'vapfem' ),
'placeholder' => esc_html__( 'Put your video id here', 'vapfem' ),
'separator' => 'before',
'condition' => [
'video_type' => 'vimeo',
]
]
);
$this->add_control(
'custom_poster',
[
'label' => esc_html__( 'Add Custom Poster', 'vapfem' ),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'vapfem' ),
'label_off' => esc_html__( 'No', 'vapfem' ),
'return_value' => 'true',
'default' => '',
'separator' => 'before',
]
);
$this->add_control(
'poster',
[
'label' => esc_html__( 'Custom Poster For Video', 'vapfem' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
'condition' => [
'custom_poster' => 'true',
]
]
);
$repeater = new \Elementor\Repeater();
$repeater->add_control(
'src_type',
[
'label' => esc_html__( 'Video Source', 'vapfem' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => 'link',
'options' => [
'upload' => esc_html__( 'Upload Video', 'vapfem' ),
'link' => esc_html__( 'Put Video Link', 'vapfem' ),
],
]
);
$repeater->add_control(
'video_upload',
[
'label' => esc_html__( 'Upload Video', 'vapfem' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'dynamic' => [
'active' => true,
'categories' => [
TagsModule::MEDIA_CATEGORY,
],
],
'media_type' => 'video',
'condition' => [
'src_type' => 'upload',
]
]
);
$repeater->add_control(
'video_link',
[
'label' => esc_html__( 'Video Link', 'vapfem' ),
'type' => \Elementor\Controls_Manager::URL,
'placeholder' => esc_html__( 'https://your-link.com', 'vapfem' ),
'show_external' => false,
'default' => [
'url' => 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4',
'is_external' => false,
'nofollow' => false,
],
'condition' => [
'src_type' => 'link',
]
]
);
$repeater->add_control(
'video_size',
[
'label' => esc_html__( 'Video Size', 'vapfem' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'' => esc_html__( 'Select', 'vapfem' ),
'240' => esc_html__( '240', 'vapfem' ),
'360' => esc_html__( '360', 'vapfem' ),
'480' => esc_html__( '480', 'vapfem' ),
'576' => esc_html__( '576', 'vapfem' ),
'720' => esc_html__( '720', 'vapfem' ),
'1080' => esc_html__( '1080', 'vapfem' ),
'1440' => esc_html__( '1440', 'vapfem' ),
'2160' => esc_html__( '2160', 'vapfem' ),
'2880' => esc_html__( '2880', 'vapfem' ),
'4320' => esc_html__( '4320', 'vapfem' ),
],
]
);
$this->add_control(
'video_list',
[
'label' => esc_html__( 'Video List', 'vapfem' ),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
'default' => [
[
'video_link' => 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4',
'video_size' => esc_html__( '576', 'vapfem' ),
],
[
'video_link' => 'ttps://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-720p.mp4',
'video_size' => esc_html__( '720', 'vapfem' ),
],
[
'video_link' => 'ttps://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4',
'video_size' => esc_html__( '1080', 'vapfem' ),
],
],
'separator' => 'before',
'condition' => [
'video_type' => 'html5',
]
]
);
$this->add_control(
'autoplay',
[
'label' => esc_html__( 'Autoplay', 'vapfem' ),
'type' => \Elementor\Controls_Manager::SWITCHER,
'description' => __('Autoplay varies for each user by an intelligent system of the browsers. If you experience Autoplay does not work from your browser. Enable the "Muted" option below. <br><br>Muted autoplay is always allowed.', 'vapfem'),
'label_on' => esc_html__( 'Yes', 'vapfem' ),
没有合适的资源?快使用搜索试试~ 我知道了~
【WordPress插件】2022年最新版完整功能demo+插件v2.0.0.zip
共15个文件
php:5个
js:3个
css:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 196 浏览量
2022-04-08
21:12:15
上传
评论
收藏 116KB ZIP 举报
温馨提示
"【WordPress插件】2022年最新版完整功能demo+插件v2.0.0 AZ Video and Audio Player Addon for Elementor AZ视频和音频播放器Addon for Elementor" ---------- 泰森云每天更新发布最新WordPress主题、HTML主题、WordPress插件、shopify主题、opencart主题、PHP项目源码、安卓项目源码、ios项目源码,更有超10000个资源可供选择,如有需要请站内联系。
资源推荐
资源详情
资源评论
收起资源包目录
【WordPress插件】2022年最新版完整功能demo+插件v2.0.0.zip (15个子文件)
az-video-and-audio-player-for-elementor
index.php 40B
assets
css
plyr.css 37KB
editor.css 423B
main.css 774B
js
plyr.min.js 117KB
plyr.polyfilled.min.js 188KB
main.js 5KB
.DS_Store 6KB
.DS_Store 10KB
languages
vapfem.pot 12KB
plugin-main.php 867B
includes
em-init.php 4KB
.DS_Store 8KB
widgets
audio-player.php 25KB
video-player.php 43KB
共 15 条
- 1
资源评论
Lee达森
- 粉丝: 968
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功