Commit dec313d8 authored by Tom JORQUERA's avatar Tom JORQUERA
Browse files

Merge branch 'master' into 'master'

client: add libArchive feature

Closes #4 and #14

See merge request !17
parents 1b568488 4c27cd30
'use strict';
/* global robotLib:true XMLHttpRequest */
robotLib.archive = function (config) {
return {
store(transcript) {
const xmlhttp = new XMLHttpRequest();
xmlhttp.open('POST', config.archive + '/json-handler');
xmlhttp.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
xmlhttp.send(JSON.stringify(transcript));
}
};
};
'use strict';
describe('client/lib/stt', () => {
beforeEach(() => {
global.robotLib = {};
/* eslint-disable import/no-unassigned-import */
require('./archive.js');
/* eslint-enable */
});
test('should define robotLib.archive', () => {
expect(global.robotLib.archive).toBeDefined();
});
});
......@@ -20,6 +20,7 @@ robot = {
start: () => {
robotController.external.load(config);
robotLib.stt = robotLib.stt(config);
robotLib.archive = robotLib.archive(config);
robotController.onAttendeePush = (e, data) => {
const stream = robotController.getRemoteStream(data.easyrtcid);
......
......@@ -32,7 +32,8 @@ describe('client/robot', () => {
global.robotLib.sttDataSent.push(data);
}
})
})
}),
archive: () => ({})
};
/* eslint-disable import/no-unassigned-import */
......
......@@ -20,5 +20,6 @@
"name": "hublot",
"gstreamerURL": "ws://localhost:8888",
"externalLibs": []
"archive": "http://localhost:8080/api"
}
}
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