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
e5b61a04
Commit
e5b61a04
authored
Sep 16, 2021
by
Иван Кубота
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
message test
parent
5296a306
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
5 deletions
+93
-5
app.js
build/app.js
+28
-4
cert.pem
build/cert.pem
+21
-0
key.pem
build/key.pem
+28
-0
segmentrtc.html
build/segmentrtc.html
+8
-0
videoinputapp.ts
src/apps/videoinputapp.ts
+8
-1
No files found.
build/app.js
View file @
e5b61a04
...
@@ -2,7 +2,21 @@
...
@@ -2,7 +2,21 @@
let
content
,
remoteVideoEl
;
let
content
,
remoteVideoEl
;
const
store
=
window
.
store
=
new
Store
({
const
store
=
window
.
store
=
new
Store
({
conference_id
:
'SelfieBarracuda_con'
,
conference_id
:
'SelfieBarracuda_con'
,
connection
:
false
connection
:
false
,
webcam1
:
'Center'
,
webcam2
:
'Right'
,
webcamtypes
:
[
{
text
:
'Left'
,
value
:
'Left'
},
{
text
:
'Right'
,
value
:
'Right'
},
{
text
:
'Center'
,
value
:
'Center'
},
],
userRoles
:
[
{
text
:
'Remote User'
,
value
:
'RemoteUser'
},
{
text
:
'Office User Left'
,
value
:
'OfficeUserLeft'
},
{
text
:
'Office User Right'
,
value
:
'OfficeUserRight'
},
],
userRole1
:
'RemoteUser'
,
userRole2
:
'OfficeUserRight'
});
});
const
Input
=
function
(
cfg
,
bind
)
{
const
Input
=
function
(
cfg
,
bind
)
{
...
@@ -94,6 +108,8 @@ D.div({cls: 'top-bar', renderTo: document.body},
...
@@ -94,6 +108,8 @@ D.div({cls: 'top-bar', renderTo: document.body},
D
.
div
({
cls
:
'block'
},
D
.
div
({
cls
:
'block'
},
D
.
div
({
cls
:
'header'
},
'Cameras'
),
D
.
div
({
cls
:
'header'
},
'Cameras'
),
Select
({
values
:
'videoinput'
,
bind
:
store
.
bind
(
'videoinput1'
),
label
:
'Camera 1'
}),
Select
({
values
:
'videoinput'
,
bind
:
store
.
bind
(
'videoinput1'
),
label
:
'Camera 1'
}),
Select
({
values
:
'webcamtypes'
,
bind
:
store
.
bind
(
'webcam1'
),
label
:
'WebCam'
}),
Select
({
values
:
'userRoles'
,
bind
:
store
.
bind
(
'userRole1'
),
label
:
'User role'
}),
camera1canvas
=
D
.
h
(
'canvas'
,
{
camera1canvas
=
D
.
h
(
'canvas'
,
{
cls
:
"output_canvas"
,
cls
:
"output_canvas"
,
width
:
"640px"
,
width
:
"640px"
,
...
@@ -110,6 +126,8 @@ D.div({cls: 'top-bar', renderTo: document.body},
...
@@ -110,6 +126,8 @@ D.div({cls: 'top-bar', renderTo: document.body},
),
),
D
.
div
({
cls
:
[{
hidden
:
single
}]},
D
.
div
({
cls
:
[{
hidden
:
single
}]},
Select
({
values
:
'videoinput'
,
bind
:
store
.
bind
(
'videoinput2'
),
label
:
'Camera 2'
}),
Select
({
values
:
'videoinput'
,
bind
:
store
.
bind
(
'videoinput2'
),
label
:
'Camera 2'
}),
Select
({
values
:
'webcamtypes'
,
bind
:
store
.
bind
(
'webcam2'
),
label
:
'WebCam'
}),
Select
({
values
:
'userRoles'
,
bind
:
store
.
bind
(
'userRole2'
),
label
:
'User role'
}),
camera2canvas
=
D
.
h
(
'canvas'
,
{
camera2canvas
=
D
.
h
(
'canvas'
,
{
cls
:
"output_canvas"
,
cls
:
"output_canvas"
,
width
:
"640px"
,
width
:
"640px"
,
...
@@ -250,7 +268,7 @@ var handleError = function(e) {
...
@@ -250,7 +268,7 @@ var handleError = function(e) {
console
.
log
(
'Error'
,
e
)
console
.
log
(
'Error'
,
e
)
}
}
var
RTC
=
function
(
parent
,
canvas
,
devname
)
{
var
RTC
=
function
(
parent
,
canvas
,
devname
,
id
)
{
let
callApp
;
let
callApp
;
console
.
log
(
"init callapp"
);
console
.
log
(
"init callapp"
);
if
(
parent
==
null
)
{
if
(
parent
==
null
)
{
...
@@ -260,6 +278,9 @@ var RTC = function(parent, canvas, devname) {
...
@@ -260,6 +278,9 @@ var RTC = function(parent, canvas, devname) {
awrtc
.
SLog
.
SetLogLevel
(
awrtc
.
SLogLevel
.
Info
);
awrtc
.
SLog
.
SetLogLevel
(
awrtc
.
SLogLevel
.
Info
);
callApp
=
new
apps
.
VideoInputApp
();
callApp
=
new
apps
.
VideoInputApp
();
const
media
=
new
awrtc
.
Media
();
const
media
=
new
awrtc
.
Media
();
awrtc
.
Media
.
SharedInstance
.
VideoInput
.
AddCanvasDevice
(
canvas
,
devname
,
canvas
.
width
/
2
,
canvas
.
height
/
2
,
30
);
awrtc
.
Media
.
SharedInstance
.
VideoInput
.
AddCanvasDevice
(
canvas
,
devname
,
canvas
.
width
/
2
,
canvas
.
height
/
2
,
30
);
...
@@ -269,15 +290,18 @@ var RTC = function(parent, canvas, devname) {
...
@@ -269,15 +290,18 @@ var RTC = function(parent, canvas, devname) {
//apps.VideoInputApp.sVideoDevice = devname;
//apps.VideoInputApp.sVideoDevice = devname;
callApp
.
sVideoDevice
=
devname
;
callApp
.
sVideoDevice
=
devname
;
callApp
.
setupUi
(
parent
);
callApp
.
setupUi
(
parent
);
this
.
callApp
=
callApp
;
callApp
.
___id
=
id
;
this
.
id
=
id
;
}
}
store
.
sub
(
'appLoaded'
,
function
(
loaded
)
{
store
.
sub
(
'appLoaded'
,
function
(
loaded
)
{
if
(
!
loaded
)
if
(
!
loaded
)
return
;
return
;
let
instance
=
new
RTC
(
document
.
querySelector
(
"#videoinputapp1"
),
camera1canvas
,
'canvas1'
);
let
instance
=
new
RTC
(
document
.
querySelector
(
"#videoinputapp1"
),
camera1canvas
,
'canvas1'
,
1
);
instance
.
mUiRemoteVideoParent
=
remoteVideoEl
;
instance
.
mUiRemoteVideoParent
=
remoteVideoEl
;
let
instance2
=
new
RTC
(
document
.
querySelector
(
"#videoinputapp1"
),
camera2canvas
,
'canvas2'
);
let
instance2
=
new
RTC
(
document
.
querySelector
(
"#videoinputapp1"
),
camera2canvas
,
'canvas2'
,
2
);
instance2
.
mUiRemoteVideoParent
=
remoteVideoEl
;
instance2
.
mUiRemoteVideoParent
=
remoteVideoEl
;
const
selfieSegmentation1
=
new
SelfieSegmentation
(
{
const
selfieSegmentation1
=
new
SelfieSegmentation
(
{
...
...
build/cert.pem
0 → 100644
View file @
e5b61a04
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUXh+iPwPcKyq6o4sOPt9sc1t11rgwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMTA5MTUwMTQzNTNaFw0zMTA5
MTMwMTQzNTNaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCmaz2F06WDP8tEQ/fQH3nrjqmVTfsyBx2ngkR6s2p+
CVEWQLjcEP7B7q9mI83nTwCWHdOBa4Xs1e5BivUSOniGJcPKL6X3M9c9sKVO6V9x
7yMBSc1NpBbOvT46znDQXV6uGjwFOxeVijX1RiS3QQH5XAiZA47TScyWXDIO4fZ/
ZvQp4LLdGeWmnJwTp2Mn9qxni7fVKjjfjAwP+ba1t8QckQicOsfv+THrvvHNrImy
h14Bp7l7A8pYZnXUXggSDONStZlKroAMJ1vu4C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/YT3ZvTteDR/GGx8i7DZevSOfRRSuYFxsKa8iMZ05UeL
jEFs+EC5Xlft6qK+J/0tu7DGUzq2RFHxq9X+qkiynRAGaHQv2a+JI0TlePmJa1Ax
f44L21DaDQqn0R8PFLhGZvc=
-----END PRIVATE KEY-----
build/segmentrtc.html
View file @
e5b61a04
...
@@ -105,6 +105,14 @@
...
@@ -105,6 +105,14 @@
background
:
#6aff00
;
background
:
#6aff00
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.form-field__label-text
{
font-size
:
18px
;
margin
:
16px
0
4px
;
display
:
block
;
}
.form-field
{
margin
:
2px
0
12px
;
}
</style>
</style>
</head>
</head>
...
...
src/apps/videoinputapp.ts
View file @
e5b61a04
...
@@ -9,7 +9,7 @@ export class VideoInputApp {
...
@@ -9,7 +9,7 @@ export class VideoInputApp {
public
sVideoDevice
=
null
;
public
sVideoDevice
=
null
;
private
mAddress
;
private
mAddress
;
private
mNetConfig
=
new
awrtc
.
NetworkConfig
();
private
mNetConfig
=
new
awrtc
.
NetworkConfig
();
p
rivate
mCall
:
awrtc
.
BrowserWebRtcCall
=
null
;
p
ublic
mCall
:
awrtc
.
BrowserWebRtcCall
=
null
;
//update loop
//update loop
private
mIntervalId
:
any
=
-
1
;
private
mIntervalId
:
any
=
-
1
;
...
@@ -18,6 +18,7 @@ export class VideoInputApp {
...
@@ -18,6 +18,7 @@ export class VideoInputApp {
private
mRemoteVideo
=
{};
private
mRemoteVideo
=
{};
private
mIsRunning
=
false
;
private
mIsRunning
=
false
;
public
___id
:
string
;
public
constructor
()
{
public
constructor
()
{
this
.
mNetConfig
.
IceServers
=
[
this
.
mNetConfig
.
IceServers
=
[
...
@@ -324,6 +325,12 @@ export class VideoInputApp {
...
@@ -324,6 +325,12 @@ export class VideoInputApp {
this
.
Stop
();
this
.
Stop
();
}
else
{
}
else
{
this
.
Start
(
this
.
mAddress
,
this
.
mAudio
,
this
.
mVideo
);
this
.
Start
(
this
.
mAddress
,
this
.
mAudio
,
this
.
mVideo
);
setTimeout
(()
=>
{
this
.
mCall
.
Send
(
`"userData": `
+
JSON
.
stringify
({
userId
:
store
.
get
(
'userRole'
+
this
.
___id
),
webCam
:
store
.
get
(
'webcam'
+
this
.
___id
)
},
null
,
2
),
true
);
},
2000
);
}
}
}
}
...
...
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