-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclient.html
More file actions
50 lines (46 loc) · 1.66 KB
/
client.html
File metadata and controls
50 lines (46 loc) · 1.66 KB
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
<!DOCTYPE html>
<html lang="pt">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>Canvas Stream</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.socket.io/3.1.3/socket.io.min.js"></script>
</head>
<body>
<div id="nomeSala"></div>
<input type="text" value="Nome" id="nomeJogador"/><button id="btnconectar" onclick="conectar();">conectar</button>
<select onchange="defineControle(this);">
<option value="default">PS4/PS5/Xbox360/XboxOne</option>
<option value="snes">Snes usb</option>
<option value="ps3">PS3</option>
</select>
<br/>
<video width="400" height="400" id="receiver-video" playsinline autoplay muted></video>
<hr>
Volume: <button onclick="volume(false);">-</button><button onclick="volume(true);">+</button>
<button onclick="videoFullScreen();">fullscreen</button>
<script>
function volume(upDown){
let currentVol = document.getElementById("receiver-video").volume;
if(document.getElementById("receiver-video").muted){
document.getElementById("receiver-video").muted = false;
document.getElementById("receiver-video").volume = 0.1;
currentVol = 0.1;
}
if(upDown){
if(currentVol <= 0.9){
document.getElementById("receiver-video").volume = currentVol + 0.1;
}
} else if(currentVol >= 0.1){
document.getElementById("receiver-video").volume = currentVol - 0.1;
}
}
function videoFullScreen(){
document.getElementById("receiver-video").requestFullscreen();
}
</script>
<script src="simplepeer.js"></script>
<script src="client.js"></script>
<script src="hordepadapi.js"></script>
</body>
</html>