From 05fa28ed9563421b75f3f41af828288b28bf2a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Tue, 28 May 2019 19:23:05 -0500 Subject: revert play with mpv mpv require youtube-dl or hypervideo for play video. --- index.php | 18 +----------------- templates/video.tpl | 3 +-- tools/processor.php | 12 ++++++++++++ 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/index.php b/index.php index b847e75..95f5817 100644 --- a/index.php +++ b/index.php @@ -50,6 +50,7 @@ if (empty($_GET['link'])){ $video_decode->assign("formatdrm", $formatdrm); // Base link + $video_decode->assign("local_url", $local_url); $video_decode->assign("baselink", $baselink); /* ---- ---- CSS ---- ---- */ @@ -63,22 +64,5 @@ if (empty($_GET['link'])){ $video_decode->assign('javascript', array('plyr' => 'templates/libs/plyr/plyr.min.js') ); - /* ---- ---- Embed ---- ---- */ - if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") { - $pro = 'https'; - } else { - $pro = 'http'; - } - - $subject = $pro."://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; - - // Local URL - $local_url = preg_replace('/index.php/', '', $subject); - - // Assign variables - $video_decode->assign("local_url", $local_url); - - /* ---- ---- END ---- --- */ - $video_decode->display('templates/video.tpl'); } diff --git a/templates/video.tpl b/templates/video.tpl index 8ce2578..fdae3d2 100644 --- a/templates/video.tpl +++ b/templates/video.tpl @@ -141,8 +141,7 @@ -

Play with MPV

- mpv '{$local_url}?link={$baselink}' + {$baselink} <iframe width='560' height='315' src='{$local_url}embed?link={$baselink}' frameborder='0' scrolling='no'></iframe> diff --git a/tools/processor.php b/tools/processor.php index 79470ee..5eb03e1 100644 --- a/tools/processor.php +++ b/tools/processor.php @@ -117,3 +117,15 @@ if ( $url_standar === FALSE ) { $formatdrm = NULL; } ///// End Beaking DRM!!! + +/* ---- ---- Generated baselink and embed ---- ---- */ +if ( isset( $_SERVER["HTTPS"] ) && $_SERVER["HTTPS"] == "on" ) { + $pro = 'https'; +} else { + $pro = 'http'; +} + +$subject = $pro."://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; + +// Local URL +$local_url = preg_replace( '/index.php/', '', $subject ); -- cgit v1.2.3