Files
perspective-dev--perspective/examples/blocks/src/webcam/index.html
T
2026-07-13 12:25:07 +08:00

39 lines
1.6 KiB
HTML

<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
<link rel="preload" href="/node_modules/@perspective-dev/viewer/dist/wasm/perspective-viewer.wasm" as="fetch" type="application/wasm" crossorigin="anonymous" />
<link rel="preload" href="/node_modules/@perspective-dev/server/dist/wasm/perspective-server.wasm" as="fetch" type="application/wasm" crossorigin="anonymous" />
<link rel="stylesheet" href="index.css" />
<link rel="stylesheet" crossorigin="anonymous" href="/node_modules/@perspective-dev/viewer/dist/css/themes.css" />
<script type="module" src="webcam.js"></script>
<style>
perspective-workspace {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
video,
canvas {
display: none;
}
</style>
</head>
<body>
<video id="video" width="80" height="60" autoplay muted></video>
<canvas id="canvas" width="80" height="60"></canvas>
<div id="app">
<div id="header">
<a href="https://perspective-dev.github.io">
<img height="12" src="https://raw.githubusercontent.com/perspective-dev/perspective/master/docs/static/svg/perspective-logo-dark.svg" />
</a>
<label>Webcam Demo</label>
<select></select>
</div>
<perspective-viewer></perspective-viewer>
</div>
</body>
</html>