# Configure Video Advertisements

If you're working with another partner who handles the setup and management of your video campaigns, Firework can support displaying those ads and configuring them as well. Our SDK will retrieve the ad videos from your partner and display them in the channel.

Example code snippet for Video Ads Feed and StoryBlock

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

```kotlin
        
val channelId = "Encoded channel id"
val vastXML = "Vast XML"

val viewOptionsForStoryBlock = viewOptions {
    baseOptions {
        feedResource(FeedResource.VideoADs(channelId, vastXML))
    }

    storyBlockOptions {
        showFullScreenIcon(true)
        enableAutoPlay(true)
    }

    playerOptions {
        showCaption(true)
        showPlayPauseButtonInVideo(true)
    }

    adBadgeOptions{
        adBadgeIsHidden(false)
    }
}

val storyBlock = findViewById<FwStoryBlockView> (R.id.storyblock)

storyBlock.init(
    fragmentManager = supportFragmentManager,
    lifecycle = lifecycle,
    viewOptions = viewOptions,
    pauseWhenNotVisible = true,
)
```

{% endtab %}

{% tab title="Java" %}

```java
BaseOption baseOption = new BaseOption.Builder()
    .feedResource(new FeedResource.VideoADs("Encoded channel id", "Vast XML"))
    .build();

LayoutOption layoutOption = new LayoutOption.Builder()
    .feedLayout(FeedLayout.HORIZONTAL)
    .build();

ViewOptions viewOptions = new ViewOptions.Builder()
    .baseOption(baseOption)
    .layoutOption(layoutOption)
    .build();
            
FwStoryBlockView storyBlock = findViewById<FwStoryBlockView>(R.id.storyBlock);

storyBlock.init(getSupportFragmentManager(),getLifecycle(),viewOptions, storyBlockContainer);
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Please refer to the Encoded IDs help article to learn about how to find your encoded channel ID
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.firework.com/firework-for-developers/android-sdk/integration-guide/video-ads-support.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
