diff --git a/index.html b/index.html index 655c3eb..0873541 100644 --- a/index.html +++ b/index.html @@ -1928,7 +1928,7 @@ var session = WebRTC.Media; // session is a required global variable if configuring manually. Run before loading main.js but after webrtc.js. - session.version = "21.0"; + session.version = "21.1"; session.streamID = session.generateStreamID(); // randomly generates a streamID for this session. You can set your own programmatically if needed session.defaultPassword = "someEncryptionKey123"; // Change this password if self-deploying for added security/privacy diff --git a/lib.js b/lib.js index b3f2e04..d7685b7 100644 --- a/lib.js +++ b/lib.js @@ -10749,7 +10749,7 @@ async function createDirectorOnlyBox() { if (session.label){ labelID.innerText = session.label; } - pokeIframeAPI("control-box", true, UUID); + pokeIframeAPI("control-box", true, true); } function shiftPC(ele, shift, director=false){ diff --git a/main.js b/main.js index f4a9839..c44f15c 100644 --- a/main.js +++ b/main.js @@ -146,19 +146,6 @@ async function main(){ // main asyncronous thread; mostly initializes the user s } } - if (urlParams.has('pwa')){ - getById("enterInvite").classList.remove("advanced"); - } - if ("serviceWorker" in navigator) { - window.addEventListener("load", function() { - navigator.serviceWorker - .register("./serviceWorker.js") - .then(res => log("service worker registered")) - .catch(err => warnlog("service worker not registered")) - }) - } - - if (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) { try { getById("electronDragZone").style.cursor="grab"; @@ -4142,7 +4129,7 @@ setTimeout(function(){ // lazy load script.onload = function() { var script = document.createElement('script'); document.head.appendChild(script); - script.src = "./thirdparty/StreamSaver.js?v=4"; // dynamically load this only if its needed. Keeps loading time down. + script.src = "./thirdparty/StreamSaver.js?v=9"; // dynamically load this only if its needed. Keeps loading time down. }; script.src = "./thirdparty/polyfill.min.js"; // dynamically load this only if its needed. Keeps loading time down. },0); \ No newline at end of file diff --git a/serviceWorker.js b/serviceWorker.js index aafeee1..0519ecb 100644 --- a/serviceWorker.js +++ b/serviceWorker.js @@ -1,7 +1 @@ -self.addEventListener("fetch", fetchEvent => { - fetchEvent.respondWith( - caches.match(fetchEvent.request).then(res => { - return res || fetch(fetchEvent.request) - }) - ) -}) \ No newline at end of file + \ No newline at end of file diff --git a/thirdparty/StreamSaver.js b/thirdparty/StreamSaver.js index df69228..8e08fc0 100644 --- a/thirdparty/StreamSaver.js +++ b/thirdparty/StreamSaver.js @@ -30,7 +30,7 @@ WritableStream: global.WritableStream || ponyfill.WritableStream, supported: true, version: { full: '2.0.7', major: 2, minor: 0, dot: 7 }, - mitm: 'https://steveseguin.github.io/StreamSaver.js/mitm.html?version=2.0.7' + mitm: './thirdparty/mitm.html' } /** @@ -46,12 +46,14 @@ iframe.src = src iframe.loaded = false iframe.name = 'iframe' + iframe.id = "mitm_iframe" iframe.isIframe = true iframe.postMessage = (...args) => iframe.contentWindow.postMessage(...args) iframe.addEventListener('load', () => { iframe.loaded = true }, { once: true }) document.body.appendChild(iframe) + console.log(iframe); return iframe } diff --git a/thirdparty/mitm.html b/thirdparty/mitm.html index da714d7..85c6fdb 100644 --- a/thirdparty/mitm.html +++ b/thirdparty/mitm.html @@ -14,7 +14,10 @@ when the worker then receives a stream then the worker will tell the opener to open up a link that will start the download --> + + + + \ No newline at end of file