bigbluebutton-Github/bigbluebutton-tests/puppeteer/webcam/check.js

36 lines
850 B
JavaScript
Raw Normal View History

const Share = require('./share');
const util = require('./util');
class Check extends Share {
constructor() {
2020-06-25 03:51:20 +08:00
super('webcam-check-content-test');
}
async compare() {
try {
await util.enableWebcam(page1, page2);
const respUser = await util.compareWebcamsContents(this);
return respUser === true;
2021-08-26 22:13:18 +08:00
} catch (err) {
await this.logger(err);
return false;
}
}
async test() {
try {
const parsedSettings = await this.getSettingsYaml();
const videoPreviewTimeout = parseInt(parsedSettings.public.kurento.gUMTimeout);
await util.enableWebcam(this, videoPreviewTimeout);
const respUser = await util.webcamContentCheck(this);
return respUser === true;
2021-08-26 22:13:18 +08:00
} catch (err) {
await this.logger(err);
return false;
}
}
}
module.exports = exports = Check;