Commit 7c3c5ec5 authored by Tom JORQUERA's avatar Tom JORQUERA
Browse files

Merge branch 'issue-30' into 'master'

client: Hublot no longer record itself

Closes #30

See merge request !24
parents d6347cd2 e46862dc
Pipeline #2055 passed with stage
in 48 seconds
......@@ -13,6 +13,10 @@ robotController = {
chatService: angular.element(document.body).injector().get('chat'),
getMyID: () => {
return easyrtc.myEasyrtcid;
},
getParticipants: () => {
return easyrtc.getRoomOccupantsAsArray(room);
},
......
......@@ -94,6 +94,11 @@ robot = {
8000);
// Record current participants already present in the room
robotController.getParticipants().map(robot.recordParticipant);
// (except the robot itself)
for (const participantId of robotController.getParticipants()) {
if (participantId !== robotController.getMyId()) {
robot.recordParticipant(participantId);
}
}
}
};
......@@ -27,7 +27,12 @@ describe('client/robot', () => {
external: {
load: () => {}
},
getParticipants: () => ['someid1', 'someid2'],
getMyId: () => 'robotId',
getParticipants: () => [
global.robotController.getMyId(),
'someid1',
'someid2'
],
getRemoteStream: id => ({type: 'RemoteStream', id})
};
......@@ -84,6 +89,12 @@ describe('client/robot', () => {
expect(callbackCalled).toBe('somedata');
});
test('should not record itself', () => {
global.robot.start();
expect(global.MediaRecorder.instances)
.not.toHaveProperty(global.robotController.getMyId());
});
test('should start transcribing users already present on `start`', () => {
global.robot.start();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment