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

val baseOption = BaseOption.Builder()
    .feedResource(FeedResource.Discovery)
    .build()
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

Using DSL

Parameters

Parameter
Type
Required
Description

progressBarColor

Int?

No

The color integer for the loading progress bar. Use Color.parseColor(), ContextCompat.getColor(), or a color resource.

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.

Parameters:

  • channelId - Encoded channel identifier (required, non-empty)

Use Cases:

  • Brand-specific content

  • Creator channels

  • Category-specific videos

👉 See detailed Channel Feed guide

Playlist Feed

Shows videos from a specific playlist within a channel.

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

Single Content

Displays a single video or livestream.

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

SKU Feed

Shows videos associated with specific product SKUs.

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

Channel Hashtag Feed

Displays videos from a channel filtered by hashtag expressions.

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

Discovery Feed

Shows curated discovery content from the Firework platform.

Use Cases:

  • Homepage video feed

  • Explore section

  • General content discovery

👉 See detailed Discovery Feed guide

Dynamic Content Feed

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

Parameters:

  • channelId - Encoded channel identifier (required, non-empty)

  • parameters - Map of parameter keys to value lists (required)

👉 See detailed Dynamic Content Feed guide

Share URL Feed

Displays content from a Firework share URL.

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.

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:

See Also

Last updated

Was this helpful?