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
6ee8abeb
Commit
6ee8abeb
authored
Oct 04, 2021
by
Иван Кубота
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logging
parent
eb814e46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
index.html
build/index.html
+2
-2
videoinputapp.ts
src/apps/videoinputapp.ts
+14
-6
No files found.
build/index.html
View file @
6ee8abeb
...
@@ -307,8 +307,8 @@
...
@@ -307,8 +307,8 @@
<script
src=
"app.js"
></script>
<script
src=
"app.js"
></script>
<script
src=
"./bundle/apps.js"
></script>
<script
src=
"./bundle/apps.js"
></script>
<script>
<script>
window
.
logging
=
function
(
who
,
what
)
{
window
.
logging
=
function
(
msg
)
{
D
.
div
({
renderTo
:
document
.
getElementById
(
'logger'
)},
`id:
${
who
}
, msg:
${
JSON
.
stringify
(
what
)}
`
);
D
.
div
({
renderTo
:
document
.
getElementById
(
'logger'
)},
msg
);
};
};
store
.
set
(
'appLoaded'
,
true
);
store
.
set
(
'appLoaded'
,
true
);
D
.
ext
(
D
(
'.callapp_button'
)[
0
],
{
onclick
:
function
()
{
D
.
ext
(
D
(
'.callapp_button'
)[
0
],
{
onclick
:
function
()
{
...
...
src/apps/videoinputapp.ts
View file @
6ee8abeb
...
@@ -203,12 +203,16 @@ export class VideoInputApp {
...
@@ -203,12 +203,16 @@ export class VideoInputApp {
}
}
else
if
(
args
.
Type
==
awrtc
.
CallEventType
.
Message
)
{
else
if
(
args
.
Type
==
awrtc
.
CallEventType
.
Message
)
{
//no ui for this yet. simply echo messages for testing
//no ui for this yet. simply echo messages for testing
/*let messageArgs = args as awrtc.MessageEventArgs;
let
messageArgs
=
args
as
awrtc
.
MessageEventArgs
;
this.mCall.Send(messageArgs.Content, messageArgs.Reliable, messageArgs.ConnectionId);*/
/*this.mCall.Send(messageArgs.Content, messageArgs.Reliable, messageArgs.ConnectionId);*/
window
[
'logging'
](
`message:
${
JSON
.
stringify
(
messageArgs
.
Content
)}
from:
${
messageArgs
.
ConnectionId
.
id
}
`
);
}
}
else
if
(
args
.
Type
==
awrtc
.
CallEventType
.
DataMessage
)
{
else
if
(
args
.
Type
==
awrtc
.
CallEventType
.
DataMessage
)
{
let
messageArgs
=
args
as
awrtc
.
DataMessageEventArgs
;
window
[
'logging'
](
`data message:
${
JSON
.
stringify
(
messageArgs
.
Content
)}
from:
${
messageArgs
.
ConnectionId
.
id
}
`
);
//no ui for this yet. simply echo messages for testing
//no ui for this yet. simply echo messages for testing
//let messageArgs = args as awrtc.DataMessageEventArgs;
//this.mCall.SendData(messageArgs.Content, messageArgs.Reliable, messageArgs.ConnectionId);
//this.mCall.SendData(messageArgs.Content, messageArgs.Reliable, messageArgs.ConnectionId);
}
}
else
if
(
args
.
Type
==
awrtc
.
CallEventType
.
CallAccepted
)
{
else
if
(
args
.
Type
==
awrtc
.
CallEventType
.
CallAccepted
)
{
...
@@ -221,9 +225,13 @@ export class VideoInputApp {
...
@@ -221,9 +225,13 @@ export class VideoInputApp {
userId
:
store
.
get
(
'userRole'
+
this
.
___id
),
userId
:
store
.
get
(
'userRole'
+
this
.
___id
),
webCam
:
store
.
get
(
'webcam'
+
this
.
___id
)
webCam
:
store
.
get
(
'webcam'
+
this
.
___id
)
};
};
if
(
window
[
'logging'
])
window
[
'logging'
](
messageArgs
.
ConnectionId
,
sendingObj
)
window
[
'logging'
](
`income call id:
${
messageArgs
.
ConnectionId
.
id
}
`
);
this
.
mCall
.
Send
(
JSON
.
stringify
(
sendingObj
),
messageArgs
.
Reliable
,
messageArgs
.
ConnectionId
);
setTimeout
(()
=>
{
window
[
'logging'
](
`send my user data to
${
messageArgs
.
ConnectionId
.
id
}
(
${
JSON
.
stringify
(
sendingObj
)}
)`
);
this
.
mCall
.
Send
(
JSON
.
stringify
(
sendingObj
),
messageArgs
.
Reliable
,
messageArgs
.
ConnectionId
);
},
(
50
+
220
*
Math
.
random
())
|
0
)
/* this.mCall.SendData(JSON.stringify({
/* this.mCall.SendData(JSON.stringify({
userId: store.get('userRole'+this.___id),
userId: store.get('userRole'+this.___id),
webCam: store.get('webcam'+this.___id)
webCam: store.get('webcam'+this.___id)
...
...
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