# addTrack is throw error at setLocalDescription

**URL:** <https://community.wowza.com/t/addtrack-is-throw-error-at-setlocaldescription/94626>\
**Category:** Wowza Streaming Engine\
**Created:** [February 22, 2022, 2:37am UTC](https://community.wowza.com/t/addtrack-is-throw-error-at-setlocaldescription/94626 "2022-02-22T02:37:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cathy\_lee](https://avatars.discourse-cdn.com/v4/letter/c/ecb155/32.png) [@cathy\_lee](https://community.wowza.com/u/cathy_lee)\
**Post date:** [February 22, 2022, 2:37am UTC](https://community.wowza.com/t/addtrack-is-throw-error-at-setlocaldescription/94626/1 "2022-02-22T02:37:23Z")

</div>

I’d like to change the video track as a canvas stream track at the same stream.  
and I’ve followed sample Wowza webrtc code.

```auto
const stream = canvas.value.captureStream(30);
const videoTrack = stream.getVideoTracks()[0];
this.videoSender = this.peerConnection.addTrack(videoTrack)

```

but it throws

```auto
Error: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local offer sdp: Failed to set local video description recv parameters for m-section with mid='2'.

```

Does anyone know this issue? and solved?
