Send appData when creating a producer

Hello everyone!

I am creating a video producer, and I want to add an additional parameter inside the appData attribute to differentiate the video tracks between “video” and “screen”

Example:

params.appData = {
mediaType: type
}

producer = await this.producerTransport.produce (params)

Using mediasoupclient it is generated correctly, but on the server side the record of the new producer remains, but the mediaType parameter added in appData is not stored.

what I want to achieve is to differentiate the video producers (kind = “video”) between mediaType “videoType” and “screenType” to display in video player on other users differently.

I hope you can help me see what is the correct way to achieve this,

thanks

Hola. In English, please :slight_smile:

Thanks for answering.

Hello everyone!

I am creating a video producer, and I want to add an additional parameter inside the appData attribute to differentiate the video tracks between “video” and “screen”

Example:

params.appData = {
mediaType: type
}

producer = await this.producerTransport.produce (params)

Using mediasoupclient it is generated correctly, but on the server side the record of the new producer remains, but the mediaType parameter added in appData is not stored.

what I want to achieve is to differentiate the video producers (kind = “video”) between mediaType “videoType” and “screenType” to display in video player on other users differently.

I hope you can help me see what is the correct way to achieve this,

thanks

If you are not creating the Producer in server side by passing it the appData then there won’t be any appData. No magic here. Ensure you are transmitting such an appData to the server and to the transport.produce() call in server side.

hanks, it was not in the appData parameters in the emit, thanks for your clarification,

I work perfectly.

Thank you,

Actually it’s in the transport “produce” event: