L_version);
$this->theme_includes();
}
function theme_includes(){
if (!is_admin()) {
add_action('wp_enqueue_scripts', 'librevideojs_base');
add_shortcode('librevideojs_video', 'LibreVideoJS_embed');
//allows shortcode execution in the widget, excerpt and content
add_filter('widget_text', 'do_shortcode');
add_filter('the_excerpt', 'do_shortcode', 11);
add_filter('the_content', 'do_shortcode', 11);
}
}
}
$GLOBALS['easy_video_player'] = new LIBREVIDEOJS();
new librevideojs_panel_shortcode();
}
function librevideojs_base(){
global $post, $theme_url;
$theme_url = get_bloginfo('template_url', __FILE__);
if ( ( is_author() || is_page() || is_single() ) && strpos($post->post_content, '[librevideojs_video') !== false ){
wp_enqueue_style('lvjs-mix-master', $theme_url . '/css/mix-material/master.min.css', array(), '1.4');
wp_enqueue_script('LibreVideoJS', $theme_url . '/js/cliplibrejs.developer.min.js', array(), L_VERSION);
wp_enqueue_script('jquery-libre', $theme_url . '/js/jquery-3.1.1.min.js', array(), '3.1.1', true);
}
else {
return false;
}
}
function LibreVideoJS_embed($atts, $content=null){
extract(shortcode_atts(array(
'url' => '',
'url_calidad' => '',
'code' => '',
'selector' => '',
'width' => '',
'controls' => '',
'preload' => 'auto',
'autoplay' => 'false',
'loop' => '',
'muted' => '',
'poster' => '',
'skin' => '',
'class' => '',
), $atts));
if(empty($url)){
return __('you need to specify the src of the video file', 'Lidra');
}
//src
$src = '
' . $_no_html5 . '
'; //force_types $_force_types = 'video/' . $code; //custom style $style = ''; if(!empty($width)){ $style = <<