# Base Options

`BaseOption` configures the content source for video widgets, determining which videos are displayed. It specifies the `feedResource` property that defines where videos come from.

## Overview

`BaseOption` is the foundation for content configuration. Every video widget needs to know what content to display, whether it's discovery videos, a specific channel, a playlist, or other content types.

## Creating BaseOption

### Using Builder

```kotlin
val baseOption = BaseOption.Builder()
    .feedResource(FeedResource.Discovery)
    .build()
```

### Using DSL (Recommended)

```kotlin
val viewOptions = viewOptions {
    baseOptions {
        feedResource(FeedResource.Discovery)
    }
}
```

### Progress Bar Color

The `progressBarColor` property allows you to customize the color of the loading progress indicator displayed while videos are loading.

**Property Type:** `Int?` (Android color integer)

**Default Value:** `null` (uses the SDK's default color)

#### Using Builder

```kotlin
val baseOption = BaseOption.Builder()
    ...//other configuration
    .progressBarColor(Color.parseColor("#FF5733"))
    .build()
```

#### Using DSL

```kotlin
val viewOptions = viewOptions {
    baseOptions {
        progressBarColor(ContextCompat.getColor(context, R.color.your_custom_color))
    }
}
```

#### Parameters

<table><thead><tr><th width="194.39453125">Parameter</th><th width="142.234375">Type</th><th width="116.73046875">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>progressBarColor</code></td><td><code>Int?</code></td><td>No</td><td>The color integer for the loading progress bar. Use <code>Color.parseColor()</code>, <code>ContextCompat.getColor()</code>, or a color resource.</td></tr></tbody></table>

#### Use Cases

* Brand customization to match your app's theme
* Improved visual consistency across the app
* Enhanced user experience with themed loading indicators

#### Notes

* The progress bar appears during video thumbnail loading in feed views
* This color is applied across `FwVideoFeedView`, `FwStoryBlockView`, and fullscreen player views
* When `null`, the SDK uses its default progress bar color

## FeedResource Types

The `feedResource` property accepts various `FeedResource` types, each designed for different content sources.

### Channel Feed

Displays all videos from a specific channel.

```kotlin
baseOptions {
    feedResource(
        FeedResource.Channel(
            channelId = "your_encoded_channel_id"
        )
    )
}
```

**Parameters:**

* `channelId` - Encoded channel identifier (required, non-empty)

**Use Cases:**

* Brand-specific content
* Creator channels
* Category-specific videos

👉 [See detailed Channel Feed guide](/firework-for-developers/android-sdk/integration-guide/feed-sources/channel-feed.md)

### Playlist Feed

Shows videos from a specific playlist within a channel.

```kotlin
baseOptions {
    feedResource(
        FeedResource.Playlist(
            channelId = "your_encoded_channel_id",
            playlistId = "your_encoded_playlist_id"
        )
    )
}
```

**Parameters:**

* `channelId` - Encoded channel identifier (required, non-empty)
* `playlistId` - Encoded playlist identifier (required, non-empty)

**Use Cases:**

* Curated video collections
* Featured content
* Topic-specific playlists
* Seasonal content

👉 [See detailed Playlist Feed guide](/firework-for-developers/android-sdk/integration-guide/feed-sources/playlist-feed.md)

### Single Content

Displays a single video or livestream.

```kotlin
baseOptions {
    feedResource(
        FeedResource.SingleContent(
            contentId = "your_encoded_content_id"
        )
    )
}
```

**Parameters:**

* `contentId` - Encoded video identifier (required, non-empty)

**Use Cases:**

* Featured video
* Video details page
* Direct video links
* Specific content promotion

👉 [See detailed Single Content Feed guide](/firework-for-developers/android-sdk/integration-guide/feed-sources/single-content-feed.md)

### SKU Feed

Shows videos associated with specific product SKUs.

```kotlin
baseOptions {
    feedResource(
        FeedResource.Sku(
            channelId = "your_encoded_channel_id",
            productIds = listOf("product_1", "product_2", "product_3")
        )
    )
}
```

**Parameters:**

* `channelId` - Encoded channel identifier (required, non-empty)
* `productIds` - List of product identifiers (required, non-empty)

**Use Cases:**

* Product detail pages
* Related video content
* Shopping experiences
* Product-specific videos

👉 [See detailed SKU Feed guide](/firework-for-developers/android-sdk/integration-guide/feed-sources/sku-feed.md)

### Channel Hashtag Feed

Displays videos from a channel filtered by hashtag expressions.

```kotlin
baseOptions {
    feedResource(
        FeedResource.ChannelHashtag(
            channelId = "your_encoded_channel_id",
            hashtagFilterExpression = "(or food art cats pets beauty fashion travel)"
        )
    )
}
```

**Parameters:**

* `channelId` - Encoded channel identifier (required, non-empty)
* `hashtagFilterExpression` - Hashtag filter query (required)

**Use Cases:**

* Topic-specific content
* Campaign videos
* Trend-based feeds
* Filtered channel content

👉 [See detailed Hashtag Playlist Feed guide](/firework-for-developers/android-sdk/integration-guide/feed-sources/hashtag-playlist-feed.md)

### Discovery Feed

Shows curated discovery content from the Firework platform.

```kotlin
baseOptions {
    feedResource(FeedResource.Discovery)
}
```

**Use Cases:**

* Homepage video feed
* Explore section
* General content discovery

👉 [See detailed Discovery Feed guide](/firework-for-developers/android-sdk/integration-guide/feed-sources/discovery-feed.md)

### Dynamic Content Feed

Displays videos based on dynamic parameters (cohort-based targeting).

```kotlin

val dynamicContentParameters = mapOf(
    "<cohort key>" to listOf("<cohort value 1>", "<cohort value 2>"),
)

baseOptions {
    feedResource(
        FeedResource.DynamicContent(
            channelId = "your_encoded_channel_id",
            parameters = dynamicContentParameters
        )
    )
}
```

**Parameters:**

* `channelId` - Encoded channel identifier (required, non-empty)
* `parameters` - Map of parameter keys to value lists (required)

👉 [See detailed Dynamic Content Feed guide](/firework-for-developers/android-sdk/integration-guide/feed-sources/dynamic-content-feed.md)

### Share URL Feed

Displays content from a Firework share URL.

```kotlin
baseOptions {
    feedResource(
        FeedResource.ShareUrl(
            url = "https://firework.tv/share/xyz"
        )
    )
}
```

**Parameters:**

* `url` - Firework share URL (required, non-empty)

**Use Cases:**

* Shared video links
* Deep link handling
* Social media shares
* External referrals

### Video Ads

Displays video advertisements using VAST XML.

```kotlin
baseOptions {
    feedResource(
        FeedResource.VideoADs(
            channelId = "your_encoded_channel_id",
            vastXml = "<VAST>...</VAST>"
        )
    )
}
```

**Parameters:**

* `channelId` - Encoded channel identifier (required, non-empty)
* `vastXml` - VAST XML string (required, non-empty)

**Use Cases:**

* Advertisement content
* Sponsored videos
* Video ad campaigns

## Important Notes

* All channel IDs and content IDs must be encoded values provided by Firework
* Empty strings will throw an exception during initialization
* `Discovery` is a singleton object, other types are data classes
* Some feed types (like SKU, DynamicContent) require specific backend configuration
* Feed resources are serializable and can be passed between activities

## Validation

All FeedResource types validate their required parameters:

```kotlin
// This will throw an exception
FeedResource.Channel(channelId = "") // Error: "Provided channel ID is empty"

// This will throw an exception
FeedResource.Sku(
    channelId = "valid_id",
    productIds = emptyList() // Error: "Provided list of product ids is empty"
)

// Valid usage
FeedResource.Channel(channelId = "abc123") // OK
FeedResource.Sku(
    channelId = "abc123",
    productIds = listOf("sku1", "sku2") // OK
)
```

## See Also

* [ViewOptions Overview](/firework-for-developers/android-sdk/integration-guide/configuration.md) - Complete configuration system
* [Feed Sources](/firework-for-developers/android-sdk/integration-guide/feed-sources.md) - Detailed guide for each feed type
* [LayoutOption](/firework-for-developers/android-sdk/integration-guide/configuration/layout-options.md) - How videos are displayed
* [FwVideoFeedView](/firework-for-developers/android-sdk/integration-guide/configure-video-feed.md) - Video feed widget
* [FireworkSdk.startPlayer](/firework-for-developers/android-sdk/integration-guide/fullscreen-player.md) - Fullscreen player


---

# 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/configuration/base-options.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.
