Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hublot
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Maxime FRERE
hublot
Commits
c56e7df9
Commit
c56e7df9
authored
Feb 23, 2018
by
Maxime FRERE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use webRTCService instead of easyrtc or easyrtcConnector
parent
0ce98228
Pipeline
#12153
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
client/controller/controller.js
client/controller/controller.js
+4
-4
client/robot/robot.js
client/robot/robot.js
+10
-6
No files found.
client/controller/controller.js
View file @
c56e7df9
...
...
@@ -32,18 +32,18 @@ robotController = {
chatService
:
angular
.
element
(
document
.
body
).
injector
().
get
(
'
chat
'
),
getWebRTCAdapter
:
()
=>
robotController
.
$injector
.
get
(
'
easyRTCAdapter
'
),
getWebRTCAdapter
:
()
=>
robotController
.
$injector
.
get
(
'
webRTCService
'
),
getMyId
:
()
=>
{
return
easyrtc
.
myEasyrtcid
;
return
getWebRTCAdapter
().
myRtcid
()
;
},
getRemoteStream
:
participant
=>
{
return
easyrtc
.
getRemoteStream
(
participant
);
return
getWebRTCAdapter
()
.
getRemoteStream
(
participant
);
},
getRemoteParticipants
:
()
=>
{
const
participants
=
easyrtc
.
getRoomOccupantsAsArray
(
room
);
// Note that room is exposed globally
const
participants
=
getWebRTCAdapter
().
getRemoteRtcIds
(
);
// Note that room is exposed globally
const
res
=
[];
if
(
participants
)
{
for
(
let
i
=
0
;
i
<
participants
.
length
;
i
++
)
{
...
...
client/robot/robot.js
View file @
c56e7df9
...
...
@@ -160,9 +160,11 @@ robot = {
robotLib
.
archive
=
robotLib
.
archive
(
robot
.
clientConfig
);
robotController
.
onAttendeePush
=
(
e
,
data
)
=>
{
if
(
data
.
easyrtcid
!==
robotController
.
getMyId
())
{
robot
.
recordParticipant
(
data
.
easyrtcid
);
}
robotController
.
getMyId
().
then
(
rtcid
=>
{
if
(
data
.
rtcid
!==
rtcid
)
{
robot
.
recordParticipant
(
data
.
rtcid
);
}
});
};
robotController
.
onAttendeeRemove
=
(
e
,
data
)
=>
{
...
...
@@ -191,9 +193,11 @@ robot = {
// Record current participants already present in the room
// (except the robot itself)
for
(
const
participantId
of
robotController
.
getRemoteParticipants
())
{
if
(
participantId
!==
robotController
.
getMyId
())
{
robot
.
recordParticipant
(
participantId
);
}
robotController
.
getMyId
().
then
(
rtcid
=>
{
if
(
participantId
!==
rtcid
)
{
robot
.
recordParticipant
(
participantId
);
}
});
}
// Wait 5 minute before leaving a room if alone
...
...
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