StoryBlock Options
StoryBlockOption configures behavior specific to FwStoryBlockView. These options control autoplay, fullscreen functionality, appearance, and advanced features unique to the StoryBlock component.
Overview
StoryBlockOption provides configuration for:
Autoplay and autopause behavior
Fullscreen icon visibility
Compact mode sizing
Jetpack Compose integration
Vertical swipe gestures
Immersive mode parameters
Product card visibility in compact mode
Creating StoryBlockOption
Using Builder
val storyBlockOption = StoryBlockOption.Builder()
.enableAutoPlay(true)
.showFullScreenIcon(true)
.enableAutoPause(false)
.build()Using DSL (Recommended)
Properties
enableAutoPlay
Type: Boolean
Default: true
Enable or disable automatic video playback when StoryBlock is initialized.
When enabled:
Video starts playing automatically after initialization
Ideal for story-like experiences
When disabled:
User must tap to start playback
Better for user-controlled experiences
showFullScreenIcon
Type: Boolean
Default: true
Show or hide the fullscreen expansion icon in compact mode.
The fullscreen icon allows users to expand the StoryBlock from compact mode to fullscreen mode.
enableAutoPause
Type: Boolean
Default: false
Automatically pause when StoryBlock finish playing a video.
Note: For most cases, use the pauseWhenNotVisible parameter in FwStoryBlockView.init() instead.
usedOnJetpackCompose
Type: Boolean
Default: false
Enable optimizations when using StoryBlock with Jetpack Compose.
Set to true when integrating StoryBlock in a Compose-based UI for better performance.
enableSmallSizeInCompact
Type: Boolean
Default: false
Use smaller UI elements in compact mode.
Reduces the size of UI controls and elements when the StoryBlock is displayed in compact mode.
handleAppearanceManually
Type: Boolean
Default: false
Manually control appearance/disappearance callbacks.
When enabled, you're responsible for managing visibility state changes.
setImmersiveParam
Type: ImmersiveParam
Default: ImmersiveParam(topControlsInset = 0)
Configure top inset for immersive mode.
Use this to adjust for system UI elements like status bars in immersive fullscreen mode.
enableVerticalSwipe
Type: Boolean
Default: false
Enable vertical swipe gestures to navigate between videos.
When enabled, users can swipe up/down to navigate between videos in the StoryBlock.
isArrowButtonVisible
Type: Boolean
Default: true
Show or hide the arrow buttons used to navigate between videos in the StoryBlock inline view. When visible, users can tap the arrow buttons to switch to the previous or next video without swiping.
Applies to: FwStoryBlockView (inline/compact mode). This is distinct from PlayerOption.isArrowButtonVisible, which controls the arrow buttons in the fullscreen player (PlayerActivity).
Behavior:
true- Arrow navigation buttons are visible in the StoryBlock viewfalse- Arrow buttons are hidden; users must swipe to navigate between videos
showProductCard
Type: Boolean?
Default: null (follows PlayerOption.showProductCard)
Available since: 6.36.1
Show or hide product cards in the compact StoryBlock player, independently of the fullscreen player.
Applies to: FwStoryBlockView (inline/compact mode). The fullscreen player opened from StoryBlock, including playlist groups, follows PlayerOption.showProductCard.
Behavior:
true- Product cards are visible in compact mode when the video has associated productsfalse- Product cards are hidden in compact mode. The video's call-to-action button displayed above the product cards is hidden as wellnull- UsesPlayerOption.showProductCard(defaulttrue), so existing integrations keep their behavior
Default Values
enableAutoPlay
true
showFullScreenIcon
true
enableAutoPause
false
usedOnJetpackCompose
false
enableSmallSizeInCompact
false
handleAppearanceManually
false
immersiveParam
ImmersiveParam(0)
enableVerticalSwipe
false
isArrowButtonVisible
true
showProductCard
null (follows PlayerOption.showProductCard)
Complete Examples
Standard StoryBlock Configuration
Vertical Swipe Navigation
Compose Integration
Immersive Mode with Status Bar
Important Notes
enableAutoPlayaffects initial playback only; users can always control playback aftershowFullScreenIconis only visible in compact modeFullscreen mode provides access to all features (shopping, chat, etc.)
usedOnJetpackComposeshould be enabled for Compose-based UIspauseWhenNotVisibleininit()is preferred overenableAutoPausehandleAppearanceManuallyis for advanced use cases onlyVertical swipe gestures may conflict with scroll views
ImmersiveParamhelps position content correctly under system UIStoryBlock options only apply to
FwStoryBlockView, not other widgets
See Also
ViewOptions Overview - Complete configuration system
FwStoryBlockView - StoryBlock widget guide
PlayerOption - Player configuration
BaseOption - Content source configuration
Last updated
Was this helpful?