Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (typeof this.videoSource === 'string') {
if (!!this.videoSource) {
this.publisherProperties.videoSource = this.videoSource;
} else {
this.publisherProperties.videoSource = undefined;
}
}
try {
this.filter.options = JSON.parse(this.stringOptions);
} catch (e) {
console.error('Invalid JSON object in "Filter options" field');
}
if (!this.filter.type) {
delete this.publisherProperties.filter;
} else {
this.publisherProperties.filter = new Filter(this.filter.type, this.filter.options);
}
return this.publisherProperties;
}