-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
251 lines (235 loc) · 10.3 KB
/
index.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<html>
<head>
<style>
body {
margin: 0px;
}
.headline {
text-align: center;
}
vwc-top-app-bar img {
margin-left: 16px;
}
.maincard {
margin: 10 auto;
width: 58%;
max-width: 1120px;
height: fit-content;
display: block;
}
vwc-slider {
position: relative;
top: -13px;
}
.maincardlayout {
display: grid;
grid-template-columns: 4fr 6fr;
}
.video-wrapper {
aspect-ratio: 1.1;
background-image: url(images/vonage.png);
background-repeat: no-repeat;
background-position: center;
background-color: var(--vvd-color-canvas);
background-size: 100% auto;
border-radius: 4px;
overflow: hidden;
border: 1px solid var(--vvd-color-neutral-30);
}
.video {
width: 100%;
height: 100%;
object-fit: cover;
}
#sensitivity_slider {
width: 200px;
}
</style>
<script type="module">
import "@vonage/vwc-top-app-bar";
import "@vonage/vwc-layout";
import "@vonage/vwc-text";
import "@vonage/vwc-banner";
import "@vonage/vwc-card";
import "@vonage/vwc-switch";
import "@vonage/vwc-slider";
import "@vonage/vwc-list/vwc-list-item";
</script>
<style>
.app {
position: relative;
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
.upcoming-stream {
z-index: 10;
position: absolute;
bottom: 10px;
left: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
overflow: hidden;
border-radius: 5px;
width: 25%;
max-width: 300px;
}
.upcoming-stream video {
width: 100%;
}
.incoming-stream {
width: 100%;
height: 100%;
}
.incoming-stream-message {
background-color: black;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: -1;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}
</style>
<title>Vonage Video sample</title>
</head>
<body>
<vwc-top-app-bar alternate>
<img
slot="navigationIcon"
height="24"
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQQI9k8NKq3KoOs1VkwSYwPwwQbisiS_K-0jtBUyml13k7EBy8Aekz7G7I1vqceWf5kEQ&usqp=CAU"
/>
<div>
<vwc-banner
open
connotation="info"
message="Vonage MediaPipe integration sample application"
></vwc-banner>
<vwc-layout gutters="xs" column-basis="block">
<vwc-text font-face="subtitle-1" class="headline" tight
>This sample app show how vonage media processor library could be integrated
with Vonage Video.</vwc-text
>
<vwc-text font-face="subtitle-2" class="headline" tight
>Open two browser and fill the credentials informations. Connect and start
the process to see the sent video being processed.</vwc-text
>
</vwc-layout>
<vwc-card class="maincard" elevation="0">
<div slot="main" gutters="xs" class="maincardlayout">
<vwc-layout column-basis="block" gutters="xs">
<vwc-text font-face="subtitle-2" class="headline" tight
>Source</vwc-text
>
<div class="video-wrapper">
<video id="source_video" class="video"></video>
</div>
<vwc-layout
column-spacing="md"
style="--layout-grid-template-columns: 1fr"
>
<vwc-text font-face="subtitle-2" tight>Vonage Video</vwc-text>
<vwc-layout
column-spacing="md"
style="--layout-grid-template-columns: 1fr 1fr"
>
<vwc-text font-face="subtitle-3" tight>Connect</vwc-text>
<vwc-switch id="connect" style="justify-self: end"></vwc-switch>
<vwc-text font-face="subtitle-3" tight>API key</vwc-text>
<vwc-textfield name="api_key" label="api_key" outlined="">
<input
style="justify-self: end"
value=""
class="vivid-input-internal"
id="input_api_key"
name="api_key"
type="text"
placeholder=" "
/>
</vwc-textfield>
<vwc-text font-face="subtitle-3" tight>Session id</vwc-text>
<vwc-textfield name="session_id" label="session_id" outlined="">
<input
style="justify-self: end"
value=""
class="vivid-input-internal"
id="input_session_id"
name="session_id"
type="text"
placeholder=" "
/>
</vwc-textfield>
<vwc-text font-face="subtitle-3" tight>Token</vwc-text>
<vwc-textfield name="token" label="token" outlined="">
<input
style="justify-self: end"
value=""
class="vivid-input-internal"
id="input_token"
name="token"
type="text"
placeholder=""
/>
</vwc-textfield>
</vwc-layout>
<vwc-text font-face="subtitle-2" tight>Result</vwc-text>
<vwc-layout
column-spacing="md"
style="--layout-grid-template-columns: 1fr 1fr"
>
<vwc-text font-face="subtitle-3" tight>Show</vwc-text>
<vwc-switch
id="cameraswitch"
style="justify-self: end"
></vwc-switch>
<vwc-text font-face="subtitle-3" tight>Sensitivity</vwc-text>
<vwc-slider
value="0.01"
min="0.0002"
max="0.02"
id="sensitivity_slider"
></vwc-slider>
</vwc-layout>
</vwc-layout>
</vwc-layout>
<vwc-layout column-basis="block" gutters="xs">
<vwc-text font-face="subtitle-2" class="headline" tight
>Preview</vwc-text
>
<div class="video-wrapper">
<div class="app">
<div class="incoming-stream"></div>
</div>
</div>
<vwc-layout>
<vwc-button
connotation="cta"
label="View code in GitHub"
layout="filled"
icon="open-line"
trailingIcon
id="githubButton"
></vwc-button>
<vwc-button
connotation="cta"
label="Use Vivid"
layout="filled"
icon="open-line"
trailingIcon
id="vividButton"
></vwc-button>
</vwc-layout>
</vwc-layout>
</div>
</vwc-card>
</div>
</vwc-top-app-bar>
<script type="module" src="./src/main.ts"></script>
</body>
</html>