Carlos Santos ab0cf2a343 openvidu-components: Added streaming activity
- Added streaming activity panel 
- Added streaming structurals directives
- Added streaming attributes directives
- Added e2e test
- Updated test app

openvidu-components: Updated e2e configuration


openvidu-components: Skipped pro e2e tests


openvidu-components: Allowed streaming for moderators only


openvidu-components: Request MODERATOR connection in testapp


openvidu-components: Fixed streaming signals


openvidu-components: Fixed bug with streaming status


openvidu-components: Fixed streaming button on status failed


openvidu-components: Refactored activities checks


openvidu-components: Forced streaming status to enum value


openvidu-components: Added non available error in streaming activity  

Streaming activity will show paid feature error if the service is not available
openvidu-components: Created and exported streaming error type


openvidu-components: Updated e2e tests


openvidu-components: Updated testapp 


openvidu-components: Enabled streaming input wehn module is disabled


openvidu-components: Updated e2e tests


openvidu-components: Updated docs


openvidu-components: Moved streaming directive to its component 

Moved streaming directive to streaming component instead of activities component 
openvidu-components: Updated testapp 


openvidu-components: Made streaming service public


ci: Send branch name in event dispatch


openvidu-components: Updated test app
2022-12-23 16:19:01 +01:00

67 lines
2.2 KiB
TypeScript

import { Capabilities } from 'selenium-webdriver';
import * as chrome from 'selenium-webdriver/chrome';
import { LAUNCH_MODE } from './config';
interface BrowserConfig {
appUrl: string;
seleniumAddress: string;
browserCapabilities: Capabilities;
browserOptions: chrome.Options;
browserName: string;
}
const chromeArguments = ['--window-size=1024,768', '--use-fake-ui-for-media-stream', '--use-fake-device-for-media-stream'];
const chromeArgumentsCI = [
'--window-size=1024,768',
'--headless',
'--no-sandbox',
'--disable-gpu',
'--disable-popup-blocking',
'--no-first-run',
'--no-default-browser-check',
'--disable-dev-shm-usage',
'--disable-background-networking',
'--disable-default-apps',
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream'
];
const chromeArgumentsWithoutMediaDevices = ['--window-size=1024,768', '--deny-permission-prompts'];
const chromeArgumentsWithoutMediaDevicesCI = [
'--window-size=1024,768',
'--headless',
'--no-sandbox',
'--disable-gpu',
'--disable-popup-blocking',
'--no-first-run',
'--no-default-browser-check',
'--disable-dev-shm-usage',
'--disable-background-networking',
'--disable-default-apps',
'--deny-permission-prompts'
];
export const WebComponentConfig: BrowserConfig = {
appUrl: 'http://localhost:8080/',
seleniumAddress: LAUNCH_MODE === 'CI' ? 'http://localhost:3000/webdriver' : '',
browserName: 'chrome',
browserCapabilities: Capabilities.chrome().set('acceptInsecureCerts', true),
browserOptions: new chrome.Options().addArguments(...(LAUNCH_MODE === 'CI' ? chromeArgumentsCI : chromeArguments))
};
export const AngularConfig: BrowserConfig = {
appUrl: 'http://localhost:4200/#/testing',
seleniumAddress: LAUNCH_MODE === 'CI' ? 'http://localhost:3000/webdriver' : '',
browserName: 'Chrome',
browserCapabilities: Capabilities.chrome().set('acceptInsecureCerts', true),
browserOptions: new chrome.Options().addArguments(...(LAUNCH_MODE === 'CI' ? chromeArgumentsCI : chromeArguments))
};
export function getBrowserOptionsWithoutDevices() {
if(LAUNCH_MODE === 'CI') {
return new chrome.Options().addArguments(...chromeArgumentsWithoutMediaDevicesCI);
} else {
return new chrome.Options().addArguments(...chromeArgumentsWithoutMediaDevices);
}
}