mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
33 lines
655 B
HTML
33 lines
655 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head><meta charset="UTF-8"></head>
|
|
<body>
|
|
<div id="message"></div>
|
|
<script>
|
|
function message(m) {
|
|
document.getElementById("message").innerHTML = m;
|
|
window.parent.postMessage(m, "*");
|
|
}
|
|
|
|
var gStream;
|
|
|
|
function requestDevice(aAudio, aVideo) {
|
|
window.navigator.mozGetUserMedia({video: aVideo, audio: aAudio, fake: true},
|
|
function(stream) {
|
|
gStream = stream;
|
|
message("ok");
|
|
}, function(err) { message("error: " + err); });
|
|
}
|
|
message("pending");
|
|
|
|
function closeStream() {
|
|
if (!gStream)
|
|
return;
|
|
gStream.stop();
|
|
gStream = null;
|
|
message("closed");
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|