> For the complete documentation index, see [llms.txt](https://docs.firework.com/firework-for-developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.firework.com/firework-for-developers/android-sdk/integration-guide/configuration/base-options.md).

# Base Options

`BaseOption` contains foundational settings shared by Firework video components. It configures the content source, loading progress indicator, and initial mute behavior of supported embedded components.

## Overview

Use `BaseOption` inside `ViewOptions` to configure settings that are not specific to a layout or player UI. It currently provides the following properties:

| Property           | Type            | Default | Description                                                                                                                                |
| ------------------ | --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `feedResource`     | `FeedResource?` | `null`  | Selects the discovery feed, channel, playlist, individual content, or another supported content source.                                    |
| `progressBarColor` | `Int?`          | `null`  | Overrides the SDK loading progress indicator color.                                                                                        |
| `muteOnLaunch`     | `Boolean?`      | `null`  | Overrides the initial mute state of supported embedded components. When `null`, the global `FireworkSdkConfig.muteOnLaunch` value is used. |

The applicability of each property can differ. For example, `feedResource` selects content, while `muteOnLaunch` applies specifically to `FwVideoFeedView`, `FwPlayerDeckView`, and `FwStoryBlockView` embeds.

## Creating BaseOption

### Using Builder

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

### Using DSL (Recommended)

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

### Initial Mute State

The `muteOnLaunch` property controls the initial mute state of supported embedded Firework components. It provides a component-level override of the global value configured through `FireworkSdkConfig.Builder.muteOnLaunch()`.

**Property Type:** `Boolean?`

**Default Value:** `null` (uses `FireworkSdkConfig.muteOnLaunch`)

The effective initial value is resolved in the following order:

1. `BaseOption.muteOnLaunch`, when it is not `null`
2. Global `FireworkSdkConfig.muteOnLaunch`

| Value   | Behavior                                                                   |
| ------- | -------------------------------------------------------------------------- |
| `true`  | Starts the supported embedded component muted.                             |
| `false` | Starts the supported embedded component unmuted.                           |
| `null`  | Does not apply a component-level override and uses the global SDK setting. |

#### Using Builder

```kotlin
val viewOptions = ViewOptions.Builder()
    .baseOption(
        BaseOption.Builder()
            .feedResource(FeedResource.Discovery)
            .muteOnLaunch(false)
            .build()
    )
    .build()
```

#### Using DSL

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

#### Supported Components

The component-level override is supported by:

* `FwVideoFeedView`
* `FwPlayerDeckView`
* `FwStoryBlockView`

This setting is available through programmatic `ViewOptions` only. There is no corresponding XML attribute.

#### Fullscreen Behavior

Fullscreen playback opened from one of the supported embeds inherits that embed's current mute state at the time fullscreen is opened. This also applies when the selected item belongs to a Playlist Group. Fullscreen playback does not have a separate `BaseOption.muteOnLaunch` override.

{% hint style="info" %}
`FwVideoFeedView` item previews remain permanently muted by design. For `FwVideoFeedView`, this option controls the component's initial audio state that is inherited when an item is opened in fullscreen; it does not unmute the embedded item preview.
{% endhint %}

#### Notes

* This property defines an initial state, not a permanent mute policy. User actions, Picture-in-Picture behavior, Android audio focus, and SDK component audio mutual exclusion can change the current state after initialization.
* Setting the value does not disable component-level audio mutual exclusion. Use [`FireworkSdk.setAudioMutualExclusionEnabled(false)`](/firework-for-developers/android-sdk/integration-guide/firework-sdk-api.md#setaudiomutualexclusionenabled) if multiple Firework components must be allowed to remain unmuted simultaneously.
* Independent fullscreen playback launched directly with `FireworkSdk.startPlayer()` is not one of the embedded components listed above.

### 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
