代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>WebRTC Virtual background</title>
<script type="module" src="app.ts"></script>
<style>
button {
padding: 8px 16px;
}
.parent {
position: relative;
top: 0;
left: 0;
}
.rel800 {
position: relative;
top: 0;
left: 0;
width: 800px;
}
.abs800 {
position: absolute;
top: 0;
left: 0;
width: 800px;
}
</style>
</head>
<body style="background: grey">
<div class="option">
<input id="use-stun" type="checkbox"/>
<label for="use-stun">Use STUN server</label>
</div>
<button id="start" onclick="start()">Start</button>
<button id="stop" style="display: none" onclick="stop()">Stop</button>
<div class="parent">
<!-- https://codepen.io/jonnyscholes/post/css-blend-modes -->
<img class="rel800" src="https://farm4.staticflickr.com/3888/15002876851_945906f3d6_z.jpg"/>
<canvas class="abs800" id="whiteonblack" width="800" height="532" style="mix-blend-mode: lighten;"></canvas>
<div class="abs800" style="mix-blend-mode: darken">
<video class="abs800" id="face" style="mix-blend-mode: darken" muted autoplay="true" playsinline="true"></video>
<canvas class="abs800" id="blackonwhite" width="800" height="532" style="mix-blend-mode: lighten;"></canvas>
</div>
<audio id="audio" autoplay="true"></audio>
</div>
<video id="mask" muted autoplay="true" playsinline="true"></video>
<script src="client.js"></script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。