mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +02:00
Refactor some plugins code.
This commit is contained in:
parent
ab8fd13a56
commit
43c00721ca
223 changed files with 12595 additions and 11447 deletions
|
@ -1,24 +1,24 @@
|
|||
<?php
|
||||
// this script will be executed on the AVideo side
|
||||
$meetPlugin = AVideoPlugin::getDataObjectIfEnabled("Meet");
|
||||
if (empty($meetPlugin)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$rtmpLink = "";
|
||||
$livePlugin = AVideoPlugin::getDataObjectIfEnabled("Live");
|
||||
if (!empty($livePlugin) && User::canStream()) {
|
||||
$trasnmition = LiveTransmition::createTransmitionIfNeed(User::getId());
|
||||
$dropURL = "{$global['webSiteRootURL']}plugin/Live/droplive.json.php?live_transmition_id={$trasnmition['id']}&live_servers_id=" . Live::getCurrentLiveServersId();
|
||||
$rtmpLink = Live::getRTMPLink(User::getId());
|
||||
}
|
||||
|
||||
if (empty($meet_schedule_id)) {
|
||||
$meet_schedule_id = 0;
|
||||
} else {
|
||||
$meet_schedule_id = intval($meet_schedule_id);
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
// this script will be executed on the AVideo side
|
||||
$meetPlugin = AVideoPlugin::getDataObjectIfEnabled("Meet");
|
||||
if (empty($meetPlugin)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$rtmpLink = "";
|
||||
$livePlugin = AVideoPlugin::getDataObjectIfEnabled("Live");
|
||||
if (!empty($livePlugin) && User::canStream()) {
|
||||
$trasnmition = LiveTransmition::createTransmitionIfNeed(User::getId());
|
||||
$dropURL = "{$global['webSiteRootURL']}plugin/Live/droplive.json.php?live_transmition_id={$trasnmition['id']}&live_servers_id=" . Live::getCurrentLiveServersId();
|
||||
$rtmpLink = Live::getRTMPLink(User::getId());
|
||||
}
|
||||
|
||||
if (empty($meet_schedule_id)) {
|
||||
$meet_schedule_id = 0;
|
||||
} else {
|
||||
$meet_schedule_id = intval($meet_schedule_id);
|
||||
}
|
||||
?>
|
||||
<script src="<?php echo getCDN(); ?>plugin/Meet/external_api.js" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>node_modules/sweetalert/dist/sweetalert.min.js" type="text/javascript"></script>
|
||||
<script>
|
||||
|
@ -60,13 +60,13 @@ if (empty($meet_schedule_id)) {
|
|||
event_on_meetReady();
|
||||
}
|
||||
aVideoMeetCreateButtons();
|
||||
<?php
|
||||
$css = file_get_contents($global['systemRootPath'] . 'plugin/Meet/meet.mobile.css');
|
||||
if(!isMobile()){
|
||||
$css = "@media (max-width: 767px) {{$css}}";
|
||||
}
|
||||
$css .= file_get_contents($global['systemRootPath'] . 'plugin/Meet/meet.css');
|
||||
?>
|
||||
<?php
|
||||
$css = file_get_contents($global['systemRootPath'] . 'plugin/Meet/meet.mobile.css');
|
||||
if (!isMobile()) {
|
||||
$css = "@media (max-width: 767px) {{$css}}";
|
||||
}
|
||||
$css .= file_get_contents($global['systemRootPath'] . 'plugin/Meet/meet.css');
|
||||
?>
|
||||
aVideoMeetAppendElement("head", <?php echo json_encode("<style>{$css}</style>"); ?>);
|
||||
console.log("YPTMeetScript conference is ready");
|
||||
} else if (typeof e.data.aVideoMeetStartRecording !== 'undefined') {
|
||||
|
@ -230,13 +230,13 @@ if (empty($meet_schedule_id)) {
|
|||
}
|
||||
|
||||
function aVideoMeetCreateButtons() {
|
||||
<?php
|
||||
if (!empty($rtmpLink) && Meet::isModerator($meet_schedule_id)) {
|
||||
?>
|
||||
<?php
|
||||
if (!empty($rtmpLink) && Meet::isModerator($meet_schedule_id)) {
|
||||
?>
|
||||
aVideoMeetAppendElement(".button-group-center", <?php echo json_encode(Meet::createJitsiRecordStartStopButton($rtmpLink, $dropURL)); ?>);
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
}
|
||||
|
||||
function readyToClose() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue