-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
113 lines (100 loc) · 3.73 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
<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;
}
.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>
<title>MediaPipe sample</title>
<link rel="icon" href="https://vonage-audio-impacting-video-samples.s3.amazonaws.com/vonage.png">
</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 audio could interact with video<br/> using Vonage
Media Processor and ML Transformers libraries.</vwc-text>
<vwc-text font-face="subtitle-2" class="headline" tight>Start speaking to see the volume histogram. If you're loud enough, your body become red.</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 1fr;">
<vwc-text font-face="subtitle-2" tight>Show Results</vwc-text>
<vwc-switch id="cameraswitch" style="justify-self: end;" checked></vwc-switch>
<vwc-text font-face="subtitle-2" 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 column-basis="block" gutters="xs">
<vwc-text font-face="subtitle-2" class="headline" tight>Preview</vwc-text>
<div class="video-wrapper">
<video id="preview_video" class="video"></video>
</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>