Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
awrtc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Кубота
awrtc
Commits
2ceea91b
Commit
2ceea91b
authored
Sep 27, 2021
by
Иван Кубота
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add disabled dropdown state. add dropdown filter option. change connection lists\logics
parent
ba3e05cf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
17 deletions
+59
-17
app.js
build/app.js
+6
-5
CallScreen.js
build/view/CallScreen.js
+30
-10
Select.js
build/view/Select.js
+17
-2
select.css
build/view/select.css
+6
-0
No files found.
build/app.js
View file @
2ceea91b
...
...
@@ -4,14 +4,15 @@ const store = window.store = new Store({
conference_id
:
'LUCID-4'
,
connection
:
false
,
webcamtypes
:
[
{
text
:
'Center'
,
value
:
'Center'
},
{
text
:
'Right'
,
value
:
'Right'
},
{
text
:
'Left'
,
value
:
'Left'
},
{
text
:
'Center'
,
value
:
'Center'
,
filter
:
'OfficeUserLeft'
},
{
text
:
'Right'
,
value
:
'Right'
,
filter
:
'RemoteUser'
},
{
text
:
'Left'
,
value
:
'Left'
,
filter
:
'RemoteUser'
},
],
userRoles
:
[
{
text
:
'Remote User'
,
value
:
'RemoteUser'
},
{
text
:
'Office User Right'
,
value
:
'OfficeUserRight'
},
{
text
:
'Office User Left'
,
value
:
'OfficeUserLeft'
},
{
text
:
'Office User'
,
value
:
'OfficeUserLeft'
},
/*{text: 'Office User Right', value: 'OfficeUserRight'},
{text: 'Office User Left', value: 'OfficeUserLeft'},*/
],
});
...
...
build/view/CallScreen.js
View file @
2ceea91b
...
...
@@ -103,10 +103,10 @@ Screen.Conference = function() {
store
.
set
(
'userRole'
+
userID
,
userRoles
[
userID
%
userRoles
.
length
].
value
);
var
cameraCanvas
,
canvasResizerEl
,
dom
=
D
.
div
({
cls
:
'block'
,
style
:
{
marginBottom
:
'80px'
}
},
D
.
div
({
cls
:
'header'
},
'User '
+
(
currentUserID
+
1
)
),
dom
=
D
.
div
(
{
cls
:
'block'
,
style
:
{
marginBottom
:
'80px'
}
},
D
.
div
(
{
cls
:
'header'
},
'User '
+
(
currentUserID
+
1
)
),
canvasResizerEl
=
CanvasResizer
(
cameraCanvas
=
D
.
h
(
'canvas'
,
{
cameraCanvas
=
D
.
h
(
'canvas'
,
{
cls
:
"output_canvas"
,
width
:
"640px"
,
height
:
"480px"
,
...
...
@@ -114,12 +114,28 @@ Screen.Conference = function() {
/*display: 'none',*/
width
:
'320px'
}
}
)
}
)
),
Select
({
values
:
'userRoles'
,
bind
:
store
.
bind
(
'userRole'
+
userID
),
label
:
'Your role'
}),
Select
({
values
:
'videoinput'
,
bind
:
store
.
bind
(
'videoinput'
+
userID
),
label
:
'Camera device'
}),
Select
({
values
:
'webcamtypes'
,
bind
:
store
.
bind
(
'webcam'
+
userID
),
label
:
'Camera position'
})
Select
(
{
values
:
'userRoles'
,
bind
:
store
.
bind
(
'userRole'
+
userID
),
label
:
'Your role'
,
disabled
:
isConnected
}
),
Select
(
{
values
:
'videoinput'
,
bind
:
store
.
bind
(
'videoinput'
+
userID
),
label
:
'Camera device'
,
disabled
:
isConnected
}
),
Select
(
{
values
:
'webcamtypes'
,
bind
:
store
.
bind
(
'webcam'
+
userID
),
label
:
'Camera position'
,
filter
:
store
.
bind
(
'userRole'
+
userID
),
disabled
:
isConnected
}
)
);
...
...
@@ -228,7 +244,7 @@ Screen.Conference = function() {
userID
++
;
return
dom
;
}
var
usersBlock
;
var
usersBlock
,
tooMuchUsers
=
new
Store
.
Value
.
Boolean
(
false
)
;
var
dom
=
D
.
div
({
cls
:
'top-bar'
},
D
.
h
(
'img'
,
{
src
:
'amazon-logo.svg'
}),
D
.
div
({
cls
:
'buttons'
},
...
...
@@ -247,8 +263,12 @@ Screen.Conference = function() {
generateUserUI
()
),
D
.
h
(
'button'
,
{
cls
:
[
'button primary'
,
{
hidden
:
isConnected
}],
onclick
:
()
=>
usersBlock
.
appendChild
(
generateUserUI
())
D
.
h
(
'button'
,
{
cls
:
[
'button primary'
,
{
hidden
:
Store
.
OR
(
isConnected
,
tooMuchUsers
)}],
onclick
:
()
=>
{
usersBlock
.
appendChild
(
generateUserUI
())
if
(
userID
>
1
)
tooMuchUsers
.
set
(
true
);
}
},
'Add user'
),
...
...
build/view/Select.js
View file @
2ceea91b
AddCss
(
'/view/select.css'
);
var
Select
=
function
(
cfg
)
{
let
isOpen
=
this
.
isOpen
=
new
Store
.
Value
.
Boolean
(
false
);
let
isDisabled
=
this
.
isDisabled
=
cfg
.
disabled
||
new
Store
.
Value
.
Boolean
(
false
);
var
table
=
D
.
div
({
cls
:
'dropdown-list'
},
_
=>
{
store
.
sub
(
cfg
.
values
,
function
(
val
)
{
store
.
sub
(
[
cfg
.
values
,
cfg
.
filter
],
function
(
val
,
filter
)
{
if
(
val
){
var
possibleValues
=
[];
_
(
val
.
map
(
function
(
v
)
{
if
(
cfg
.
filter
&&
v
.
filter
!==
filter
)
return
;
possibleValues
.
push
(
v
);
return
D
.
div
({
cls
:
'dropdown-item'
,
'data-id'
:
v
.
value
,
onclick
:
function
()
{
cfg
.
bind
.
set
(
v
.
value
);
isOpen
.
set
(
false
);
}},
v
.
text
)
}));
if
(
possibleValues
.
length
){
var
currentValue
=
cfg
.
bind
.
get
();
if
(
!
(
possibleValues
.
find
(
val
=>
val
.
value
===
currentValue
)
)
){
cfg
.
bind
.
set
(
possibleValues
[
0
].
value
);
}
}
}
});
});
...
...
@@ -18,7 +32,8 @@ var Select = function(cfg) {
D
.
div
({
cls
:
'form-field__label'
},
D
.
span
({
cls
:
'form-field__label-text'
},
cfg
.
label
),
D
.
div
({
cls
:
[
'dropdown-field'
,
{
'dropdown-field--opened'
:
isOpen
'dropdown-field--opened'
:
isOpen
,
'dropdown-field--disabled'
:
isDisabled
}]},
D
.
h
(
'button'
,
{
cls
:
'dropdown-field__toggler'
,
...
...
build/view/select.css
0 → 100644
View file @
2ceea91b
.dropdown-field--disabled
button
.dropdown-field__toggler
{
border-bottom
:
2px
solid
#999
;
pointer-events
:
none
;
color
:
#999
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment