> 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/playerdeck-options.md).

# 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

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

#### Using DSL (Recommended)

```kotlin
val viewOptions = viewOptions {
    playerDeckOptions {
        showFullScreenIcon(true)
        showShareButton(true)
        showSubtitle(true)
        socialLinkStyle(SocialLinkStyle(fontSizeSp = 14f, fontWeight = 600))
    }
}
```

### Properties

#### showFullScreenIcon

**Type:** `Boolean`\
**Default:** `true`

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

```kotlin
playerDeckOptions {
    showFullScreenIcon(true)
}
```

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.

```kotlin
playerDeckOptions {
    showShareButton(true)
}
```

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

```kotlin
playerDeckOptions {
    showAddToCart(true)
}
```

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](/firework-for-developers/android-sdk/integration-guide/shoppable-videos/cart-and-checkout.md#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.

```kotlin
playerDeckOptions {
    showSubtitle(true)
}
```

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.

```kotlin
playerDeckOptions {
    subtitleBackgroundColor(0x66121212.toInt())
}
```

#### subtitleTextColor

**Type:** `Int` (ARGB color)\
**Default:** `0xFFFFFFFF` (white)

Text color of the subtitles.

```kotlin
playerDeckOptions {
    subtitleTextColor(0xFFFFFFFF.toInt())
}
```

#### **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`.

```kotlin
import com.firework.common.social.SocialLinkStyle

val playerDeckOption = PlayerDeckOption.Builder()
    .socialLinkStyle(SocialLinkStyle(fontSizeSp = 14f, fontWeight = 600))
    .build()
```

Using the Kotlin DSL:

```kotlin
import com.firework.common.social.SocialLinkStyle

val viewOptions = viewOptions {
    playerDeckOptions {
        socialLinkStyle(SocialLinkStyle(fontSizeSp = 14f, fontWeight = 600))
    }
}
```

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

```kotlin
import com.firework.viewoptions.PlayerDeckAddToCartButtonConfiguration
import com.firework.viewoptions.PlayerDeckCardOption
import com.firework.viewoptions.PlayerDeckLabelConfiguration
import com.firework.viewoptions.PlayerDeckPriceConfiguration
import com.firework.viewoptions.PlayerDeckProductListToggleButtonConfiguration

playerDeckOptions {
    cardOption(
        PlayerDeckCardOption(
            backgroundColor = Color.parseColor("#232426"),
            productNameLabel = PlayerDeckLabelConfiguration(textColor = Color.WHITE),
            priceConfiguration = PlayerDeckPriceConfiguration(
                priceLabel = PlayerDeckLabelConfiguration(textColor = Color.WHITE),
                discountLabel = PlayerDeckLabelConfiguration(textColor = Color.parseColor("#FF4040")),
                originalPriceLabel = PlayerDeckLabelConfiguration(textColor = Color.parseColor("#D3D7DC")),
            ),
            ctaLabel = PlayerDeckLabelConfiguration(textColor = Color.WHITE),
            addToCartButton = PlayerDeckAddToCartButtonConfiguration(
                backgroundColor = Color.WHITE,
                iconColor = Color.BLACK,
            ),
            productListToggleButton = PlayerDeckProductListToggleButtonConfiguration(
                backgroundColor = Color.parseColor("#3F4145"),
                iconColor = Color.WHITE,
            ),
        ),
    )
}
```

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`](#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.

```kotlin
playerDeckOptions {
    borderColor(Color.parseColor("#3F4145"))
}
```

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

```kotlin
val viewOptions = viewOptions {
    baseOptions {
        feedResource(FeedResource.Channel("your_channel_id"))
    }
    playerOptions {
        autoplay(true)
    }
    playerDeckOptions {
        showFullScreenIcon(true)
        showShareButton(true)
    }
}

playerDeckView.init(viewOptions, childFragmentManager)
```

#### PlayerDeck with Subtitles

```kotlin
val viewOptions = viewOptions {
    baseOptions {
        feedResource(FeedResource.Playlist("channel_id", "playlist_id"))
    }
    playerOptions {
        autoplay(true)
    }
    playerDeckOptions {
        showSubtitle(true)
        subtitleTextColor(Color.WHITE)
        subtitleBackgroundColor(Color.parseColor("#88000000"))
    }
}
```

#### PlayerDeck Matching the App's Light and Dark Theme

```kotlin
val isDarkTheme = (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) ==
    Configuration.UI_MODE_NIGHT_YES

val viewOptions = viewOptions {
    baseOptions {
        feedResource(FeedResource.Channel("your_channel_id"))
    }
    playerDeckOptions {
        if (isDarkTheme) {
            borderColor(Color.parseColor("#3F4145"))
            cardOption(
                PlayerDeckCardOption(
                    backgroundColor = Color.parseColor("#232426"),
                    productNameLabel = PlayerDeckLabelConfiguration(textColor = Color.WHITE),
                    priceConfiguration = PlayerDeckPriceConfiguration(
                        priceLabel = PlayerDeckLabelConfiguration(textColor = Color.WHITE),
                        discountLabel = PlayerDeckLabelConfiguration(textColor = Color.parseColor("#FF4040")),
                        originalPriceLabel = PlayerDeckLabelConfiguration(textColor = Color.parseColor("#D3D7DC")),
                    ),
                    ctaLabel = PlayerDeckLabelConfiguration(textColor = Color.WHITE),
                ),
            )
        } else {
            // Light theme: the SDK defaults already match. Set them explicitly so switching back
            // from the dark theme on an already initialized view resets the colors.
            borderColor(PlayerDeckOption.DEFAULT_BORDER_COLOR)
            cardOption(PlayerDeckCardOption())
        }
    }
}

playerDeckView.init(viewOptions, childFragmentManager)
```

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)](/firework-for-developers/android-sdk/integration-guide/shoppable-videos/product-cards.md#product-card-appearance-v2)
* PlayerDeck options only apply to `FwPlayerDeckView`, not other widgets

### See Also

* [ViewOptions Overview](/firework-for-developers/android-sdk/integration-guide/configuration.md) - Complete configuration system
* [FwPlayerDeckView ](/firework-for-developers/android-sdk/integration-guide/01-basic-usage-and-api.md)- PlayerDeck widget guide
* [PlayerOption](/firework-for-developers/android-sdk/integration-guide/configuration/player-options.md) - Player configuration
* [BaseOption](/firework-for-developers/android-sdk/integration-guide/configuration/base-options.md) - Content source configuration
