mirror of
https://github.com/servo/servo.git
synced 2025-10-17 08:49:21 +01:00
15 lines
No EOL
299 B
HTML
15 lines
No EOL
299 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<script>
|
|
window.onmessage = m => {
|
|
navigator.mediaDevices.getUserMedia({video: true})
|
|
.then(() => 'ok')
|
|
.catch(e => e.name)
|
|
.then(r => {
|
|
window.parent.postMessage({
|
|
id: m.data.id,
|
|
result: r
|
|
}, '*');
|
|
});
|
|
}
|
|
</script> |