If I add a filter to a stream and then try to add another filter it produces an error message indicating that is already a filter applied to the stream.
If I try to alter the input to the applyFilter with an array of commands it says it requires an object.
If I try and pass the commands as an array objPublisher.stream.applyFilter(“GStreamerFilter”, [{ command: “textoverlay text=‘Lon: 82.565929, Lat:28.059647’ color=-16711936 valignment=top halignment=right font-desc=‘Verdana 32’” }, { command: “clockoverlay valignment=bottom halignment=right shaded-background=true font-desc=‘Sans, 20’ time-format=’%H:%M:%S UTC’” }] )
I have tried to pass an array like this, but still produces an error
objPublisher.stream.applyFilter([“GStreamerFilter”, { command: “textoverlay text=‘Lon: 82.565929, Lat:28.059647’ color=-16711936 valignment=top halignment=right font-desc=‘Verdana 32’” }], [“GStreamerFilter”, { command: “clockoverlay valignment=bottom halignment=right shaded-background=true font-desc=‘Sans, 20’ time-format=’%H:%M:%S UTC’” }])
I have also tried to add two commands with the ! like this and it pukes.
objPublisher.stream.applyFilter(“GStreamerFilter”, { command: “textoverlay text=‘Lon: 82.565929, Lat:28.059647’ color=-16711936 valignment=top halignment=right font-desc=‘Verdana 32’ ! clockoverlay valignment=bottom halignment=right shaded-background=true font-desc=‘Sans, 20’ time-format=’%H:%M:%S UTC’” })
If having two overlays enabled at the same time is possible in kurento is it possible to just extend the applyFilter method to accept an array of filters to be applied, and or create an applyFilters that accepts an array.
https://docs.openvidu.io/en/2.14.0/api/openvidu-browser/classes/stream.html#applyfilter