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

PlayerDeck Options

PlayerDeckOption configures behavior specific to FwPlayerDeckView. These options control the fullscreen icon, share button, one-tap Add to Cart, subtitle appearance, and the colors of each deck item's product card and border in the inline PlayerDeck feed.

Overview

PlayerDeckOption provides configuration for:

  • Fullscreen icon visibility

  • Share button visibility

  • Subtitle display, text color, and background color

  • Social link text styling

  • Product card colors, for example to match your app's light or dark theme

  • Deck item border color

Creating PlayerDeckOption

Using Builder

val playerDeckOption = PlayerDeckOption.Builder()
    .showFullScreenIcon(true)
    .showShareButton(true)
    .showSubtitle(true)
    .socialLinkStyle(SocialLinkStyle(fontSizeSp = 14f, fontWeight = 600))
    .build()

Properties

showFullScreenIcon

Type: Boolean Default: true

Show or hide the fullscreen expansion icon on each deck item.

When enabled, a fullscreen icon appears on each video card, allowing users to tap it to open the fullscreen player directly.

showShareButton

Type: Boolean Default: true

Show or hide the share button on each deck item.

When enabled, a share button appears on the video card, allowing users to share the video.

showAddToCart

Available since 6.35.1. Type: Boolean; default: false.

The one-tap Add to Cart button also requires a registered Shopping.setOnDeckAddToCartListener. It is offered for available products with a single variant or a backend-selected variant. Multi-variant products without a selection do not offer one-tap add.

Report progress and results through each DeckAddToCartRequest.setStatus. See Player Deck one-tap Add to Cart for the complete listener example and cleanup. The product-detail CTA and card-body click behavior are unchanged.

showSubtitle

Type: Boolean Default: true

Show or hide subtitles on the inline PlayerDeck player.

When enabled, subtitles are displayed over the video during inline playback (if the video has subtitle data available).

subtitleBackgroundColor

Type: Int (ARGB color) Default: 0x66121212 (semi-transparent dark)

Background color of the subtitle overlay.

subtitleTextColor

Type: Int (ARGB color) Default: 0xFFFFFFFF (white)

Text color of the subtitles.

socialLinkStyle

Type: SocialLinkStyle? Default: null (uses the SDK default 12sp text size and 400 font weight)

Configures the text style for social/sponsor links shown in the inline FwPlayerDeckView player. This option only affects PlayerDeck inline UI; fullscreen social link styling is configured through PlayerOption.socialLinkStyle.

Using the Kotlin DSL:

SocialLinkStyle Properties

Property
Type
Default
Description

fontSizeSp

Float?

null

Social link text size in sp units

fontWeight

Int?

null

Social link text weight from 1 to 1000; null keeps the layout default

Note: Passing SocialLinkStyle(fontSizeSp = null, fontWeight = null) does not override the layout text size or font weight. The effective SDK defaults are 12sp and 400.

cardOption

Available since 6.36.2. Type: PlayerDeckCardOption?; default: null (SDK default colors).

Themes the product panel at the bottom of each deck item and the expanded product list, for example to match your app's light or dark mode. The SDK does not follow the system theme on its own: pass the colors for the theme your app is currently using, and rebuild the options when your app's theme changes.

Every property is optional. A property that is not set (or null) keeps the SDK default, so you only need to set the colors you want to change.

PlayerDeckCardOption Properties

Property
Type
Default
Description

backgroundColor

Int?

0xFFFFFFFF (white)

Background of the whole product panel (product card, CTA, and "Tap to Watch" states) and of the expanded product list

productNameLabel

PlayerDeckLabelConfiguration

0xFF000000 (black)

Product name

productSubtitleLabel

PlayerDeckLabelConfiguration

Product name color at 55% opacity

Product subtitle line. This is the product's subtitle, not the video subtitles configured by showSubtitle

priceConfiguration

PlayerDeckPriceConfiguration

See below

Price, discount, and original price

soldOutLabel

PlayerDeckLabelConfiguration

Price color

"Sold Out" label, shown instead of the prices

ctaLabel

PlayerDeckLabelConfiguration

0xFF000000 (black)

Call-to-action text and the "Tap to Watch" text and icon, shown when a video has no products

addToCartButton

PlayerDeckAddToCartButtonConfiguration

See below

One-tap Add to Cart button (see showAddToCart)

productListToggleButton

PlayerDeckProductListToggleButtonConfiguration

See below

Round button that opens the product list (shown when a video has more than one product) and closes it again

PlayerDeckLabelConfiguration

Property
Type
Default
Description

textColor

Int?

null

Text color; null keeps the default of the label it is used for

PlayerDeckPriceConfiguration

Property
Type
Default
Description

priceLabel

PlayerDeckLabelConfiguration

0xFF000000 (black)

Current price

discountLabel

PlayerDeckLabelConfiguration

0xFFB60000 (red)

Discount percentage, for example -25%

originalPriceLabel

PlayerDeckLabelConfiguration

0xFF6B6E73 (gray)

Original price, always shown with a strikethrough

PlayerDeckAddToCartButtonConfiguration

Property
Type
Default
Description

backgroundColor

Int?

0xFF1A1A1A (near black)

Circle background of the "+" button

iconColor

Int?

0xFFFFFFFF (white)

"+" icon color

The success check mark and error cross shown after an add keep their own colors.

PlayerDeckProductListToggleButtonConfiguration

Property
Type
Default
Description

backgroundColor

Int?

0xFFFFFFFF (white)

Circle background of the open and close buttons

iconColor

Int?

0xFF000000 (black)

Arrow color

The close button is shown over the video at the top of the expanded list, so choose a background and icon color that contrast with each other.

Note: If you initialize the same FwPlayerDeckView again with new options and leave cardOption unset, the previously configured card colors are kept. To return to the SDK defaults, pass cardOption(PlayerDeckCardOption()).

borderColor

Available since 6.36.2. Type: Int?; default: null (0xFFE1E4E8, light gray).

Color of the 1px outline drawn around each deck item (video and product panel). The outline follows the item's corner radius. Pass Color.TRANSPARENT to hide it.

If you initialize the same FwPlayerDeckView again with new options and leave borderColor unset, the previously configured color is kept.

Default Values

Property
Default Value

showAddToCart

false (also requires an Add to Cart listener)

showFullScreenIcon

true

showShareButton

true

showSubtitle

true

subtitleBackgroundColor

0x66121212

subtitleTextColor

0xFFFFFFFF

socialLinkStyle

null (uses SDK default 12sp, 400)

cardOption

null (SDK default colors)

borderColor

null (0xFFE1E4E8)

Complete Examples

Standard PlayerDeck Configuration

PlayerDeck with Subtitles

PlayerDeck Matching the App's Light and Dark Theme

Use your app's own theme check if it does not follow the system setting.

Important Notes

  • showFullScreenIcon and showShareButton only affect the inline deck item UI, not the fullscreen player

  • Subtitle options (showSubtitle, subtitleTextColor, subtitleBackgroundColor) control inline playback subtitles; fullscreen subtitle settings are configured via PlayerOption

  • socialLinkStyle only affects inline PlayerDeck social/sponsor link text; fullscreen social link text is configured via PlayerOption.socialLinkStyle

  • cardOption and borderColor only affect the inline deck items and their expanded product list; product cards in the fullscreen player are configured through Product Card Appearance (V2)

  • PlayerDeck options only apply to FwPlayerDeckView, not other widgets

See Also

Last updated

Was this helpful?