You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
136 lines
4.6 KiB
136 lines
4.6 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<title>Bootstrap Example</title>
|
|
<!-- Required meta tags -->
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<!-- Bootstrap CSS -->
|
|
<link rel="stylesheet" href="css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="css/main.css">
|
|
|
|
<!-- JS -->
|
|
<script src="js/jquery-3.3.1.min.js"></script>
|
|
<script src="js/bootstrap.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
var sock = null;
|
|
var ellog = null;
|
|
|
|
window.onload = function() {
|
|
|
|
ellog = document.getElementById('log');
|
|
|
|
var wsuri;
|
|
if (window.location.protocol === "file:") {
|
|
wsuri = "ws://10.174.136.143:45684/ws?a=23&foo=bar";
|
|
} else {
|
|
wsuri = "ws://" + window.location.hostname + ":45684/ws?a=23&foo=bar";
|
|
}
|
|
|
|
if ("WebSocket" in window) {
|
|
sock = new WebSocket(wsuri);
|
|
} else if ("MozWebSocket" in window) {
|
|
sock = new MozWebSocket(wsuri);
|
|
} else {
|
|
log("Browser does not support WebSocket!");
|
|
}
|
|
|
|
if (sock) {
|
|
sock.onopen = function() {
|
|
log("Connected to " + wsuri);
|
|
}
|
|
|
|
sock.onclose = function(e) {
|
|
log("Connection closed (wasClean = " + e.wasClean + ", code = " + e.code + ", reason = '" + e.reason + "')");
|
|
sock = null;
|
|
}
|
|
|
|
sock.onmessage = function(e) {
|
|
log("Got echo: " + e.data);
|
|
}
|
|
}
|
|
};
|
|
|
|
function send() {
|
|
var msg = document.getElementById('message').value;
|
|
var batchsize = parseInt(document.getElementById('batch').value);
|
|
if (sock) {
|
|
for (var i = 0; i < batchsize; ++i) {
|
|
sock.send(document.getElementById("size").value);
|
|
}
|
|
log("Sent " + batchsize + "x : " + msg);
|
|
} else {
|
|
log("Not connected.");
|
|
}
|
|
};
|
|
|
|
function log(m) {
|
|
ellog.innerHTML += m + '\n';
|
|
ellog.scrollTop = ellog.scrollHeight;
|
|
};
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<nav class="navbar navbar-default navbar-static-top">
|
|
<div class="container-fluid">
|
|
<!-- Brand and toggle get grouped for better mobile display -->
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a class="navbar-brand" href="#">Умный дом</a>
|
|
</div>
|
|
|
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
|
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li><a href="https://gitlab.com/zenls/rpi_remote_cam.git" target="_blank">Gitlab</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div class="container-fluid main-container">
|
|
<div class="col-md-2 sidebar">
|
|
<ul class="nav nav-pills nav-stacked">
|
|
<li class="active"><a href="index.html">Видео стрим</a></li>
|
|
<li><a href="info.html">Информация</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-md-10 content">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
Видео
|
|
</div>
|
|
<div class="text-center">
|
|
<br>
|
|
<img style="-webkit-user-select: none;" src="http://10.174.136.143:8081/">
|
|
<br>
|
|
<br>
|
|
<form class="range-field">
|
|
<input type="range" min="50" max="250" id="size" oninput="send();" value="140" />
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<footer class="pull-left footer">
|
|
<p class="col-md-12">
|
|
<hr class="divider">Проект создан в образовательных целях, при поддержке <a href="https://t.me/baumanrobotics">Bauman
|
|
Robotics</a>.</a>
|
|
</p>
|
|
</footer>
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
|
</html> |