bigbluebutton-Github/bigbluebutton-html5/tests/puppeteer/webcam/share.js

31 lines
841 B
JavaScript
Raw Normal View History

2020-03-05 03:00:45 +08:00
const Page = require('../core/page');
const util = require('./util');
const params = require('../params');
2020-03-05 03:00:45 +08:00
class Share {
2020-03-05 03:00:45 +08:00
constructor() {
this.page1 = new Page();
this.page2 = new Page();
}
async init(meetingId) {
await this.page1.init(Page.getArgsWithVideo(), meetingId, { ...params, fullName: 'Streamer1' });
await this.page2.init(Page.getArgsWithVideo(), this.page1.meetingId, { ...params, fullName: 'Streamer2' });
2020-03-05 03:00:45 +08:00
}
async test() {
await util.enableWebcam(this.page1);
await util.enableWebcam(this.page2);
const responseUser1 = await util.evaluateCheck(this.page1);
const responseUser2 = await util.evaluateCheck(this.page2);
return responseUser1 && responseUser2;
2020-03-05 03:00:45 +08:00
}
async close() {
await this.page1.close();
await this.page2.close();
}
2020-03-05 03:00:45 +08:00
}
module.exports = exports = Share;