1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00
This commit is contained in:
DanielnetoDotCom 2020-09-07 12:20:37 -03:00
parent ea8ca59c83
commit 993d6ed062
2 changed files with 25 additions and 9 deletions

View file

@ -51,6 +51,12 @@ if (!empty($livePlugin) && User::canStream()) {
event_on_meetReady();
}
console.log("YPTMeetScript conference is ready");
} else if (typeof e.data.aVideoMeetStartRecording !== 'undefined') {
console.log("YPTMeetScript aVideoMeetStartRecording");
aVideoMeetStartRecording(e.data.aVideoMeetStartRecording.RTMPLink, e.data.aVideoMeetStartRecording.dropURL);
} else if (typeof e.data.aVideoMeetStopRecording !== 'undefined') {
console.log("YPTMeetScript aVideoMeetStopRecording");
aVideoMeetStopRecording(e.data.aVideoMeetStopRecording.dropURL);
}
});
@ -144,7 +150,7 @@ if (!empty($livePlugin) && User::canStream()) {
document.querySelector("iframe").contentWindow.postMessage({prepend: prepend}, "*");
}
function aVideoMeetCreateButtons() {
function aVideoMeetCreateButtons() {#new-toolbox > div.toolbox-content > div.button-group-right > div > div > div.sc-kgoBCf.iroQPA > div > div > ul > li:nth-child(3)
<?php
if (!empty($rtmpLink)) {
?>

View file

@ -15,10 +15,10 @@ function setLivestreamURL() {
function isJitsiLive() {
jitsiIsLive = $(".circular-label.stream").is(":visible");
window.parent.postMessage({"isLive": jitsiIsLive}, "*");
if(jitsiIsLive){
if (jitsiIsLive) {
$(".showOnLive").show();
$(".hideOnLive").hide();
}else{
} else {
$(".showOnLive").hide();
$(".hideOnLive").show();
}
@ -26,10 +26,12 @@ function isJitsiLive() {
function isConferenceReady() {
conferenceIsReady = $("#videoconference_page").is(":visible");
if(conferenceIsReady){
if (conferenceIsReady) {
window.parent.postMessage({"conferenceIsReady": true}, "*");
}else{
setTimeout(function(){isConferenceReady();},1000);
} else {
setTimeout(function () {
isConferenceReady();
}, 1000);
}
}
@ -55,9 +57,9 @@ function startYPTScripts() {
eventer(messageEvent, function (e) {
if (typeof e.data.hideElement !== 'undefined') {
$(e.data.hideElement).hide();
}else if (typeof e.data.append !== 'undefined') {
} else if (typeof e.data.append !== 'undefined') {
$(e.data.append.parentSelector).append(e.data.append.html);
}else if (typeof e.data.prepend !== 'undefined') {
} else if (typeof e.data.prepend !== 'undefined') {
$(e.data.prepend.parentSelector).prepend(e.data.prepend.html);
}
});
@ -71,4 +73,12 @@ function startYPTScripts() {
}
}
function aVideoMeetStartRecording(RTMPLink, dropURL) {
window.parent.postMessage({"aVideoMeetStartRecording": {RTMPLink:RTMPLink, dropURL:dropURL}}, "*");
}
function aVideoMeetStopRecording(dropURL) {
window.parent.postMessage({"aVideoMeetStopRecording": {dropURL:dropURL}}, "*");
}
startYPTScripts();