Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed May 29, 2024
1 parent b1b610f commit af1bf45
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 26 deletions.
2 changes: 1 addition & 1 deletion plugin/CustomizeUser/getMyAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<?php echo $details['label']; ?>
</label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<div class="input-group largeSocialIcon">
<span class="input-group-addon"><i class="<?php echo $details['icon']; ?>"></i></span>
<input id="user<?php echo ucfirst($platform); ?>" platform="<?php echo $platform; ?>"
placeholder="<?php echo $details['placeholder']; ?>"
Expand Down
2 changes: 1 addition & 1 deletion plugin/Live/Objects/Live_restreams.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static function getAllFromUser($users_id, $status = 'a') {
$row['token_expired'] = self::checkIfTokenIsExpired($row['parameters']);
$row['provider'] = self::getProviderName($row['parameters']);
if ($row['token_expired']->needToRevalidate) {
$row['revalidateButton'] = '<button class="btn btn-primary btn-xs" onclick="openRestream(\''.$row['provider'].'\');"><i class="fas fa-sync"></i> '.__("Revalidate").'</button>';
$row['revalidateButton'] = '<button class="btn btn-primary btn-xs mediumSocialIcon" onclick="openRestream(\''.$row['provider'].'\');"><i class="fas fa-sync"></i> '.__("Revalidate").'</button>';
} else {
$row['revalidateButton'] = '<i class="fas fa-check text-success"></i>';
}
Expand Down
40 changes: 23 additions & 17 deletions plugin/Live/view/Live_restreams/getLiveKey.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
<?php
$restreamerURL = 'http://localhost/Restreamer/';
$restreamerURL = 'http://127.0.0.1/Restreamer/';
if(empty($global['local_test_server'])){
if (empty($global['local_test_server'])) {
$restreamerURL = 'https://restream.ypt.me/';
}

if (!Live::canRestream()) {
return false;
}
?>
<button type="button" class="btn btn-default" onclick="openRestream('facebook')">
<i class="fab fa-facebook-f"></i>
Facebook
</button>
<button type="button" class="btn btn-default" onclick="openRestream('youtube')">
<i class="fab fa-youtube"></i>
YouTube
</button>
<button type="button" class="btn btn-default" onclick="openRestream('twitch')">
<i class="fab fa-twitch"></i>
Twitch
</button>
<div class="social-network">
<button type="button" class="btn btn-default icoFacebook" onclick="openRestream('facebook')">
<i class="fab fa-facebook-f mediumSocialIcon"></i><br>
Facebook
</button>
<button type="button" class="btn btn-default icoYoutube " onclick="openRestream('youtube')">
<i class="fab fa-youtube mediumSocialIcon"></i><br>
YouTube
</button>
<button type="button" class="btn btn-default icoTwitch" onclick="openRestream('twitch')">
<i class="fab fa-twitch mediumSocialIcon"></i><br>
Twitch
</button>
</div>
<!--
<button type="button" class="btn btn-default" onclick="openRestream('')">
<i class="fas fa-cog"></i>
Expand All @@ -34,24 +36,28 @@
var eventer = window[eventMethod];
var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
// Listen for a message from the iframe.
eventer(messageEvent, function (e) {
eventer(messageEvent, function(e) {
console.log('EventListener restreamer', e.data);
if (e.data.stream_key && e.data.name) {
saveRestreamer(e.data.stream_key, e.data.stream_url, e.data.name, e.data.parameters);
}
}, false);

var restreamWin;

function openRestream(provider) {
restreamPopupOpened = 1;
modal.showPleaseWait();
$('#newLive_restreamsLink').trigger("click");
var url = "<?php echo $restreamerURL; ?>" + provider;
var url = "<?php echo $restreamerURL; ?>confirm/" + provider;
var name = "theRestreamerPopUp";
var params = {title: $('#title').val(), description: $('#description').val()};
var params = {
title: $('#title').val(),
description: $('#description').val()
};
var strWindowFeatures = "directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,height=600,width=800";
restreamWin = openWindowWithPost(url, name, params, strWindowFeatures);
var pollTimer = window.setInterval(function () {
var pollTimer = window.setInterval(function() {
if (restreamWin.closed !== false) { // !== is required for compatibility with Opera
window.clearInterval(pollTimer);
modal.hidePleaseWait();
Expand Down
2 changes: 1 addition & 1 deletion plugin/Live/view/Live_restreams/livePanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
include $global['systemRootPath'] . 'plugin/Live/view/Live_restreams/livePanelForm.php';
?>
</div>
<div class="panel-footer">
<div class="panel-footer clearfix">
<?php
include $global['systemRootPath'] . 'plugin/Live/view/Live_restreams/getLiveKey.php';
?>
Expand Down
4 changes: 2 additions & 2 deletions plugin/SocialMediaPublisher/SocialMediaPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ class SocialMediaPublisher extends PluginAbstract
self::SOCIAL_TYPE_LINKEDIN['name'] => self::SOCIAL_TYPE_LINKEDIN,
);

//const RESTREAMER_URL = 'https://restream.ypt.me/';
const RESTREAMER_URL = 'https://restream.ypt.me/';
//const RESTREAMER_URL = 'http://localhost:81/Restreamer/';
const RESTREAMER_URL = 'https://vlu.me:444/Restreamer/';
//const RESTREAMER_URL = 'https://vlu.me:444/Restreamer/';

public function getTags()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"data": "name",
render: function(data, type, row) {
// You can return different data based on the content
return '<div class="' + row.details.iconClass + '">' + row.details.ico + ' ' + row.details.label + '</div>'; // Example dynamic content
return '<div class="' + row.details.iconClass + ' largeSocialIcon">' + row.details.ico + ' ' + row.details.label + '</div>'; // Example dynamic content
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{
data: 'name',
render: function(data, type, row) {
return row.provider.ico;
return '<div class="largeSocialIcon">'+row.provider.ico+'</div>';
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion plugin/SocialMediaPublisher/linkSocialMediasButtons.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<?php
foreach (SocialMediaPublisher::SOCIAL_TYPES as $value) {
?>
<button type="button" class="btn btn-default <?php echo $value['iconClass']; ?>" onclick="openYPT('<?php echo $value['name']; ?>')">
<button type="button" class="btn btn-default <?php echo $value['iconClass']; ?> largeSocialIcon" onclick="openYPT('<?php echo $value['name']; ?>')">
<?php echo $value['ico']; ?>
<?php echo $value['label']; ?>
</button>
Expand Down
2 changes: 1 addition & 1 deletion plugin/SocialMediaPublisher/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var yptWin;
function openYPT(provider) {
yptPopupOpened = 1;
modal.showPleaseWait();
var url = yptURL + provider;
var url = yptURL + 'confirm/'+provider;
var name = "theYPTPopUp";
var params = {
title: $('#title').val(),
Expand Down
12 changes: 12 additions & 0 deletions view/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2061,4 +2061,16 @@ body.ypt-is-compressed #videoCol {

.displayJsonAsHtml .panel .panel-body{
padding: 3px 6px;
}

.largeSocialIcon{
font-size: 2em;
}

.input-group.largeSocialIcon i{
font-size: 1.5em;
}

.mediumSocialIcon{
font-size: 1.5em;
}

0 comments on commit af1bf45

Please sign in to comment.