openvidu-browser: fix local StreamPropertyChangedEvent filter (options as object instead of string)

pull/621/head
pabloFuente 2021-03-24 12:15:19 +01:00
parent e59e9033f8
commit faf7f6820b
1 changed files with 5 additions and 4 deletions

View File

@ -293,13 +293,14 @@ export class Stream {
}
logger.info('Applying filter to stream ' + this.streamId);
options = !!options ? options : {};
if (typeof options !== 'string') {
options = JSON.stringify(options);
options = options != null ? options : {};
let optionsString = options;
if (typeof optionsString !== 'string') {
optionsString = JSON.stringify(optionsString);
}
this.session.openvidu.sendRequest(
'applyFilter',
{ streamId: this.streamId, type, options },
{ streamId: this.streamId, type, options: optionsString },
(error, response) => {
if (error) {
logger.error('Error applying filter for Stream ' + this.streamId, error);