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:
parent
6605ff3c42
commit
f214070063
3 changed files with 54 additions and 1 deletions
|
@ -39,6 +39,7 @@ class YouPHPFlix2 extends PluginAbstract {
|
|||
$obj->BigVideo = true;
|
||||
$obj->backgroundRGB = "20,20,20";
|
||||
$obj->landscapePosters = true;
|
||||
$obj->playVideoOnFullscreen = true;
|
||||
return $obj;
|
||||
}
|
||||
|
||||
|
@ -62,10 +63,26 @@ class YouPHPFlix2 extends PluginAbstract {
|
|||
$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\"/>";
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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() {
|
||||
return array('free', 'firstPage', 'netflix');
|
||||
}
|
||||
|
|
21
plugin/YouPHPFlix2/view/css/fullscreen.css
Normal file
21
plugin/YouPHPFlix2/view/css/fullscreen.css
Normal 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;
|
||||
}
|
15
plugin/YouPHPFlix2/view/js/fullscreen.js
Normal file
15
plugin/YouPHPFlix2/view/js/fullscreen.js
Normal 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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue