mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +02:00
update
This commit is contained in:
parent
4ac03ccbda
commit
9dcf0278d3
5 changed files with 35 additions and 17 deletions
|
@ -3826,28 +3826,32 @@ function addScript(src) {
|
|||
}
|
||||
|
||||
function avideoLogoff(redirect) {
|
||||
sendAVideoMobileLiveStreamerMessage('logoff', '');
|
||||
sendAVideoMobileMessage('logoff', '');
|
||||
if (redirect) {
|
||||
document.location = webSiteRootURL + 'logoff';
|
||||
}
|
||||
}
|
||||
|
||||
async function sendAVideoMobileLiveStreamerMessage(type, value) {
|
||||
async function sendAVideoMobileMessage(type, value){
|
||||
return sendAVideoMobileMessage(type, value);
|
||||
}
|
||||
|
||||
async function sendAVideoMobileMessage(type, value) {
|
||||
if (typeof window.flutter_inappwebview !== 'undefined') {
|
||||
if (typeof window.flutter_inappwebview.callHandler == 'function') {
|
||||
for (i = 0; i < 10; i++) {
|
||||
response = await window.flutter_inappwebview.callHandler('AVideoMobileLiveStreamer' + i, {type: type, value: value, instanceIndex: i});
|
||||
if (response !== null) {
|
||||
console.log('sendAVideoMobileLiveStreamerMessage executed', i, response, type, value);
|
||||
console.log('sendAVideoMobileMessage executed', i, response, type, value);
|
||||
break;
|
||||
} else {
|
||||
console.log('sendAVideoMobileLiveStreamerMessage not found', i, type, value);
|
||||
console.log('sendAVideoMobileMessage not found', i, type, value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log('sendAVideoMobileLiveStreamerMessage will try again', type, value);
|
||||
console.log('sendAVideoMobileMessage will try again', type, value);
|
||||
setTimeout(function () {
|
||||
sendAVideoMobileLiveStreamerMessage(type, value);
|
||||
sendAVideoMobileMessage(type, value);
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
|
@ -3856,7 +3860,7 @@ async function sendAVideoMobileLiveStreamerMessage(type, value) {
|
|||
}
|
||||
}
|
||||
window.addEventListener("flutterInAppWebViewPlatformReady", function (event) {
|
||||
sendAVideoMobileLiveStreamerMessage('APPIsReady', 1);
|
||||
sendAVideoMobileMessage('APPIsReady', 1);
|
||||
});
|
||||
|
||||
function getUser() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue