1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 12:00:06 +02:00

can play in full screen by default

This commit is contained in:
daniel 2018-10-29 22:30:22 -03:00
parent 6605ff3c42
commit f214070063
3 changed files with 54 additions and 1 deletions

View file

@ -39,6 +39,7 @@ class YouPHPFlix2 extends PluginAbstract {
$obj->BigVideo = true; $obj->BigVideo = true;
$obj->backgroundRGB = "20,20,20"; $obj->backgroundRGB = "20,20,20";
$obj->landscapePosters = true; $obj->landscapePosters = true;
$obj->playVideoOnFullscreen = true;
return $obj; return $obj;
} }
@ -62,10 +63,26 @@ class YouPHPFlix2 extends PluginAbstract {
$css = ""; $css = "";
//$css .= "<link href=\"{$global['webSiteRootURL']}view/css/custom/".$obj->theme.".css\" rel=\"stylesheet\" type=\"text/css\"/>"; //$css .= "<link href=\"{$global['webSiteRootURL']}view/css/custom/".$obj->theme.".css\" rel=\"stylesheet\" type=\"text/css\"/>";
$css .= "<link href=\"{$global['webSiteRootURL']}plugin/YouPHPFlix2/view/css/style.css\" rel=\"stylesheet\" type=\"text/css\"/>"; $css .= "<link href=\"{$global['webSiteRootURL']}plugin/YouPHPFlix2/view/css/style.css\" rel=\"stylesheet\" type=\"text/css\"/>";
if(!empty($obj->playVideoOnFullscreen) && !empty($_GET['videoName'])){
$css .= '<link href="' . $global['webSiteRootURL'] . 'plugin/YouPHPFlix2/view/css/fullscreen.css" rel="stylesheet" type="text/css"/>';
}
if(!empty($obj->playVideoOnFullscreen)){
$css .= '<style>body.fullScreen{overflow: hidden;}</style>';
}
return $css; return $css;
} }
public function getFooterCode() {
$obj = $this->getDataObject();
global $global;
$js = '';
if(!empty($obj->playVideoOnFullscreen)){
$js = '<script src="' . $global['webSiteRootURL'] . 'plugin/YouPHPFlix2/view/js/fullscreen.js"></script>';
}
return $js;
}
public function getTags() { public function getTags() {
return array('free', 'firstPage', 'netflix'); return array('free', 'firstPage', 'netflix');
} }

View file

@ -0,0 +1,21 @@
body{
margin: 0;
padding: 0;
overflow: hidden;
}
#videoContainer{
position: absolute;
top: 0;
left: 0;
height: 100vh;
width: 100vw;
z-index: 99999;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
padding-bottom: 120px;
}
.firstC{
position: absolute;
}

View file

@ -0,0 +1,15 @@
$(document).ready(function () {
$('a.playBtn').click(function (event) {
event.preventDefault();
var link = $(this).attr('href');
flixFullScreen(link);
});
$(document).on('keyup', function (evt) {
if (evt.keyCode == 27) {
closeFlixFullScreen();
}
});
});