From e6395a42ecfb3569777e20c150954b8803d797c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Tue, 28 May 2019 16:54:24 -0500 Subject: Added play with mpv --- index.php | 14 ++++---------- templates/css/salida.min.css | 2 +- templates/sass/salida.sass | 6 +++++- templates/video.tpl | 7 +++++-- 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 = ""; - - $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 @@ - {$baselink} - {$current_url} +

Playing with MPV

+ mpv '{$local_url}?link={$baselink}' + + <iframe width='560' height='315' src='{$local_url}embed?link={$baselink}' frameborder='0' scrolling='no'></iframe> +