diff options
Diffstat (limited to 'librevideojs-html5-player.php')
-rw-r--r-- | librevideojs-html5-player.php | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/librevideojs-html5-player.php b/librevideojs-html5-player.php index b3a9f82..fcccc63 100644 --- a/librevideojs-html5-player.php +++ b/librevideojs-html5-player.php @@ -1,7 +1,7 @@ <?php /* Plugin Name: LibreVideoJS HTML5 Player -Version: 1.0.3 +Version: 1.0.4 Plugin URI: https://wordpress.org/plugins/librevideojs-html5-player Author: <a href="https://conocimientoslibres.tuxfamily.org">Jesús Eduardo</a>, <a href="http://www.freakspot.net/">Jorge Maldonado</a> Description: Reproductor de vídeo Libre en Responsive Desing HTML5 para WordPress, construido sobre el ampliamente utilizado <a href="https://notabug.org/Heckyel/LibreVideoJS">LibreVideoJS</a> de la biblioteca del reproductor de vídeo HTML5. Le permite incrustar vídeo en tu post o página con HTML5 para los navegadores principales. Es compatible con <a href="https://www.gnu.org/software/librejs/free-your-javascript.html">LibreJS</a> de acuerdo con la filosofía <a href="https://www.gnu.org">GNU</a>. @@ -20,7 +20,7 @@ if (!class_exists('LIBREVIDEOJS_HTML5_PLAYER')) { class LIBREVIDEOJS_HTML5_PLAYER { - var $plugin_version = '1.0.3'; + var $plugin_version = '1.0.4'; function __construct() { define('LIBREVIDEOJS_HTML5_PLAYER_VERSION', $this->plugin_version); @@ -83,14 +83,33 @@ if (!class_exists('LIBREVIDEOJS_HTML5_PLAYER')) { } +// function listar_archivos(){ +// $plugin_url = plugins_url('', __FILE__); +// +// // Abrir un directorio conocido, y proceder a leer su contenido +// foreach(glob($plugin_url . '/librevideojs/css/mix-material/*.min.css') as $piel) { +// echo "Filename: " . $piel . "<br />"; +// wp_register_style('librevideojs-mix' . 'Filename' . '-style', $piel); +// } +// } + function librevideojs_html5_player_enqueue_scripts() { if (!is_admin()) { $plugin_url = plugins_url('', __FILE__); - wp_enqueue_script('jquery'); wp_register_script('librevideojs', $plugin_url . '/librevideojs/js/cliplibrejs.dev.js', true); wp_enqueue_script('librevideojs'); - wp_register_style('librevideojs', $plugin_url . '/librevideojs/css/librevideojs-material/libre-skin-teal.min.css'); - wp_enqueue_style('librevideojs'); + // wp_register_style('librevideojs-mixteal-style', $plugin_url . '/librevideojs/css/mix-material/mix-teal.min.css'); + // wp_enqueue_style('librevideojs-mixteal-style'); + // wp_register_style('librevideojs-mixred-style', $plugin_url . '/librevideojs/css/mix-material/mix-red.min.css'); + // wp_enqueue_style('librevideojs-mixred-style'); + // Abrir un directorio conocido, y proceder a leer su contenido + foreach(glob($plugin_url . '/librevideojs/css/mix-material/*.min.css') as $piel) { + wp_register_style('librevideojs-mixred-style', $piel); + wp_enqueue_style('librevideojs-mixred-style'); + } + + wp_register_style('librevideojs-material-style', $plugin_url . '/librevideojs/css/librevideojs-material/libre-skin-teal.min.css'); + wp_enqueue_style('librevideojs-material-style'); wp_register_style('librevideojs-style', $plugin_url . '/librevideojs-html5-player.css'); wp_enqueue_style('librevideojs-style'); wp_register_script('librevideojs-selector', $plugin_url . '/librevideojs/selector/video-quality-selector.min.js', true); @@ -120,6 +139,7 @@ function librevideojs_html5_video_embed_handler($atts, $content=null) { 'loop' => '', 'muted' => '', 'poster' => '', + 'skin' => '', 'class' => '', ), $atts)); @@ -192,6 +212,13 @@ function librevideojs_html5_video_embed_handler($atts, $content=null) { $calidades = ""; } + if (!empty($skin)) { + $_skin = "-". "$skin"; + } + else{ + $_skin= "" ; + } + //poster if(!empty($poster)) { $poster = " poster='$poster'"; @@ -212,7 +239,7 @@ EOT; } $output = <<<EOT <!-- Begin LibreVideoJS --> - <video id="$player" class="cliplibre-js-responsive-container librevjs-hd cliplibre-js librevjs-libre-skin" {$controls}{$preload}{$autoplay}{$loop}{$muted}{$poster} data-setup='{}'> + <video id="$player" class="cliplibre-js-responsive-container librevjs-hd cliplibre-js librevjs-libre{$_skin}-skin" {$controls}{$preload}{$autoplay}{$loop}{$muted}{$poster} data-setup='{}'> {$src}\n\t\t{$calidades}{$track}<p class="no_html5">Sorry, this video will not work because your web browser does not support HTML5 video.<br>We recommend that you install a <a href='https://libreplanet.org/wiki/Libre_Browsers_Libre_Formats' target='_blank'> browser that respects the freedom and support free formats</a>!</p> </video> <script type="text/javascript"> @@ -266,7 +293,6 @@ function track_shortcode($atts, $content=null){ } add_shortcode('track', 'track_shortcode'); - /*Trayendo las calidades*/ function calidades_shortcode($atts, $content=null){ extract(shortcode_atts(array( @@ -286,7 +312,6 @@ function calidades_shortcode($atts, $content=null){ return $calidades; } - add_shortcode('calidades', 'calidades_shortcode'); ?> |