-
Notifications
You must be signed in to change notification settings - Fork 78
/
style.css
159 lines (135 loc) · 2.75 KB
/
style.css
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
body {
margin: 0px;
padding: 0px;
background: #000;
}
#vid_container {
position: fixed;
top: 0;
left: 0;
}
#video {
width: 100%;
height: 100%;
object-fit: cover;
z-index: 0;
}
#gui_controls {
position: fixed;
background-color: #111; /*rgba(255, 0, 0, 0.5);*/
z-index: 2;
bottom: 0;
}
#video_overlay {
position: fixed;
display: none;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
background-color: #111;
}
/* Button style from:
https://googlesamples.github.io/web-fundamentals/fundamentals/media/mobile-web-video-playback.html */
button {
outline: none;
position: absolute;
color: white;
display: block;
opacity: 1;
background: transparent;
border: solid 2px #fff;
padding: 0;
text-shadow: 0px 0px 4px black;
background-position: center center;
background-repeat: no-repeat;
pointer-events: auto;
z-index: 2;
}
#takePhotoButton {
left: calc(50% - 40px);
top: calc(50% - 40px);
width: 80px;
height: 80px;
background-image: url('img/ic_photo_camera_white_48px.svg');
border-radius: 50%;
background-color: rgba(0, 0, 0, 0.5);
}
#takePhotoButton:active {
background-color: #fff;
}
#toggleFullScreenButton {
display: none;
width: 64px;
height: 64px;
background-image: url('img/ic_fullscreen_white_48px.svg');
border-radius: 50%;
background-color: rgba(0, 0, 0, 0.5);
}
#toggleFullScreenButton[aria-pressed='true'] {
background-image: url('img/ic_fullscreen_exit_white_48px.svg');
}
#switchCameraButton {
display: none;
width: 64px;
height: 64px;
background-image: url('img/ic_camera_rear_white_36px.svg');
border-radius: 50%;
background-color: rgba(0, 0, 0, 0.5);
}
#switchCameraButton[aria-pressed='true'] {
background-image: url('img/ic_camera_front_white_36px.svg');
}
@media screen and (orientation: portrait) {
/* portrait-specific styles */
/* video_container (video) doesn't respect height...
so we will fill it in completely in portrait mode
*/
#vid_container {
width: 100%;
height: 80%;
}
#gui_controls {
width: 100%;
height: 20%;
left: 0;
}
#switchCameraButton {
left: calc(20% - 32px);
top: calc(50% - 32px);
}
#toggleFullScreenButton {
left: calc(80% - 32px);
top: calc(50% - 32px);
}
}
@media screen and (orientation: landscape) {
#vid_container {
width: 80%;
height: 100%;
}
#vid_container.left {
left: 20%;
}
/* we default to right */
#gui_controls {
width: 20%;
height: 100%;
right: 0;
}
/* for the lefties */
#gui_controls.left {
left: 0;
}
#switchCameraButton {
left: calc(50% - 32px);
top: calc(18% - 32px);
}
#toggleFullScreenButton {
left: calc(50% - 32px);
top: calc(82% - 32px);
}
}