5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1 ">
6
6
7
7
< title > QuickBlox JavaScript WebRTC sample</ title >
8
-
9
- < link rel ="canonical " href ="https://quickblox.github.io/quickblox-javascript-sdk/samples/webrtc " />
10
8
9
+ < link rel ="canonical " href ="https://quickblox.github.io/quickblox-javascript-sdk/samples/webrtc "/>
11
10
< link rel ="shortcut icon " href ="https://quickblox.com/favicon.ico ">
12
11
13
- < link rel ="stylesheet " href ="https://maxcdn.bootstrapcdn .com/bootstrap/3.3.5 /css/bootstrap.min.css " integrity =" sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ== " crossorigin =" anonymous ">
12
+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare .com/ajax/libs/twitter- bootstrap/4.0.0-alpha /css/bootstrap.min.css ">
14
13
<!-- use http://una.im/CSSgram/ for filters -->
15
14
< link rel ="stylesheet " href ="libs/cssgram.min.css ">
15
+ <!-- app styles -->
16
16
< link rel ="stylesheet " href ="styles.css ">
17
17
</ head >
18
18
< body >
@@ -29,7 +29,8 @@ <h2 class="header__title">JavaScript WebRTC Sample</h2>
29
29
</ header >
30
30
31
31
< main class ="app " id ="app ">
32
- < div class ="page page-join " id ="page-join ">
32
+ < div class ="page ">
33
+ <!-- JOIN -->
33
34
< form class ="join j-join ">
34
35
< h3 class ="join__title ">
35
36
< p > Please enter your username and chat room name.</ p >
@@ -38,34 +39,26 @@ <h3 class="join__title">
38
39
39
40
< div class ="join__body ">
40
41
< div class ="join__row ">
41
- < input type ="text " class ="join__input " name ="username " placeholder ="Username " autofocus required title ="Enter a username ">
42
+ < input type ="text " class ="join__input " name ="username " placeholder ="Username " autofocus required title ="Enter a username. Should contain only latin characters and alphanumeric characters, start with a letter. " pattern =" ^[a-zA-Z][a-zA-Z0-9-_\.]{1,20}$ ">
42
43
</ div >
43
44
44
45
< div class ="join__row ">
45
- < input type ="text " class ="join__input " name ="room " placeholder ="Chat room name " required title ="Enter a chat room ">
46
+ < input type ="text " class ="join__input " name ="room " placeholder ="Chat room name " required title ="Enter a chat room. Should contain only latin characters and alphanumeric characters, start with a letter. " pattern =" ^[a-zA-Z0-9]+$ ">
46
47
</ div >
47
48
48
49
< div class ="join__row ">
49
50
< button type ="submit " class ="join__btn "> Login</ button >
50
51
</ div >
51
52
</ div >
52
53
</ form >
53
- </ div >
54
54
55
- < div class ="page page- dashboard invisible " id =" page -dashboard ">
56
- Hello
55
+ < div class ="dashboard j -dashboard ">
56
+ </ div >
57
57
</ div >
58
58
</ main >
59
59
60
- <!-- <aside class="msg_board" id="msg_board"></aside> -->
61
-
62
60
<!-- <main class="main j-main">
63
61
<div class="inner">
64
- <aside class="users">
65
- <h5 class="users__title j-users__title"></h5>
66
-
67
- <ul class="users__list j-users__list"></ul>
68
- </aside>
69
62
70
63
<div class="pl j-pl hidden">
71
64
<div class="clearfix">
@@ -206,23 +199,132 @@ <h4>Call from <strong class="j-ic_initiator"></strong></h4>
206
199
</ div >
207
200
208
201
<!-- TEMPLATES -->
202
+ < script type ="text/template " id ="dashboard_tpl ">
203
+ < div class = "state_board j-state_board" > </ div >
204
+
205
+ < div class = "dashboard__inner inner" >
206
+ < div class = "users" >
207
+ < div class = "users__title" title = "Choose a user to call" >
208
+ Choose a user to call
209
+ < button class = "users__refresh j-users__refresh" title = "click to refresh" >
210
+ < svg width = "16px" height = "16px" viewBox = "0 0 16 16" version = "1.1" xmlns = "http://www.w3.org/2000/svg" xmlns :xlink = "http://www.w3.org/1999/xlink" >
211
+ < g id = "UI" stroke = "none" stroke-width = "1" fill = "none" fill-rule = "evenodd" sketch :type = "MSPage" >
212
+ < g id = "Main" transform = "translate(-435.000000, -178.000000)" >
213
+ < g id = "ic_refresh" transform = "translate(431.000000, 174.000000)" >
214
+ < g id = "Icon-24px" sketch :type = "MSShapeGroup" >
215
+ < path d = "M0,0 L24,0 L24,24 L0,24 L0,0 Z" id = "Shape" > </ path >
216
+ < path d = "M17.65,6.35 C16.2,4.9 14.21,4 12,4 C7.58,4 4.01,7.58 4.01,12 C4.01,16.42 7.58,20 12,20 C15.73,20 18.84,17.45 19.73,14 L17.65,14 C16.83,16.33 14.61,18 12,18 C8.69,18 6,15.31 6,12 C6,8.69 8.69,6 12,6 C13.66,6 15.14,6.69 16.22,7.78 L13,11 L20,11 L20,4 L17.65,6.35 L17.65,6.35 Z" id = "Shape" fill = "#808080" > </ path >
217
+ </ g >
218
+ </ g >
219
+ </ g >
220
+ </ g >
221
+ </ svg >
222
+ </ button >
223
+ </ div >
224
+
225
+ < div class = "wait users__list j-users" >
226
+ </ div >
227
+ </ div >
228
+
229
+ < div class = "board clearfix" >
230
+ < div class = "frames" >
231
+ Frames
232
+ <!-- <div class="main_video__timer hidden" id="timer">
233
+ </ div >
234
+
235
+ < video id = "main_video" class = "j-main_video_vid main_video_vid fw-video" >
236
+ < / video > -->
237
+ </ div >
238
+
239
+ < div class = "caller" >
240
+ caller
241
+ < / d i v >
242
+ </div >
243
+
244
+
245
+ <!-- <div class="controls">
246
+ < button class = "control__btn" >
247
+ Start Call
248
+ </ button >
249
+
250
+ < div class = "caller" >
251
+ < p >
252
+ < b > You</ b >
253
+ < span class = "j-caller_name" >
254
+ (Yevgen488)
255
+ </ span >
256
+ </ p >
257
+
258
+ < div class = "caller__video" >
259
+ < video src = "" class = "j-caller__video" > </ video >
260
+
261
+ < div class = "caller__ctrl" >
262
+ < button class = "caller__ctrl_btn caller__ctrl_btn-cam j-caller__ctrl" data-target = "video" >
263
+ < svg xmlns = "http://www.w3.org/2000/svg" width = "19" height = "19" viewBox = "0 0 19 19" version = "1.1" >
264
+ < g stroke = "none" stroke-width = "1" fill = "none" fill-rule = "evenodd" >
265
+ < g transform = "translate(-290.000000, -80.000000)" >
266
+ < g transform = "translate(288.000000, 78.000000)" >
267
+ < path d = "M0 0L24 0 24 24 0 24 0 0Z" />
268
+ < path class = "svg_icon" d = "M21 6.5L17 10.5 17 7C17 6.45 16.55 6 16 6L9.82 6 21 17.18 21 6.5 21 6.5ZM3.27 2L2 3.27 4.73 6 4 6C3.45 6 3 6.45 3 7L3 17C3 17.55 3.45 18 4 18L16 18C16.21 18 16.39 17.92 16.54 17.82L19.73 21 21 19.73 3.27 2 3.27 2Z" />
269
+ </ g >
270
+ </ g >
271
+ </ g >
272
+ </ svg >
273
+ </ button >
274
+
275
+ < button class = "caller__ctrl_btn caller__ctrl_btn-mic j-caller__ctrl" data - target = "audio" >
276
+ < svg xmlns = "http://www.w3.org/2000/svg" width = "18" height = "19" viewBox = "0 0 18 19" version = "1.1" >
277
+ < g stroke = "none" stroke-width = "1" fill = "none" fill-rule = "evenodd" >
278
+ < g transform = "translate(-347.000000, -80.000000)" >
279
+ < g transform = "translate(344.000000, 78.000000)" >
280
+ < path d = "M0 0L24 0 24 24 0 24 0 0Z" />
281
+ < path class = "svg_icon" d = "M19 11L17.3 11C17.3 11.74 17.14 12.43 16.87 13.05L18.1 14.28C18.66 13.3 19 12.19 19 11L19 11ZM14.98 11.17C14.98 11.11 15 11.06 15 11L15 5C15 3.34 13.66 2 12 2 10.34 2 9 3.34 9 5L9 5.18 14.98 11.17 14.98 11.17ZM4.27 3L3 4.27 9.01 10.28 9.01 11C9.01 12.66 10.34 14 12 14 12.22 14 12.44 13.97 12.65 13.92L14.31 15.58C13.6 15.91 12.81 16.1 12 16.1 9.24 16.1 6.7 14 6.7 11L5 11C5 14.41 7.72 17.23 11 17.72L11 21 13 21 13 17.72C13.91 17.59 14.77 17.27 15.54 16.82L19.73 21 21 19.73 4.27 3 4.27 3Z" />
282
+ </ g >
283
+ </ g >
284
+ </ g >
285
+ </ svg >
286
+ < / b u t t o n >
287
+ </div >
288
+
289
+ < div class = "caller__filter" >
290
+ < select class = "caller__filter_select j-filter" >
291
+ < option value = "no" > No Filter</ option >
292
+ < option value = "aden" > Aden</ option >
293
+ < option value = "reyes" > Reyes</ option >
294
+ < option value = "perpetua" > Perpetua</ option >
295
+ < option value = "inkwell" > Inkwell</ option >
296
+ < option value = "toaster" > Toaster</ option >
297
+ < option value = "walden" > Walden</ option >
298
+ < option value = "hudson" > Hudson</ option >
299
+ < option value = "gingham" > Gingham</ option >
300
+ < option value = "mayfair" > Mayfair</ option >
301
+ < option value = "lofi" > Lofi</ option >
302
+ < option value = "xpro2" > Xpro2</ option >
303
+ < option value = "_1977" > 1977</ option >
304
+ < option value = "brooklyn" > Brooklyn</ option >
305
+ </ select >
306
+ </ div >
307
+ < / d i v >
308
+ </div >
309
+ < / div > -->
310
+
311
+ </ div >
312
+ < / d i v >
313
+ </ script >
314
+
315
+ < script type ="text/template " id ="default_tpl ">
316
+ Login in as QuickBlox Conversations room . Logged in as < b > < %= name % > </ b >
317
+ < button class = 'fw-link j-logout' > Logout < / b u t t o n >
318
+ </ script >
319
+
209
320
< script type ="text/template " id ="user_tpl ">
210
- < li class = "users__item" >
211
- < button class = "users__user j-user" data-id = "<%= id %>" data-login = "<%= login %>" data-password = "<%= password %>" data-name = "<%= full_name %>" >
212
- < svg xmlns = "http://www.w3.org/2000/svg" xmlns :xlink = "http://www.w3.org/1999/xlink" width = "33" height = "32" viewBox = "0 0 33 32" version = "1.1" >
213
- < g stroke = "none" stroke-width = "1" fill = "none" fill-rule = "evenodd" >
214
- < g transform = "translate(-84.000000, -152.000000)" fill = "#000000" >
215
- < g transform = "translate(84.000000, 152.000000)" >
216
- < path fill = "#<%=colour%>" d = "M16.75 16C21.17 16 24.75 12.42 24.75 8 24.75 3.58 21.17 0 16.75 0 12.33 0 8.75 3.58 8.75 8 8.75 12.42 12.33 16 16.75 16L16.75 16ZM16.75 20C11.41 20 0.75 22.68 0.75 28L0.75 32 32.75 32 32.75 28C32.75 22.68 22.09 20 16.75 20L16.75 20Z" />
217
- </ g >
218
- </ g >
219
- </ g >
220
- </ svg >
221
-
222
- < p class = "user__name" > < %= full_name % > </ p >
223
- < i class = "users__btn_unchecked" > </ i >
321
+ < div class = "users__item" >
322
+ < button class = "users__user j-user" data-id = "<%= id %>" data-login = "<%= login %>" data-name = "<%= full_name %>" >
323
+ < i class = "user__icon" > </ i >
324
+ < span class = "user__name" > < %= full_name % > </ span >
325
+ < i class = "users__btn_remove j-user-remove" > </ i >
224
326
</ button >
225
- </ li >
327
+ </ div >
226
328
</ script >
227
329
228
330
< script type ="text/template " id ="accept_call ">
@@ -239,6 +341,8 @@ <h4>Call from <strong class="j-ic_initiator"></strong></h4>
239
341
< % } ) ; % >
240
342
</ script >
241
343
344
+
345
+
242
346
< script type ="text/template " id ="login_tpl ">
243
347
Login in as < %= name % >
244
348
< button class = 'fw-link j-logout' > Logout</ button >
@@ -278,20 +382,23 @@ <h4>Call from <strong class="j-ic_initiator"></strong></h4>
278
382
</ script >
279
383
280
384
<!-- SCRIPT -->
281
- < script src ="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js "> </ script >
385
+ <!-- DEPENDCIES -->
386
+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js "> </ script >
282
387
< script src ="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js "> </ script >
283
- < script src ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js "> </ script >
388
+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js "> </ script >
389
+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js "> </ script >
284
390
391
+ <!-- QB -->
285
392
< script src ="../../quickblox.min.js "> </ script >
286
- <!-- Routing lib -->
287
- < script src ="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js "> </ script >
288
393
394
+ <!-- APP -->
289
395
< script src ="config.js "> </ script >
290
396
< script src ="js/helpers.js "> </ script >
291
- <!-- < script src="js/msgBoard .js"></script> -- >
397
+ < script src ="js/stateBoard .js "> </ script >
292
398
< script src ="js/app.js "> </ script >
293
-
294
- < script type ="text/javascript ">
399
+
400
+ <!-- Hack for github Pages -->
401
+ < script >
295
402
var host = "quickblox.github.io" ;
296
403
if ( ( host == window . location . host ) && ( window . location . protocol != "https:" ) )
297
404
window . location . protocol = "https" ;
0 commit comments