aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-05-28 16:54:24 -0500
committerJesús <heckyel@hyperbola.info>2019-05-28 16:54:24 -0500
commite6395a42ecfb3569777e20c150954b8803d797c2 (patch)
tree07c3bbd6104b490c3d98c8bb78e402a2e65959db
parent11d035d1d630ffb753267140641eb8fa3448f882 (diff)
downloadytlibre-e6395a42ecfb3569777e20c150954b8803d797c2.tar.lz
ytlibre-e6395a42ecfb3569777e20c150954b8803d797c2.tar.xz
ytlibre-e6395a42ecfb3569777e20c150954b8803d797c2.zip
Added play with mpv
-rw-r--r--index.php14
-rw-r--r--templates/css/salida.min.css2
-rw-r--r--templates/sass/salida.sass6
-rw-r--r--templates/video.tpl7
4 files changed, 15 insertions, 14 deletions
diff --git a/index.php b/index.php
index 0181cb8..b847e75 100644
--- a/index.php
+++ b/index.php
@@ -72,18 +72,12 @@ if (empty($_GET['link'])){
$subject = $pro."://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
- $pattern = array();
- $pattern[0] = '/index.php/';
- $substitution = array();
- $substitution[0] = 'embed?link=';
+ // Local URL
+ $local_url = preg_replace('/index.php/', '', $subject);
- $embed_url = preg_replace($pattern, $substitution, $subject);
+ // Assign variables
+ $video_decode->assign("local_url", $local_url);
- $decode_url_embed = "<iframe width='560' height='315' src='".$embed_url.$baselink."' frameborder='0' scrolling='no'></iframe>";
-
- $current_url = htmlentities($decode_url_embed);
-
- $video_decode->assign("current_url", $current_url);
/* ---- ---- END ---- --- */
$video_decode->display('templates/video.tpl');
diff --git a/templates/css/salida.min.css b/templates/css/salida.min.css
index ef64064..7f07c46 100644
--- a/templates/css/salida.min.css
+++ b/templates/css/salida.min.css
@@ -1 +1 @@
-body{background:#2d3743;color:#fff}a.enlace{color:#1aafff;text-decoration:none}a.enlace:hover{color:#2dde98}.contenedor{margin:auto;width:100%;max-width:800px;display:flex;flex-direction:column;flex-wrap:wrap;align-items:center}.contenedor .libreyt{padding-bottom:20px}.contenedor .libreyt .row{display:flex;width:80%;max-width:400px;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center}.contenedor .libreyt .row .imageyt{flex:1 0 30%;max-width:40%;padding:0px 15px}.contenedor .libreyt .row .imageyt img{width:100%;vertical-align:middle}.contenedor .libreyt .row .features{flex:0;min-height:1px;max-height:100%;position:relative;padding:0px 15px}.contenedor .libreyt .row .features .yt-titulo{font-weight:700;font-size:1rem;line-height:24px}.contenedor .row{line-height:2.5}.contenedor .row .col{text-align:center;padding:0px 15px}.contenedor .row .col .boton-descarga{padding:2px 5px;font-size:12px;border-radius:3px;color:#fff;background-color:#5cb85c;border-color:#5cb85c;text-decoration:none}.librevideojs{width:90%;max-width:700px}header{display:flex;width:90%;padding:20px 0px;justify-content:center}header a.drm-free{align-items:center;height:auto;opacity:.5;transition:opacity 150ms}header a.drm-free:before{content:url("../images/drm-free.png");vertical-align:top;display:block;position:absolute;top:12px;left:12px;max-width:120px;width:100%}header a.drm-free:hover{opacity:1}h2,h3,h4,h5,h6{margin-top:0;margin-bottom:0;line-height:1.1}hr{width:100%}section{width:100%}h2{text-align:center}footer p.copyleft{font-size:12px;text-align:center}@media screen and (max-width: 768px){header a.drm-free:before{display:none}}
+body{background:#2d3743;color:#fff}a.enlace{color:#1aafff;text-decoration:none}a.enlace:hover{color:#2dde98}.contenedor{margin:auto;width:100%;max-width:800px;display:flex;flex-direction:column;flex-wrap:wrap;align-items:center}.contenedor .libreyt{padding-bottom:20px}.contenedor .libreyt .row{display:flex;width:80%;max-width:400px;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center}.contenedor .libreyt .row .imageyt{flex:1 0 30%;max-width:40%;padding:0px 15px}.contenedor .libreyt .row .imageyt img{width:100%;vertical-align:middle}.contenedor .libreyt .row .features{flex:0;min-height:1px;max-height:100%;position:relative;padding:0px 15px}.contenedor .libreyt .row .features .yt-titulo{font-weight:700;font-size:1rem;line-height:24px}.contenedor .row{line-height:2.5}.contenedor .row .col{text-align:center;padding:0px 15px}.contenedor .row .col .boton-descarga{padding:2px 5px;font-size:12px;border-radius:3px;color:#fff;background-color:#5cb85c;border-color:#5cb85c;text-decoration:none}.librevideojs{width:90%;max-width:700px}.mpv{margin-bottom:.5rem;margin-top:0}header{display:flex;width:90%;padding:20px 0px;justify-content:center}header a.drm-free{align-items:center;height:auto;opacity:.5;transition:opacity 150ms}header a.drm-free:before{content:url("../images/drm-free.png");vertical-align:top;display:block;position:absolute;top:12px;left:12px;max-width:120px;width:100%}header a.drm-free:hover{opacity:1}h2,h3,h5,h6{margin-top:0;margin-bottom:0;line-height:1.1}hr{width:100%}section{width:100%}h2{text-align:center}footer p.copyleft{font-size:12px;text-align:center}@media screen and (max-width: 768px){header a.drm-free:before{display:none}}
diff --git a/templates/sass/salida.sass b/templates/sass/salida.sass
index c561ef1..003f16f 100644
--- a/templates/sass/salida.sass
+++ b/templates/sass/salida.sass
@@ -80,6 +80,10 @@ a.enlace
width: 90%
max-width: 700px
+.mpv
+ margin-bottom: .5rem
+ margin-top: 0
+
header
display: flex
width: 90%
@@ -105,7 +109,7 @@ header
&:hover
opacity: 1
-h2,h3,h4,h5,h6
+h2,h3,h5,h6
margin-top: 0
margin-bottom: 0
line-height: 1.1
diff --git a/templates/video.tpl b/templates/video.tpl
index ccdbf5a..8ad4b31 100644
--- a/templates/video.tpl
+++ b/templates/video.tpl
@@ -141,8 +141,11 @@
<!--EndPlyr-->
</div>
</section>
- <code>{$baselink}</code>
- <code>{$current_url}</code>
+ <h4 class="mpv">Playing with MPV</h4>
+ <code>mpv '{$local_url}?link={$baselink}'</code>
+ <code>
+ &lt;iframe width='560' height='315' src='{$local_url}embed?link={$baselink}' frameborder='0' scrolling='no'&gt;&lt;/iframe&gt;
+ </code>
<footer>
<p class="copyleft">Esta web es Software Libre y esta disponible en <a class="enlace"
rel="noopener noreferrer"