1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Oinktube/plugin/NextButton/NextButton.php
Daniel Neto 2d7f9dfa44 update
2023-08-16 21:22:09 -03:00

54 lines
1.5 KiB
PHP

<?php
global $global;
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
class NextButton extends PluginAbstract {
public function getTags() {
return array(
PluginTags::$FREE,
PluginTags::$PLAYER,
);
}
public function getDescription() {
return "Add next button to the control bar";
}
public function getName() {
return "NextButton";
}
public function getUUID() {
return "5310b394-b54f-48ab-9049-995df4d95239";
}
public function getPluginVersion() {
return "1.0";
}
public function getHeadCode() {
global $global, $autoPlayVideo, $nonCriticalCSS;
if (!empty($autoPlayVideo['url'])) {
$css = '<link href="' .getURL('plugin/NextButton/style.css') . '" rel="stylesheet" type="text/css" />';
$css .= '<style></style>';
return $css;
}
}
public function getFooterCode() {
global $global, $autoPlayVideo;
if (!empty($autoPlayVideo['url'])) {
$tmp = "mainVideo";
if(isset($_SESSION['type']) && (($_SESSION['type']=="audio")||($_SESSION['type']=="linkAudio"))){
$tmp = "mainVideo";
}
$js = '<script>var autoPlayVideoURL="'.$autoPlayVideo['url'].'"; var videoJsId = "'.$tmp.'";</script>';
$js .= '<script src="' .getURL('plugin/NextButton/script.js') . '" type="text/javascript"></script>';
return $js;
}
}
}