mirror of
https://github.com/comma-hacks/webrtc.git
synced 2025-10-04 15:52:43 +08:00
40 lines
815 B
HTML
40 lines
815 B
HTML
<html>
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>WebRTC webcam</title>
|
|
<style>
|
|
button {
|
|
padding: 8px 16px;
|
|
}
|
|
|
|
video {
|
|
width: 100%;
|
|
}
|
|
|
|
.option {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
#media {
|
|
max-width: 1280px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="option">
|
|
<input id="use-stun" type="checkbox" checked/>
|
|
<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 id="media">
|
|
<audio id="audio" autoplay="true"></audio>
|
|
<video id="video" autoplay="true" playsinline="true"></video>
|
|
</div>
|
|
|
|
<script src="client.js"></script>
|
|
</body>
|
|
</html> |