blob: c8d4cba67adee835486255a19810ec2d9c26cb7f [file] [log] [blame]
<script>
function callGetDisplayMedia(options)
{
let promise;
window.internals.withUserGesture(() => {
promise = navigator.mediaDevices.getDisplayMedia(options);
});
return promise;
}
async function enumerate(event)
{
let result;
await callGetDisplayMedia({video: true})
.then((s) => result = "allow")
.catch((e) => result = "deny");
parent.postMessage(`${event.data}:${result}`, '*');
result.innerHTML = result;
}
window.addEventListener("message", (id) => enumerate(id));
</script>
<div id='result'></div>