# 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

```lua
bridge.advertisement.is_banner_supported()
```

{% 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.

```lua
local bridge = require("bridge.bridge")

function init(self)
	local position = "bottom" -- optional, "top" | "bottom", default = "bottom"
	local placement = "test_placement" -- optional
	bridge.advertisement.show_banner(position, placement)
end
```

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

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

```lua
bridge.advertisement.hide_banner()
```

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

Monitor the state of the banner ad to manage its display and troubleshoot issues.

```lua
bridge.advertisement.banner_state()
```

```lua
local bridge = require("bridge.bridge")

function init(self)
	bridge.advertisement.on("banner_state_changed", function (_, state)
		print("Banner state changed: ", state)
	end)
end
```

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