How to update appData in between video Stream

Hey Everyone,

We are building a video conferencing solution using Mediasoup, now I need to apply background filters similar to Google meet,

Idea was to use a webcam producer and use appData object to send the applied filter across the stream,

this._webcamProducer = await this._sendTransport.produce(
				{
					track,
					encodings,
					codecOptions,
					codec,
					appData: appData
				});

Which is working fine also, but is there any method available with which we can update the appData, read the documentation but there is no method available from the client side

Please help, Also, if there are any suggestions then please share that too.

Thanks

Isn’t producer.appData = { foo: 123 } and producer.appData.foo = 123 not good enough?

No, Its not working, data is not being received at consumer on the other side

Of course that doesn’t work. Nowhere in the API docs it is said that whatever you put in producer.appData becomes the appData of the consumers. You just signal it own your own.

Is there any workaround for this?

Yes, of course. Just use producer.setAppDataAndMagicallySignalToOthers(appData), but since such a thing doesn’t exists at all (and we don’t want it to exist) you must signal appData on your own, the same way you signal data to the server when you listen for the sendTransport.on(“produce”) in your client side app.

Ok, Either Signals or Protoo events both of them could work.

Thanks