Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_this.processToken(token);
if (_this.openvidu.checkSystemRequirements()) {
// Early configuration to deactivate automatic subscription to streams
_this.options = {
sessionId: _this.sessionId,
participantId: token,
metadata: !!metadata ? _this.stringClientMetadata(metadata) : ''
};
_this.connectAux(token).then(function () {
resolve();
})["catch"](function (error) {
reject(error);
});
}
else {
reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' for ' + platform.os.family + ' is not supported in OpenVidu'));
}
});
};
WebRtcStats.prototype.getStatsAgnostic = function (pc, successCb, failureCb) {
var _this = this;
if (platform.name.indexOf('Firefox') !== -1) {
// getStats takes args in different order in Chrome and Firefox
return pc.getStats(null).then(function (response) {
var report = _this.standardizeReport(response);
successCb(report);
})["catch"](failureCb);
}
else if ((platform.name.indexOf('Chrome') !== -1) || (platform.name.indexOf('Opera') !== -1)) {
// In Chrome, the first two arguments are reversed
return pc.getStats(function (response) {
var report = _this.standardizeReport(response);
successCb(report);
}, null, failureCb);
}
};
return WebRtcStats;
getClientInfo() {
return {
date: new Date(),
browserName: platform.name,
osName: platform.os.name,
screenWidth: window.screen.availWidth,
screenHeight: window.screen.availHeight
};
}
public static async generateAndSave(): Promise {
const pairing = new Pairing();
pairing.creationTimestamp = Date.now();
pairing.version = VERSION;
pairing.workstationDeviceIdentifier = await Pairing.getDeviceIdentifier();
pairing.workstationName = platform.name + ' ' + platform.os.family;
pairing.keyPair = await crypto_box_keypair();
await pairing.save();
createQueues(pairing);
return pairing;
}
async function guest() {
const [err, res] = await fetch('guest', {
os: platform.os.family,
browser: platform.name,
environment: platform.description,
});
if (!err) {
action.setGuest(res);
}
}
this.$refs.metamask.$on('shown', () => {
this.isSafari = platform.name.toLowerCase() === 'safari';
});
},
const _isChrome = (): boolean => platform.name === BROWSER_NAME.CHROME || _isElectron();
const _isDesktop = (): boolean => _isElectron() && platform.ua.includes(BROWSER_NAME.WIRE);
componentWillMount: function() {
var supported = ConfigStore.getConfig().supportedWebBrowsers;
var name = platform.name.toLowerCase();
if (!(name in supported)
|| this._compareVersion(platform.version, supported[name].version) < 0) {
this.render = this.renderUnsupportedWebBrowserDialog;
}
},
render() {
const isWebGLSupported = PIXI.utils.isWebGLSupported();
const isEdge = platform.name.match(/edge/gi) !== null;
const showBanner =
(
isWebGLSupported === false ||
isEdge === true ||
this.props.legacyWorkspaceLoaded ||
this.props.hasDeprecatedActivityLayersMessage !== null ||
(SHOW_BANNER === true && this.props.banner !== undefined)
)
&& this.state.bannerDismissed === false
&& window.innerWidth > 768;
let bannerContent;
if (SHOW_BANNER === true) bannerContent = this.props.banner;
else if (isWebGLSupported === false) bannerContent = this.props.bannerWebGL;
else if (this.props.legacyWorkspaceLoaded === true) bannerContent = this.props.bannerLegacyWorkspace;