# There is no producer id when creating client producer

**URL:** <https://mediasoup.discourse.group/t/there-is-no-producer-id-when-creating-client-producer/4174>\
**Category:** mediasoup libraries\
**Created:** [May 16, 2022, 12:51pm UTC](https://mediasoup.discourse.group/t/there-is-no-producer-id-when-creating-client-producer/4174 "2022-05-16T12:51:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Galadrim](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@Galadrim](https://mediasoup.discourse.group/u/Galadrim)\
**Post date:** [May 16, 2022, 12:51pm UTC](https://mediasoup.discourse.group/t/there-is-no-producer-id-when-creating-client-producer/4174/1 "2022-05-16T12:51:39Z")

</div>

Hi, I have been working with mediasoup for some time, and so far I have never had a problem with this particular thing.

I am creating a client video producer and when I try to access its id there is undefined.  
When I do it with camera or when screen sharing it’s always there but I want to produce video from video html tag. It’s looks something like this:

```auto
          const videoElement = document.getElementById("" + videoId);
          const videoTrack = videoElement.captureStream().getVideoTracks()[0];
          let producer = await this.sendTransport.produce({ track: videoTrack });
          console.log("producer", producer);
          console.log("producerId", producer.id);

```

And my producer object looks just fine, except id is undefined.

To give a little bit of background. I want to consume video from one mediasoup server and send it to another server.  
So, I am displaying consumed video in html tag, and then using capture stream I produce this video to another server

---

<div class="post-metadata">

**Author:** ![snnz](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/snnz/32/693_2.png) [@snnz](https://mediasoup.discourse.group/u/snnz)\
**Post date:** [May 16, 2022, 5:47pm UTC](https://mediasoup.discourse.group/t/there-is-no-producer-id-when-creating-client-producer/4174/2 "2022-05-16T17:47:31Z")

</div>

mediasoup-client simply assigns to producer’s `id` whatever it receives as an argument of the `callback` function, called from the handler of the ‘`produce`’ message. Check what you receive from signaling and pass to that callback. There must be an error.
