# Banner

{% hint style="info" %}
There are some advertisement settings in the `playgama-bridge-config.json` file

[playgama-bridge-config](https://wiki.playgama.com/playgama/sdk/playgama-bridge-config "mention")
{% endhint %}

#### Is Banner Supported <a href="#is-banner-supported" id="is-banner-supported"></a>

Check if the platform supports displaying banner ads. Use this to determine if you can include banner advertisements in your game.

```javascript
bridge.advertisement.isBannerSupported
```

{% hint style="info" %}
Ensure that in-game banners are not displayed during gameplay on CrazyGames. Please refer to [Advertisement - CrazyGames Documentation](https://docs.crazygames.com/requirements/ads/).&#x20;
{% endhint %}

#### Show Banner <a href="#show-banner" id="show-banner"></a>

Display a banner ad within your game to generate revenue through advertising.

```javascript
let position = 'bottom' // optional, 'top' | 'bottom', default = bottom
let placement = 'test_placement' // optional
bridge.advertisement.showBanner(position, placement)
```

#### Hide Banner <a href="#hide-banner" id="hide-banner"></a>

Hide the currently displayed banner ad when it is no longer needed.

```javascript
bridge.advertisement.hideBanner()
```

#### Banner State <a href="#banner-state" id="banner-state"></a>

Monitor the state of the banner ad (loading, shown, hidden, failed) to manage its display and troubleshoot issues.

```javascript
bridge.advertisement.bannerState
```

```javascript
bridge.advertisement.on(EVENT_NAME.BANNER_STATE_CHANGED, this.onBannerStateChanged.bind(this));

onBannerStateChanged(state: BANNER_STATE) {
   console.log('Banner state: ', state)
}
```

Possible values: `loading`, `shown`, `hidden`, `failed`.
