# EmbeddedClient.on() and .off() listener

**URL:** <https://devforum.zoom.us/t/embeddedclient-on-and-off-listener/104763>\
**Category:** Meeting SDK\
**Tags:** sdk\
**Created:** [February 29, 2024, 11:14am UTC](https://devforum.zoom.us/t/embeddedclient-on-and-off-listener/104763 "2024-02-29T11:14:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amotsikulashvili](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@amotsikulashvili](https://devforum.zoom.us/u/amotsikulashvili)\
**Post date:** [February 29, 2024, 11:14am UTC](https://devforum.zoom.us/t/embeddedclient-on-and-off-listener/104763/1 "2024-02-29T11:14:29Z")

</div>

**Description**  
I use .on(“user-updated”) method but when the listener .on(“connection-change”) with payload.state === ‘Closed’ I want to call .off(“user-updated”) but it does not perform anything.

_Details on your question, workflow or the problem you’re trying to solve._

```auto
// this listener is hiring
 this.client.on('user-updated', () => {
// some code that works
    });
    
//also hiring
this.client.on('connection-change', (connection) => {
      console.log(connection);
      if (connection.state === 'Closed') {
//does not work
        this.client.off('user-updated', () => console.log('meeting stopped'));
      }
    });

```

Also I tried to perform off(‘user-updated’) below its on - pair - but unfortunately it does not work.

I’m working via “@zoom/meetingsdk”: “^3.1.6”,
