> For the complete documentation index, see [llms.txt](https://sryvkver.gitbook.io/cobi.bike/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sryvkver.gitbook.io/cobi.bike/namespaces/hub/bell-ringing.md).

# Bell Ringing

If the bell sound is curently played.&#x20;

When the user presses the bell button, it changes to true and back to false when it finished playing.

{% tabs %}
{% tab title="Typescript" %}

```typescript
const onBellRingingChange = (value: boolean, timestamp?: Date) => {
    console.log(value, timestamp);
};

COBI.hub.bellRinging.subscribe(onBellRingingChange);
COBI.hub.bellRinging.unsubscribe(onBellRingingChange);
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const onBellRingingChange = (value, timestamp) => {
    console.log(value, timestamp);
};

COBI.hub.bellRinging.subscribe(onBellRingingChange);
COBI.hub.bellRinging.unsubscribe(onBellRingingChange);
```

{% endtab %}
{% endtabs %}
