-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtesting.html
118 lines (106 loc) · 4.04 KB
/
testing.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Jekyll v4.1.1">
<title>Eyehelper testing</title>
<link rel="canonical" href="https://getbootstrap.com/docs/4.5/examples/cover/">
<!-- Bootstrap core CSS -->
<link href="./css/bootstrap.min.css" rel="stylesheet">
<!-- <script>
function quickServiceTest() {
var bridge = new WebOSServiceBridge();
var url = 'luna://com.webos.service.tts/speak';
bridge.onservicecallback = callback;
function callback(msg) { // return value call back function.
var response = JSON.parse(msg);
document.write(response.returnValue);
}
var params = JSON.stringify({
"uri": "https://media.w3.org/2010/05/sintel/trailer.mp4",
"type": "media",
"payload": {
"option": {
"appId": "com.eyehelper",
"windowId": "_Window_Id_2"
}
}
});
bridge.call(url, params);
}
document.write("test");
</script> -->
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<!-- Custom styles for this template -->
<link href="cover.css" rel="stylesheet">
</head>
<body class="text-center">
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
<header class="masthead mb-auto">
<div class="inner">
<h3 class="masthead-brand">Eyehelper</h3>
<nav class="nav nav-masthead justify-content-center">
<a class="nav-link" href="./index.html">Home</a>
<a class="nav-link active" href="./testing.html">Testing</a>
<a class="nav-link" href="./more.html">More</a>
</nav>
</div>
</header>
<script>
</script>
<main role="main" class="inner cover">
<h1 class="cover-heading">Test our model</h1>
<p class="lead">When our model detect the item what you want to find, image will be appear under the text.
</p><br>
<div id="output" width="400" height="640"></div>
<script>
var oSocket = new WebSocket("ws://172.20.10.4:3001");
var img = new Image();
var output = document.getElementById("output");
oSocket.onmessage = function (e) {
var reader = new FileReader();
var text=(new Response(e.data)).text(); // promise
text.then((value)=>{
img.src='data:image/jpg;base64,' + value;
output.appendChild(img);
});
//location.reload();
};
oSocket.onopen = function (e) {
console.log("open");
// var item = prompt("Input the object name to find");
// oSocket.send(item)
};
oSocket.onclose = function (e) {
console.log("close");
};
//oSocket.send("message");
//oSocket.close();
</script>
<button onclick="quickServiceTest()">click</button>
</main>
<footer class="mastfoot mt-auto">
<div class="inner">
<p>All Rights Reserved <a href="#">Eyehelper</a>, by <a href="#">@2Passion</a>.</p>
</div>
</footer>
</div>
</body>
</html>