diff --git a/plugin/Live/webRTC.js b/plugin/Live/webRTC.js index 274c9e1f7..7951ac4a3 100644 --- a/plugin/Live/webRTC.js +++ b/plugin/Live/webRTC.js @@ -1,41 +1,42 @@ window.addEventListener('message', event => { if (event.data.startLiveRestream) { startLiveRestream(event.data.m3u8); } }); 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': '' }, 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