Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
LINAGORA
L
LGS
Labs
hublot
Commits
4817442a
Commit
4817442a
authored
Nov 07, 2017
by
Tom JORQUERA
Browse files
Merge branch '52-split-robot-js-for-test' into 'master'
selenium arg give has argument Closes
#52
See merge request
!44
parents
a5012f1f
283ae9d5
Pipeline
#5067
passed with stage
in 48 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
16 deletions
+23
-16
client/robot/robot.js
client/robot/robot.js
+14
-13
lib/runner.js
lib/runner.js
+9
-3
No files found.
client/robot/robot.js
View file @
4817442a
...
...
@@ -25,12 +25,10 @@
/* global robot:true robotController robotLib MediaRecorder */
/* exported robot */
const
room
=
arguments
[
0
];
const
config
=
arguments
[
1
];
robotController
.
external
.
load
(
config
);
robot
=
{
// The variable 'room' and 'clientConfig' will be initialized at the call of start function
room
:
''
,
clientConfig
:
{},
previousReco
:
[],
recordedParticipantsWS
:
{},
participantsMediaRecorders
:
{},
...
...
@@ -88,7 +86,7 @@ robot = {
console
.
log
(
formattedReco
);
if
(
formattedReco
!==
''
)
{
robotController
.
sendMessage
(
config
.
name
,
config
.
avatar
,
formattedReco
);
robotController
.
sendMessage
(
robot
.
config
.
name
,
robot
.
config
.
avatar
,
formattedReco
);
}
},
...
...
@@ -97,7 +95,7 @@ robot = {
console
.
log
(
'
>
'
+
e
.
text
);
robotLib
.
reco
.
send
(
{
from
:
room
,
from
:
robot
.
room
,
text
:
e
.
from
+
'
\t
'
+
e
.
until
+
'
\t
'
+
easyrtcid
+
'
\t
'
+
e
.
text
});
});
...
...
@@ -149,10 +147,13 @@ robot = {
}
},
start
:
()
=>
{
robotLib
.
stt
=
robotLib
.
stt
(
config
);
robotLib
.
reco
=
robotLib
.
reco
(
config
);
robotLib
.
archive
=
robotLib
.
archive
(
config
);
start
:
(
room
,
clientConfig
)
=>
{
robot
.
room
=
room
;
robot
.
clientConfig
=
clientConfig
;
robotLib
.
stt
=
robotLib
.
stt
(
robot
.
clientConfig
);
robotLib
.
reco
=
robotLib
.
reco
(
robot
.
clientConfig
);
robotLib
.
archive
=
robotLib
.
archive
(
robot
.
clientConfig
);
robotController
.
onAttendeePush
=
(
e
,
data
)
=>
{
if
(
data
.
easyrtcid
===
robotController
.
getMyId
())
{
...
...
@@ -174,7 +175,7 @@ robot = {
onConnection
:
()
=>
{
const
recoStartRetry
=
()
=>
{
if
(
robotLib
.
reco
.
start
(
room
))
{
if
(
robotLib
.
reco
.
start
(
robot
.
room
))
{
clearInterval
(
robot
.
recoInterval
);
}
};
...
...
@@ -182,7 +183,7 @@ robot = {
robot
.
intervalList
.
push
(
robot
.
recoInterval
);
robot
.
intervalList
.
push
(
setInterval
(()
=>
robotLib
.
reco
.
getOnlineReco
(
room
)
setInterval
(()
=>
robotLib
.
reco
.
getOnlineReco
(
robot
.
room
)
.
then
(
robot
.
processReco
)
.
catch
(
console
.
error
),
8000
));
...
...
lib/runner.js
View file @
4817442a
...
...
@@ -42,13 +42,19 @@ module.exports = config => ({
.
then
(()
=>
resolveSequentially
(
f
=>
client
.
execute
(
f
,
room
,
clientConfig
),
controllerFilesList
))
.
then
(()
=>
console
.
log
(
'
runner: modules resolved
'
))
.
then
(()
=>
client
.
execute
(()
=>
{
.
then
(()
=>
client
.
execute
(
clientConfig
=>
/* eslint-disable no-undef */
robotController
.
external
.
load
(
clientConfig
),
clientConfig
)
/* eslint-enable */
)
.
then
(()
=>
console
.
log
(
'
runner: external loaded
'
))
.
then
(()
=>
client
.
execute
((
room
,
clientConfig
)
=>
{
setTimeout
(()
=>
{
/* eslint-disable no-undef */
robot
.
start
();
robot
.
start
(
room
,
clientConfig
);
/* eslint-enable */
},
500
);
}))
}
,
room
,
clientConfig
))
.
then
(()
=>
console
.
log
(
'
runner: robot started
'
))
.
setValue
(
'
#displayname
'
,
clientConfig
.
name
)
.
click
(
'
.btn
'
)
...
...
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