Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Base Options

BaseOption contains foundational settings shared by Firework video components. It configures the content source, loading progress indicator, initial mute behavior, and content limits of supported 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.

maxItemCount

Int?

null

Limits cards/player pages; see Maximum Item Count.

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

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

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

Using DSL

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.

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.

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) 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.

Maximum Item Count

Available since 6.35.1. BaseOption.maxItemCount limits the cards or player pages in a component or playback session.

Value
Behavior

null (default), zero, or a negative number

No limit.

1–20

Maximum number of cards/pages to display.

Greater than 20

Capped at 20.

This is a programmatic option; there is no XML attribute. It applies to FwVideoFeedView, FwPlayerDeckView, FwStoryBlockView, and fullscreen playback, including direct FireworkSdk.startPlayer(options) launches.

  • Each component/session has its own limit. Child playlist sessions inherit the configured limit.

  • The limit uses the first page and disables subsequent pagination. It does not change the network page size or feed-load callback reporting. A short first page is not filled by fetching more pages.

  • Feed ads and fullscreen interstitial pages consume slots. Fullscreen may therefore show fewer content videos than the feed.

  • Only FwVideoFeedView in GRID layout also expands to content height. Use wrap_content for its height; a fixed parent height still takes precedence. Player Deck, StoryBlock, and other feed layouts retain their sizing behavior.

  • For components that support reinitialization, omitting options retains the current limit. Supplying ViewOptions without a count, or with a null/non-positive count, clears it. An active playback session keeps the limit it had at startup. Follow each component's lifecycle rules.

See Content-height grids for an XML and Kotlin example.

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

Playlist Groups

Configure a group with FeedResource.PlaylistGroup(playlistGroupId). The required ID identifies the group, not a channel or individual playlist. See Playlist Group Feed for a complete example and content-limit behavior.

Last updated

Was this helpful?