diff --git a/esports.html b/esports.html new file mode 100644 index 000000000..5185b7b34 --- /dev/null +++ b/esports.html @@ -0,0 +1,131 @@ + + + IFRAME Example + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/iframe.html b/iframe.html index 8c8ab8db1..a7f50b2f2 100644 --- a/iframe.html +++ b/iframe.html @@ -41,7 +41,7 @@ var iframe = document.createElement("iframe"); var iframeContainer = document.createElement("div"); var iframesrc = document.getElementById("viewlink").value; - iframe.allow = "autoplay;camera;microphone;fullscreen;picture-in-picture;"; + iframe.allow = "autoplay;camera;microphone;fullscreen;picture-in-picture;display-capture;"; if (iframesrc==""){ iframesrc="./"; @@ -192,6 +192,11 @@ button.onclick = function(){iframe.contentWindow.postMessage({"getLoudness":false}, '*');}; iframeContainer.appendChild(button); + var button = document.createElement("button"); + button.innerHTML = "Get detailed state (if Director)"; + button.onclick = function(){iframe.contentWindow.postMessage({"getDetailedState":true}, '*');}; + iframeContainer.appendChild(button); + var button = document.createElement("button"); button.innerHTML = "Start Recording"; button.onclick = function(){iframe.contentWindow.postMessage({"record":true}, '*');}; @@ -352,7 +357,13 @@ outputWindow.innerHTML += key + " Loudness: " + e.data.loudness[key] + "\n"; } outputWindow.style.border="1px black"; - + } + + if ("detailedState" in e.data){ + var outputWindow = document.createElement("div"); + outputWindow.innerHTML = "child-page-action: detailedState
"+JSON.stringify(e.data.detailedState)+"
"; + outputWindow.style.border="1px dotted black"; + iframeContainer.appendChild(outputWindow); } if ("sensors" in e.data){ diff --git a/index.html b/index.html index 93beddce0..f7594be70 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@ transition: opacity .1s linear; } - + @@ -67,7 +67,7 @@ - +