diff --git a/iframe.html b/iframe.html index a7f50b2..e959f2a 100644 --- a/iframe.html +++ b/iframe.html @@ -134,19 +134,24 @@ button.onclick = function(){iframe.contentWindow.postMessage({"close":true}, '*');}; iframeContainer.appendChild(button); + var button = document.createElement("button"); + button.innerHTML = "0 Bitrate"; + button.onclick = function(){iframe.contentWindow.postMessage({"bitrate":0, "target": "*"}, '*');}; + iframeContainer.appendChild(button); + var button = document.createElement("button"); button.innerHTML = "Low Bitrate"; - button.onclick = function(){iframe.contentWindow.postMessage({"bitrate":30}, '*');}; + button.onclick = function(){iframe.contentWindow.postMessage({"bitrate":30, "target": "*"}, '*');}; iframeContainer.appendChild(button); var button = document.createElement("button"); button.innerHTML = "High Bitrate"; - button.onclick = function(){iframe.contentWindow.postMessage({"bitrate":5000}, '*');}; + button.onclick = function(){iframe.contentWindow.postMessage({"bitrate":5000, "target": "*"}, '*');}; iframeContainer.appendChild(button); var button = document.createElement("button"); button.innerHTML = "Default Bitrate"; - button.onclick = function(){iframe.contentWindow.postMessage({"bitrate":-1}, '*');}; + button.onclick = function(){iframe.contentWindow.postMessage({"bitrate":-1, "target": "*"}, '*');}; iframeContainer.appendChild(button); var button = document.createElement("button"); @@ -250,7 +255,7 @@ var button = document.createElement("button"); button.innerHTML = "Add Target Video"; - button.onclick = function(){iframe.contentWindow.postMessage({"target":"*", "add":true, "settings":{"style":{"width":"640px", "height":"360px", "float":"left", "border":"10px solid red", "display":"block"}}}, '*');}; // target can be a stream ID or * for all. + button.onclick = function(){iframe.contentWindow.postMessage({"target":"*", "add":true, "settings": {"style": "width:640px;height:360px;float:left;border:10px solid red;display:block;"}}, '*');}; // target can be a stream ID or * for all. iframeContainer.appendChild(button); var button = document.createElement("button"); diff --git a/index.html b/index.html index 9f56cd5..2c0def8 100644 --- a/index.html +++ b/index.html @@ -147,9 +147,15 @@
- -