-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (76 loc) · 3.61 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
<!DOCTYPE html>
<html>
Helloooooo
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
console.error("-----------------------Hello world! from TEL !!!!!!!!!!! ******");
try {
navigatorObject = window.navigator
var appName = navigatorObject.appName;
console.error("******************* Application name : ",appName);
//console.error("******************* Application name : ",navigator.appName);
//console.error("******************* appCodeName : ",navigator.appCodeName);
//console.error("*******************appVersion : ",navigator.appVersion);
//console.error("*******************cookieEnabled : ",navigator.cookieEnabled);
//console.error("******************* geolocation : ",navigator.geolocation);
//console.error("*******************language : ",navigator.language);
//console.error("*******************onLine : ",navigator.onLine);
//console.error("*******************platform : ",navigator.platform);
//console.error("*******************product : ",navigator.product);
//console.error("*******************userAgent : ",navigator.userAgent);
//console.error("*******************javaEnabled() : ",navigator.javaEnabled());
//console.error("*******************taintEnabled() : ",navigator.taintEnabled());
}
catch {
console.error("++++++++++++++++++++++++ catch-0 navigator is not supported;");
}
try {
if (navigator.mediaDevices === undefined) {
console.error("++++++++++++++++++++++++ navigator.mediaDevices is undefined;");
}
else
console.error("++++++++++++++++++++++++ navigator.mediaDevices is defined;");
console.log(JSON.stringify(navigator.mediaDevices.getSupportedConstraints()));
}
catch {
console.error("++++++++++++++++++++++++ catch-1 navigator.mediaDevices is not supported;");
}
try {
const constraints = {
audio: true,
//video: true
};
navigator.mediaDevices.getUserMedia(constraints).then(handleSuccess).catch(handleError);
}
catch {
console.error("++++++++++++++++++++++++ catch-2 navigator.mediaDevices.getUserMedia is not supported;");
}
function handleSuccess() {
console.error('navigator.MediaDevices.getUserMedia success ');
}
function handleError(error) {
console.error('navigator.MediaDevices.getUserMedia error: ', error.message, error.name);
}
// try {
// const constraints = {
// audio: true,
// //video: true
// };
// navigator.getUserMedia(constraints).then(handleSuccess1).catch(handleError1);
// }
// catch {
// console.error("++++++++++++++++++++++++++++++++++ ******* catch-3 navigator.getUserMedia is not supported;");
// }
function handleSuccess1() {
console.error(' handleSuccess1 - navigator.MediaDevices.getUserMedia success ');
}
function handleError1(error) {
console.error('handleError1 - navigator.MediaDevices.getUserMedia error: ', error.message, error.name);
}
</script>
</head>
<body>
</body>
</html>