diff --git a/plugin/Live/webRTC.js b/plugin/Live/webRTC.js
index 08b667dca..11b2af82a 100644
--- a/plugin/Live/webRTC.js
+++ b/plugin/Live/webRTC.js
@@ -1,54 +1,54 @@
window.addEventListener('message', event => {
if (event.data.startLiveRestream) {
startLiveRestream(event.data.m3u8);
}else
if (event.data.webRTCModalConfig) {
console.log('event.data.webRTCModalConfig', event.data.webRTCModalConfig, typeof webRTCModalConfigShow);
if(event.data.webRTCModalConfig==1){
if(typeof webRTCModalConfigShow =='function'){
webRTCModalConfigShow();
}
}else{
if(typeof webRTCModalConfigHide =='function'){
webRTCModalConfigHide();
}
}
}
});
function startLiveRestream(m3u8) {
//console.log('WebRTCLiveCam: startLive');
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + '/plugin/Live/webRTCToLive.json.php',
method: 'POST',
data: {
'm3u8': m3u8,
- 'live_servers_id': ''
+ 'live_servers_id': live_servers_id
},
success: function (response) {
if (response.error) {
webRTCDisconnect();
avideoAlertError(response.msg);
} else {
avideoToastSuccess(response.msg);
//document.querySelector("iframe").contentWindow.postMessage({setLiveStart: 1}, "*");
}
modal.hidePleaseWait();
}
});
}
function webRTCConnect() {
modal.showPleaseWait();
document.querySelector("iframe").contentWindow.postMessage({setLiveStart: 1}, "*");
}
function webRTCDisconnect() {
document.querySelector("iframe").contentWindow.postMessage({setLiveStop: 1}, "*");
}
function webRTCConfiguration() {
document.querySelector("iframe").contentWindow.postMessage({setConfiguration: 1}, "*");
}
\ No newline at end of file
diff --git a/plugin/Live/webRTC.php b/plugin/Live/webRTC.php
index 5af9be688..9d1b814e1 100644
--- a/plugin/Live/webRTC.php
+++ b/plugin/Live/webRTC.php
@@ -1,86 +1,87 @@
webRTC_player;
$iframeURL = addQueryStringParameter($iframeURL, 'webSiteRootURL', $global['webSiteRootURL']);
$iframeURL = addQueryStringParameter($iframeURL, 'userHash', Live::getUserHash(User::getId()));
?>