-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdebug.html
More file actions
100 lines (82 loc) · 5.52 KB
/
Copy pathdebug.html
File metadata and controls
100 lines (82 loc) · 5.52 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
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
<!doctype html>
<!-- Example HTML file to run XOWS Client (Debug Mode)
Notice that Xows Library files (JavaScript files and subfolders) can be stored
in a subfolder rather than the same level of the (this) HTML file.
In this case simply set proper path to the JavaScript file(s) to load, and
change the "lib_path" option value. -->
<html lang="en">
<head>
<meta charset="utf-8">
<!-- For proper GUI display, it is strongly recommended to keep this configuration -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Xows debug</title>
<link rel="icon" href="favicon.png"/>
<!-- Take care to set the proper path to files according your setup -->
<script src="xows_base.js"></script> <!-- Base functions and constants -->
<script src="xows_l10n.js"></script> <!-- l10n Module -->
<script src="xows_xml.js"></script> <!-- XML Module -->
<script src="xows_sasl.js"></script> <!-- SALS Module -->
<script src="xows_sck.js"></script> <!-- WebSocket interface Module -->
<script src="xows_xmp.js"></script> <!-- XMPP Protocol interface Module -->
<script src="xows_cach.js"></script> <!-- Cache & Local Storage Module -->
<script src="xows_load.js"></script> <!-- Agnostic loader Module -->
<script src="xows_cli.js"></script> <!-- Main Client Module -->
<script src="xows_tpl.js"></script> <!-- HTML Templates Module -->
<script src="xows_doc.js"></script> <!-- DOM Managment Module -->
<script src="xows_snd.js"></script> <!-- Audio/Sound Module -->
<script src="xows_wrtc.js"></script> <!-- WebRTC interface -->
<script src="xows_gui.js"></script> <!-- User interface Module -->
<script src="xows_gui_rost.js"></script> <!-- GUI Roster Sub-module -->
<script src="xows_gui_hist.js"></script> <!-- GUI Chat history Sub-module -->
<script src="xows_gui_edit.js"></script> <!-- GUI Message Edit panel Sub-module -->
<script src="xows_gui_muc.js"></script> <!-- GUI MUC Sub-module -->
<script src="xows_gui_call.js"></script> <!-- GUI Media Call Sub-module -->
<script src="xows_init.js"></script> <!-- Main "public" API -->
</head>
<body>
<!-- IMPORTANT! leave that empty, application GUI will be incorporated here -->
</body>
<script>
// Set options
const options = {
// Base configuration
"lib_path" : "", //< Path to XOWS files (relative to HTTP base URL)
"lib_verbose" : 3, //< Console log verbosity level from 0 (nothing) to 3 (too much)
// HTML Template loader options
"tpl_load_mincss" : false, //< Load minified CSS theme file (disable it for theme edit/debug purpose)
"tpl_force_uncache" : true, //< Prevent browser cache (force reload assets by appending URL suffix)
// XMPP/Websocket configuration
"xmpp_url" : "wss://localhost/xmpp-websocket/", //< XMPP server Websocket address
// User Login options
"login_force_domain" : "", //< Optional domain to append (enforce) to XMPP login username
"login_sasl_store" : false, //< Allow SASL authentication data storage for auto-login
"login_fail_delay" : 2, //< Anti-bruteforce temporization delay (seconds) after each failed login attempts
"resume_timeout" : 5, //< Delay (minutes) before definitive abortion of connection recovery
"resume_try_delay" : 5, //< Connection recovery delay (seconds) to wait between each attempts
// GUI options
"gui_theme" : "dark", //< Interface theme (folder within /theme subdirectory)
"gui_locale" : "en-US", //< Preferred Localization (among available ones)
"gui_allow_register" : true, //< Allow XMPP account register via Login page
"gui_archive_delay" : 500, //< Delay (milliseconds) to validate fetch for older history messages
// Client behavior
"cli_archive_count" : 50, //< Minimum count of history message to fetch each iteration (MAM query)
"cli_avat_autopub" : true, //< Auto-publish the default generated Avatar if none exists for user
// Client features
"cli_pepnotify_bkms" : true, //< Enable PEP notifications for Native Bookmarks (XEP-0402)
"cli_pepnotify_nick" : true, //< Enable PEP notifications for User Nickname (XEP-0172)
"cli_pepnotify_avat" : true, //< Enable PEP notifications for User Avatar (XEP-0084)
// Client additionnal external services
"cli_extern_services" : [ { type:"stun", //< Manually defined XMPP External Services (following XEP-0215 schemas)
transport:"udp",
host:"stun.example.net",
port:"3478" },
{ type:"turn",
transport:"udp",
host:"turn.example.net",
port:"3478",
secret:"7d77f8a6ac0bc041959af2abe460" } ],
};
// Initialize
xows_init(options);
</script>
</html>