From 38d6ca1e4fe4e2077cbc878778a183922b92f69c Mon Sep 17 00:00:00 2001 From: Heckyel Date: Sat, 10 Dec 2016 18:55:30 -0500 Subject: =?UTF-8?q?flexibilidad=20con=20subt=C3=ADtulos=20-=20A=C3=BAn=20n?= =?UTF-8?q?o=20solucionado=20compatilidad=20de=20subt=C3=ADtulos=20con=20i?= =?UTF-8?q?ntefaz=20gr=C3=A1fica=20|=20beta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GWP_bs3_panel_shortcode.php | 4 +- languages/librevideojs-html5-player-es_ES.po | 2 +- languages/librevideojs-html5-player.pot | 2 +- librevideojs-html5-player.php | 104 ++++++++------ librevideojs/fonts/libre-material/libre-icons.eot | Bin 5066 -> 5098 bytes librevideojs/fonts/libre-material/libre-icons.svg | 157 ++++++++++----------- librevideojs/fonts/libre-material/libre-icons.ttf | Bin 4884 -> 4916 bytes librevideojs/fonts/libre-material/libre-icons.woff | Bin 2884 -> 2832 bytes readme.txt | 10 +- 9 files changed, 147 insertions(+), 132 deletions(-) diff --git a/GWP_bs3_panel_shortcode.php b/GWP_bs3_panel_shortcode.php index 1ef3774..2f89322 100644 --- a/GWP_bs3_panel_shortcode.php +++ b/GWP_bs3_panel_shortcode.php @@ -39,7 +39,7 @@ class GWP_bs3_panel_shortcode{ ), $atts ) ); - //make sure the panel type is a valid styled type if not revert to wemb + //make sure the panel type is a valid styled type if not revert to webm $panel_types = array('ogv','webm','mp4'); $type = in_array($type, $panel_types)? $type: 'webm'; @@ -113,3 +113,5 @@ class GWP_bs3_panel_shortcode{ wp_enqueue_style('bs3_panel_shortcode', plugins_url('librevideojs/css/mce-button.css' , __FILE__)); } } + +?> diff --git a/languages/librevideojs-html5-player-es_ES.po b/languages/librevideojs-html5-player-es_ES.po index 035a407..840fbbb 100644 --- a/languages/librevideojs-html5-player-es_ES.po +++ b/languages/librevideojs-html5-player-es_ES.po @@ -36,6 +36,6 @@ msgstr "" "Para obtener documentación detallada, por favor visite la página de plugin here." -#: librevideojs-html5-player.php:136 +#: librevideojs-html5-player.php:130 msgid "you need to specify the src of the video file" msgstr "es necesario especificar el src del archivo de vídeo" diff --git a/languages/librevideojs-html5-player.pot b/languages/librevideojs-html5-player.pot index dc2295b..5573b61 100644 --- a/languages/librevideojs-html5-player.pot +++ b/languages/librevideojs-html5-player.pot @@ -32,6 +32,6 @@ msgid "" "\"_blank\" href=\"%s\">here." msgstr "" -#: librevideojs-html5-player.php:136 +#: librevideojs-html5-player.php:130 msgid "you need to specify the src of the video file" msgstr "" diff --git a/librevideojs-html5-player.php b/librevideojs-html5-player.php index c6215e1..7807a2e 100644 --- a/librevideojs-html5-player.php +++ b/librevideojs-html5-player.php @@ -106,7 +106,7 @@ function librevideojs_html5_player_header() { } } -function librevideojs_html5_video_embed_handler($atts) { +function librevideojs_html5_video_embed_handler($atts, $content=null) { extract(shortcode_atts(array( 'url' => '', 'rsd' => '', @@ -123,13 +123,7 @@ function librevideojs_html5_video_embed_handler($atts) { 'muted' => '', 'poster' => '', 'class' => '', - 'subten' => '', - 'subtes' => '', - 'subtpt' => '', - 'subtit' => '', - 'subtfr' => '', - 'subtgl' => '', - 'subteo' => '', + ), $atts)); if(empty($url)){ @@ -154,43 +148,6 @@ function librevideojs_html5_video_embed_handler($atts) { $src = $src.$umsd; } - //subtitles - if (!empty($subtes)) { - $subtitl_es = ''; - }else { - $subtitl_es = ""; - } - - if (!empty($subten)){ - $subtitl_en = ''; - } else { - $subtitl_en = ""; - } - - if (!empty($subtpt)){ - $subtitl_pt = ''; - } else { - $subtitl_pt = ""; - } - - if (!empty($subtfr)){ - $subtitl_fr = ''; - } else { - $subtitl_fr = ""; - } - - if (!empty($subtgl)){ - $subtitl_gl = ''; - } else { - $subtitl_gl = ""; - } - - if (!empty($subteo)){ - $subtitl_eo = ''; - } else { - $subtitl_eo = ""; - } - //resolution selector if (!empty($selector)) { $resolution = "$selector"; @@ -237,6 +194,14 @@ function librevideojs_html5_video_embed_handler($atts) { else{ $muted = ""; } + // Tracks + if(!is_null( $content )){ + $track = do_shortcode($content); + } + else{ + $track = ""; + } + //poster if(!empty($poster)) { $poster = ' poster="'.$poster.'"'; @@ -256,9 +221,10 @@ EOT; } $output = << $style
+ EOT; return $output; } + +/*Trayendo los subtitulos mediante [track]*/ +function track_shortcode($atts, $content=null){ + extract(shortcode_atts(array( + 'kind' => '', + 'subt' => '', + 'srclang' => '', + 'label' => '', + 'default' => '', + ), $atts)); + + if($kind){ + $kind = " kind='" . $kind . "'"; + } + + if($subt){ + $subt = " src='" . $subt . "'"; + } + + if($srclang){ + $srclang = " srclang='" . $srclang . "'"; + } + + if($label){ + $label = " label='" . $label . "'"; + } + + if($default == "true" || $default == "default"){ + $default = " default"; + } + else{ + $default = ""; + } + + $track = " + + "; + + return $track; +} +add_shortcode('track', 'track_shortcode'); + +?> diff --git a/librevideojs/fonts/libre-material/libre-icons.eot b/librevideojs/fonts/libre-material/libre-icons.eot index 88861ad..1782417 100644 Binary files a/librevideojs/fonts/libre-material/libre-icons.eot and b/librevideojs/fonts/libre-material/libre-icons.eot differ diff --git a/librevideojs/fonts/libre-material/libre-icons.svg b/librevideojs/fonts/libre-material/libre-icons.svg index ebeb7ba..0e42b9f 100644 --- a/librevideojs/fonts/libre-material/libre-icons.svg +++ b/librevideojs/fonts/libre-material/libre-icons.svg @@ -2,9 +2,8 @@ -Created by FontForge 20161017 at Tue Nov 8 18:00:41 2016 - By heckyel - +Created by FontForge 20161003 at Fri Dec 9 18:02:20 2016 + By www-data @@ -13,87 +12,87 @@ Created by FontForge 20161017 at Tue Nov 8 18:00:41 2016 font-weight="400" font-stretch="normal" units-per-em="1024" - panose-1="2 0 5 3 0 0 0 0 0 0" + panose-1="0 0 0 0 0 0 0 0 0 0" ascent="960" descent="-64" - bbox="-1.42109e-14 -64.029 1472 960" + bbox="-11 -71 1472 971" underline-thickness="0" underline-position="0" - unicode-range="U+0020-E615" + unicode-range="U+0001-FFFD" /> - - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/librevideojs/fonts/libre-material/libre-icons.ttf b/librevideojs/fonts/libre-material/libre-icons.ttf index 66bf2a2..e68b6f7 100644 Binary files a/librevideojs/fonts/libre-material/libre-icons.ttf and b/librevideojs/fonts/libre-material/libre-icons.ttf differ diff --git a/librevideojs/fonts/libre-material/libre-icons.woff b/librevideojs/fonts/libre-material/libre-icons.woff index d611d4a..4212649 100644 Binary files a/librevideojs/fonts/libre-material/libre-icons.woff and b/librevideojs/fonts/libre-material/libre-icons.woff differ diff --git a/readme.txt b/readme.txt index cda0712..fc32cc4 100644 --- a/readme.txt +++ b/readme.txt @@ -47,11 +47,15 @@ Luego también es necesario especificar con el comando selector="resolución a m `[librevideojs_video url="http://example.com/wp-content/uploads/videos/myvid.webm" rsd="http://example.com/wp-content/uploads/videos/myvid.webm" sd="http://example.com/wp-content/uploads/videos/myvid.webm" code="webm" selector="360p"]` -**Subtitulos** +**Subtítulos o leyendas** -Para especificar los subtitulos puede usar los siguiente comandos: 'subtes' si es español, 'subten' si es inglés, 'subtpt' si es portugues, 'subtit' si es italiano, 'subfr' si es francés, 'subtgl' si es Gallego y 'subteo' si es Esperanto. Ejemplo: +Para especificar los subtítulos utilice el comando 'track' seguido de los parámetros: 'kind', 'subt', srclang','label', 'default' (opcional) desde HTML, aún no solucionado desde gráficos. -[librevideojs_video url="http://example.com/wp-content/uploads/videos/myvid.webm" subtes="http://example.com/web/wp-content/uploads/subtitles/es.vtt" subten="http://localhost/web/wp-content/uploads/subtitles/en.vtt" subtpt="http://localhost/web/wp-content/uploads/2016/11/68_es.vtt" subtit="http://example.com/web/wp-content/uploads/subtitles/it.vtt" subtpt="http://localhost/web/wp-content/subtitles/pt.vtt" code="webm"] +[librevideojs_video url="http://example.com/wp-content/uploads/videos/myvid.webm" rsd="http://example.com/wp-content/uploads/videos/myvid.webm" sd="http://example.com/wp-content/uploads/videos/myvid.webm" code="webm" selector="360p"] +[track kind="captions" subt="http://localhost/web/wp-content/uploads/subtitles/en.vtt" srclang="en" label="English"] +[track kind="captions" subt="http://localhost/web/wp-content/uploads/subtitles/es.vtt" srclang="es" label="Español" default="true"] +[track kind="captions" subt="http://localhost/web/wp-content/uploads/subtitles/pt.vtt" srclang="pt" label="Portuguese"] +[/librevideojs_video] **Pre-carga** -- cgit v1.2.3