|
@@ -3,19 +3,249 @@ mod_templates_ui_msg = window.mod_templates_ui_msg || $("")
|
3
|
3
|
// html_js_handler_ui_msg
|
4
|
4
|
function html_js_handler_ui_msg(rsp) {
|
5
|
5
|
clog("html_js_handler_ui_msg",[...arguments])
|
6
|
|
- mod_templates_ui_msg = $(`<span>${rsp}</span>`)
|
7
|
|
- // clog("html_js_handler_lobby2")
|
|
6
|
+ mod_templates_ui_msg = $(`<span>${rsp}</span>`)[0].outerHTML
|
|
7
|
+ clog("html_js_handler_lobby2")
|
8
|
8
|
// init_lobby()
|
|
9
|
+ init_ui_msg()
|
9
|
10
|
// clog("html_js_handler_lobby3")
|
10
|
11
|
// init_api6()
|
11
|
12
|
}
|
12
|
13
|
glob_mx.svg = window.glob_mx.svg || {}
|
13
|
14
|
|
14
|
|
-function load_svg(url,name){
|
|
15
|
+// function load_svg(url,name){
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+// plugin_top_v3
|
|
19
|
+// plugin_top_v3 popup_root
|
|
20
|
+// plugin_top_cls plugin_icon_template_v2
|
|
21
|
+function init_ui_msg(url,name){
|
|
22
|
+ // if (!glob_mx.svg["close.svg"] || !(mod_templates_ui_msg.find("#tmplt").length) ){
|
|
23
|
+ if (!glob_mx.svg["close.svg"] || !(mod_templates_ui_msg.length) ){
|
|
24
|
+ return
|
|
25
|
+ }
|
|
26
|
+ var n,svg,icon_template
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+ saftly_remove(".plugin_top_v3.popup_root")
|
|
30
|
+ saftly_remove(".plugin_icon_template_v2")
|
|
31
|
+ saftly_remove(".plugin_icon_template_v3")
|
|
32
|
+ return
|
|
33
|
+
|
|
34
|
+ // svg = $(glob_mx.svg["close.svg"]).find("svg")
|
|
35
|
+ svg = $(`<span>${glob_mx.svg["close.svg"]}</span>`).find("svg")
|
|
36
|
+ svg.addClass("close_button")
|
|
37
|
+ // svg = $(`<span>$(glob_mx.svg["close.svg"])</span>`).filter("svg")
|
|
38
|
+
|
|
39
|
+ var jmod_templates_ui_msg = $(mod_templates_ui_msg)
|
|
40
|
+ n = jmod_templates_ui_msg.find(".plugin_top_v3.popup_root")
|
|
41
|
+ n.find(".popup_body").prepend(svg)
|
|
42
|
+ // n.find(".popup_icons").append(svg)
|
|
43
|
+
|
|
44
|
+ svg = $(`<span>${glob_mx.svg["camera.svg"]}</span>`).find("svg").addClass("icon_svg")
|
|
45
|
+ icon_template = $(jmod_templates_ui_msg.find(".settings-button-container")[0].outerHTML)
|
|
46
|
+ icon_template.find(".jitsi-icon").append(svg)
|
|
47
|
+ n.find(".popup_icons").append(icon_template)
|
|
48
|
+
|
|
49
|
+ svg = $(`<span>${glob_mx.svg["microphone.svg"]}</span>`).find("svg").addClass("icon_svg")
|
|
50
|
+ icon_template = $(jmod_templates_ui_msg.find(".settings-button-container")[0].outerHTML)
|
|
51
|
+ icon_template.find(".jitsi-icon").append(svg)
|
|
52
|
+ n.find(".popup_icons").append(icon_template)
|
|
53
|
+
|
|
54
|
+ svg = $(`<span>${glob_mx.svg["camera-disabled.svg"]}</span>`).find("svg").addClass("icon_svg")
|
|
55
|
+ icon_template = $(jmod_templates_ui_msg.find(".settings-button-container")[0].outerHTML)
|
|
56
|
+ icon_template.find(".jitsi-icon").append(svg)
|
|
57
|
+ n.find(".popup_icons").append(icon_template)
|
|
58
|
+
|
|
59
|
+ svg = $(`<span>${glob_mx.svg["mic-disabled.svg"]}</span>`).find("svg").addClass("icon_svg")
|
|
60
|
+ icon_template = $(jmod_templates_ui_msg.find(".settings-button-container")[0].outerHTML)
|
|
61
|
+ icon_template.find(".jitsi-icon").append(svg)
|
|
62
|
+ n.find(".popup_icons").append(icon_template)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+ svg = $(`<span>${glob_mx.svg["mic-camera-combined.svg"]}</span>`).find("svg").addClass("icon_svg")
|
|
66
|
+ icon_template = $(jmod_templates_ui_msg.find(".settings-button-container")[0].outerHTML)
|
|
67
|
+ icon_template.find(".jitsi-icon").append(svg)
|
|
68
|
+ n.find(".popup_icons").append(icon_template)
|
|
69
|
+ n.find(".popup_icons .settings-button-container:even").addClass("ieven")
|
|
70
|
+
|
|
71
|
+ // mic-camera-combined
|
|
72
|
+
|
|
73
|
+ // add_node(svg,n.find(".popup_body"),"append")
|
|
74
|
+ clog("**",icon_template)
|
|
75
|
+ window.nq_test = n
|
|
76
|
+ add_node(n,".dev_hook.vspace","append")
|
|
77
|
+ clog("::",svg,n,n.find(".popup_body"))
|
|
78
|
+
|
|
79
|
+ // n = jmod_templates_ui_msg.find(".plugin_icon_template_v2")
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
15
|
84
|
|
16
|
85
|
}
|
17
|
86
|
|
18
|
87
|
|
19
|
88
|
function load_svg_handler(url,name){
|
20
|
89
|
|
21
|
|
-}
|
|
90
|
+}
|
|
91
|
+function add_svg_mod(){
|
|
92
|
+var mod_path ="ign/rf/ui_msg/"
|
|
93
|
+
|
|
94
|
+var mtx ={
|
|
95
|
+ // js:["ign/m/timer/m.js","ign/m/timer/m0.js"],
|
|
96
|
+ // js:[`${mod_path}m0.js`,`${mod_path}m.js`,],
|
|
97
|
+ // css:[`${mod_path}m.css`],
|
|
98
|
+ html:[
|
|
99
|
+ {
|
|
100
|
+ url:`/react/features/base/icons/svg/close.svg`,diffH:get_cui_html,success:svg_rld_cb,success_js:"html_js_handler","name":"close.svg"},
|
|
101
|
+ // url:`${mod_path}m.html`,diffH:get_cui_html,success:svg_rld_cb,success_js:"html_js_handler"}]
|
|
102
|
+ {url:`/react/features/base/icons/svg/camera-disabled.svg`,diffH:get_cui_html,success:svg_rld_cb,success_js:"html_js_handler"},
|
|
103
|
+ {url:`/react/features/base/icons/svg/camera.svg`,diffH:get_cui_html,success:svg_rld_cb,success_js:"html_js_handler"},
|
|
104
|
+ {url:`/react/features/base/icons/svg/mic-disabled.svg`,diffH:get_cui_html,success:svg_rld_cb,success_js:"html_js_handler"},
|
|
105
|
+ {url:`/react/features/base/icons/svg/microphone.svg`,diffH:get_cui_html,success:svg_rld_cb,success_js:"html_js_handler"},
|
|
106
|
+ {url:`/react/features/base/icons/svg/mic-camera-combined.svg`,diffH:get_cui_html,success:svg_rld_cb,success_js:"html_js_handler"},
|
|
107
|
+ ]
|
|
108
|
+ // url:`/react/features/base/icons/svg/close.svg`,diffH:get_cui_html,success:svg_rld_cb,success_js:"html_js_handler","name":"close.svg"}]
|
|
109
|
+ // url:`${mod_path}r.html`,diffH:get_cui_html,success:svg_rld_cb,success_js:"html_js_handler"}]
|
|
110
|
+ // mod_path
|
|
111
|
+ }
|
|
112
|
+ add_module(mtx )
|
|
113
|
+
|
|
114
|
+}
|
|
115
|
+
|
|
116
|
+function svg_rld_cb(rsp,status,xhr){
|
|
117
|
+ // clog("svg_rld_cb!",this,[...arguments])
|
|
118
|
+ clog("svg_rld_cb!",{that:this,rsp,status,xhr})
|
|
119
|
+ glob_mx.svg.test = {that:this,rsp,status,xhr}
|
|
120
|
+ // glob_mx.svg[this.name] = {that:this,rsp,status,xhr}
|
|
121
|
+ // glob_mx.svg[xhr.file.name] = {that:this,rsp,status,xhr}
|
|
122
|
+ // react/features/base/icons/svg/camera-disabled.svg
|
|
123
|
+ if (!xhr.file.name){
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+ glob_mx.svg[xhr.file.url.split("/").pop()] = rsp
|
|
127
|
+ } else {
|
|
128
|
+ glob_mx.svg[xhr.file.name] = rsp
|
|
129
|
+ }
|
|
130
|
+ init_ui_msg()
|
|
131
|
+ // window[this.success_js](rsp,status,xhr)
|
|
132
|
+ // window[xhr.file.success_js](rsp,status,xhr)
|
|
133
|
+}
|
|
134
|
+
|
|
135
|
+add_svg_mod()
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+function vid_toggle(){
|
|
146
|
+ var v
|
|
147
|
+ var v2
|
|
148
|
+ if (navigator.platform != "Win32"){
|
|
149
|
+ return
|
|
150
|
+ }
|
|
151
|
+ // for (v of $(".remote-video-menu-trigger")){
|
|
152
|
+ // onmouseenter
|
|
153
|
+ // var e = new MouseEvent("onmouseenter",{bubbles: true})
|
|
154
|
+ // var e = new MouseEvent("onmouseover",{bubbles: true})
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+ // /*
|
|
159
|
+ v=$(`[aria-label="Toggle mute video"] .toolbox-icon:not(.toggled) .jitsi-icon `)[0]
|
|
160
|
+ // v2=$(`[aria-label="Toggle mute audio"] .toolbox-icon:not(.toggled) .jitsi-icon `)[0]
|
|
161
|
+ // */
|
|
162
|
+
|
|
163
|
+ // /*
|
|
164
|
+// v=$(`[aria-label="Toggle mute video"] .toolbox-icon.toggled .jitsi-icon `)[0]
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+// v2=$(`[aria-label="Toggle mute audio"] .toolbox-icon.toggled .jitsi-icon `)[0]
|
|
168
|
+ // */
|
|
169
|
+
|
|
170
|
+ // v=$(`[aria-label="Toggle mute video"] .toolbox-icon.toggled .jitsi-icon `)[0]
|
|
171
|
+ // v=$(`[aria-label="Toggle mute video"] .toolbox-icon .jitsi-icon `)[0]
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+ var e = new MouseEvent("click",{bubbles: true})
|
|
178
|
+ v.dispatchEvent(e)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+ // v=$(`[aria-label="Toggle mute video"] .toolbox-icon.toggled .jitsi-icon `)[0]
|
|
183
|
+ // v=$(`[aria-label="Toggle mute video"] .toolbox-icon .jitsi-icon `)[0]
|
|
184
|
+ if (!v2 ){
|
|
185
|
+ return
|
|
186
|
+ }
|
|
187
|
+ var e2 = new MouseEvent("click",{bubbles: true})
|
|
188
|
+ v2.dispatchEvent(e2)
|
|
189
|
+}
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+function set_vid_on(){
|
|
195
|
+ var v
|
|
196
|
+ v = $(`.toolbox-content [aria-label="Toggle mute video"] .toolbox-icon.toggled .jitsi-icon `)[0]
|
|
197
|
+ clog("...v",v)
|
|
198
|
+ if (v) {
|
|
199
|
+ v.dispatchEvent(new MouseEvent("click",{bubbles: true}))
|
|
200
|
+ }
|
|
201
|
+}
|
|
202
|
+function set_vid_off(){
|
|
203
|
+ var v
|
|
204
|
+ v = $(`.toolbox-content [aria-label="Toggle mute video"] .toolbox-icon:not(.toggled) .jitsi-icon `)[0]
|
|
205
|
+ clog("...v",v)
|
|
206
|
+ if (v) {
|
|
207
|
+ v.dispatchEvent(new MouseEvent("click",{bubbles: true}))
|
|
208
|
+ }
|
|
209
|
+
|
|
210
|
+}
|
|
211
|
+function set_mic_off(){
|
|
212
|
+ var v
|
|
213
|
+ v = $(`.toolbox-content [aria-label="Toggle mute audio"] .toolbox-icon:not(.toggled) .jitsi-icon `)[0]
|
|
214
|
+ clog("...v",v)
|
|
215
|
+ if (v) {
|
|
216
|
+ v.dispatchEvent(new MouseEvent("click",{bubbles: true}))
|
|
217
|
+ }
|
|
218
|
+
|
|
219
|
+}
|
|
220
|
+
|
|
221
|
+function set_mic_on(){
|
|
222
|
+ var v
|
|
223
|
+ v = $(`.toolbox-content [aria-label="Toggle mute audio"] .toolbox-icon.toggled .jitsi-icon `)[0]
|
|
224
|
+ clog("...v",v)
|
|
225
|
+ if (v) {
|
|
226
|
+ v.dispatchEvent(new MouseEvent("click",{bubbles: true}))
|
|
227
|
+ }
|
|
228
|
+
|
|
229
|
+}
|
|
230
|
+function toggle_mic(){
|
|
231
|
+ var v
|
|
232
|
+ v = $(`.toolbox-content [aria-label="Toggle mute audio"] .toolbox-icon .jitsi-icon `)[0]
|
|
233
|
+ clog("...v",v)
|
|
234
|
+ if (v) {
|
|
235
|
+ v.dispatchEvent(new MouseEvent("click",{bubbles: true}))
|
|
236
|
+ }
|
|
237
|
+
|
|
238
|
+}
|
|
239
|
+
|
|
240
|
+function toggle_vid(){
|
|
241
|
+ var v
|
|
242
|
+ v = $(`.toolbox-content [aria-label="Toggle mute video"] .toolbox-icon .jitsi-icon `)[0]
|
|
243
|
+ clog("...v",v)
|
|
244
|
+ if (v) {
|
|
245
|
+ v.dispatchEvent(new MouseEvent("click",{bubbles: true}))
|
|
246
|
+ }
|
|
247
|
+
|
|
248
|
+}
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+// plugin_top_cls plugin_icon_template_v2
|