How can i show all the Consumers Video/Audio to Producer?

In my case, i have only one producer (Teacher) and N- Consumers(Students). I can able to produce the video and audio from the Teacher and stundets can able to see the video.

Now i need to display all the consumers video to the producer? Can i do transport.produce(params) from Consumer(Student) to the Producer ? and consume the video in producer(Teacher) end?

Why would you say that that’s not possible? Based on what?

Get all the consumers video and audio to the producer.

For this can i again send (produce) the video and audio to producer by creating the new transport or else any other way?

Video and audio is always flowing from producers to consumers. If you have done it once, do the same flow again in the other direction. I really don’t understand your question.

He has probably used an existing mediasoup based application and wants to modify its behavior without really understanding how mediasoup works.

Thanks for the reply.

Created one producer transporter and sending video and audio produce to server and Consume the video and audio in the Consumer(student side) and display the video and audio.

Now i need to show all the joined peers(Consumers) video to producer.

So just do it as you did the other thing.

 async consumerTransport(){
      await this.socket.emit('CREATE_CONSUMER_TRANSPORT', {
        forceTcp: false,
      }, async (response) =>{
        console.log('Create', JSON.parse(response))
        this.consumeTransport = this.device.createRecvTransport(JSON.parse(response));
        console.log('Transport', this.consumeTransport)
        this.consumeTransport.on('connect', async ({ dtlsParameters }, callback) => {
          console.log('dtlsparams', dtlsParameters)
          this.socket.emit('CONNECT_CONSUMER_TRANSPORT', { dtlsParameters, transportId: this.consumeTransport.id }, (consumeData) => { console.log(consumeData) })
            callback()
        });
        this.consumeTransport.on('connectionstatechange', async (state) => {
          switch (state) {
            case 'connecting':
              console.log('subscribing....')
            break;

            case 'connected':
              setTimeout(() => {
                console.log('subscribed....')
                // this.$refs.remoteVideo.srcObject = this.track
                // this.$refs.remoteVideo.muted = true
                this.socket.emit('RESUME_CONSUMERS_FOR_PEER', JSON.stringify({consumersToBeResumed: this.sessionIds}), async (response) =>{
                  console.log('Resume ===>', response)
                })
              }, 2000) 
            break;

            case 'failed':
              this.consumeTransport.close();
              console.log('Failed')
            break;

            default: break;
          }
        });
      })
    },

From Consumers to producer: Consuming the video and audio using above code. After joining the consumer i can call the above method. Did i done any mistake?

Socket was disconnected when i call the above method. Need to consume the video from the consumer to producer.