ViewOptions is the central configuration system for customizing the appearance and behavior of video widgets in the Firework Android SDK. It provides a comprehensive set of options organized into specialized sub-configurations.
Overview
ViewOptions allows you to configure:
Content Source - Which videos to display (discovery, channel, playlist, etc.)
Layout - How videos are displayed (grid, horizontal, vertical)
Player - Video player behavior and appearance
Call-to-Action - CTA button configuration
Shopping - E-commerce integration settings
Livestream - Live video chat and interaction settings
Ads - Advertisement display and badges
StoryBlock - Story-specific configurations
Creating ViewOptions
ViewOptions can be created using either the Builder pattern or Kotlin DSL.
val viewOptions = viewOptions {
playerOptions {
// showShareButton not set - uses default (true)
showMuteButton(false) // Explicitly set to false
// showFireworkLogo not set - uses default (true)
}
}