Video Player Configuration(Android)
This guide covers player configuration options for all Firework video widgets. These options are set through PlayerOption in ViewOptions and control the video player's behavior, appearance, and features.
For a complete reference of all player options with detailed documentation, see PlayerOption Configuration.
Player Display
Player Mode
Controls how video content is scaled and displayed within the player.
Values:
PlayerMode.FIT_MODE- Video fits within bounds maintaining 9:16 aspect ratio, may have letterboxingPlayerMode.FULL_BLEED_MODE- Video fills the entire screen, may be cropped (default)
val viewOptions = viewOptions {
playerOptions {
playerMode(PlayerMode.FIT_MODE)
}
}
val videoFeedView = findViewById<FwVideoFeedView>(R.id.videoFeedView)
videoFeedView.init(viewOptions)Scrolling Orientation
Controls the swipe direction for navigating between videos in the player.
Values:
ScrollingOrientation.HORIZONTAL- Swipe left/right (default)ScrollingOrientation.VERTICAL- Swipe up/down
UI Element Visibility
Firework Logo
Control whether the Firework logo is displayed in the player. Default is true.
Custom Channel Logo
Configure custom logo display in the player using LogoConfig.
Options:
LogoConfig.NoLogo- No logo shownLogoConfig.Logo.AggregatorLogo(channelId, isClickable)- Custom drawable logo from channelLogoConfig.Logo.CreatorLogo(channelId, isClickable)- Custom drawable logo from creator
Set isClickable = false if you don't want the share menu to appear when clicking the logo.
Share Button
Show or hide the share button. Default is true.
Mute Button
Show or hide the mute/unmute button. Default is true.
Play/Pause Button in Videos
Show or hide the play/pause button for regular videos. Default is true.
Play/Pause Button in Replays
Show or hide the play/pause button for livestream replays. Default is true.
More Button
Show or hide the more options button. Default is true.
Playback Behavior
Autoplay
Enable autoplay for the first visible video in FwVideoFeedView. Default is false.
Auto-Play Next Video
Automatically play the next video when the current video ends. When true, the player advances to the next video. When false, the current video loops. Default is true.
Sharing
Share Base URL
Configure a base URL for generating share links.
Custom Share URL Callback
Customize share URLs before sharing using a suspend callback.
CTA Configuration
SDK Handle CTA Button Click
Control whether the SDK automatically handles CTA button clicks. Default is true.
When set to false, you must handle CTA clicks in your app using the OnCtaButtonClickListener.
CTA Button Visibility Delay
Control when the CTA button becomes visible during video playback.
Delay Units:
CtaDelayUnit.SECONDS- Delay in seconds (0.0f - 10.0f, default: 3 seconds)CtaDelayUnit.PERCENTAGE- Delay as percentage of video duration (0.0f - 1.0f, default: 0.2f or 20%)
Example with percentage:
CTA Button Highlight Delay
Control when the CTA button becomes highlighted after it appears.
Custom CTA Button Styling
Override FwCtaButtonViewStyle in your app's theme to customize CTA button appearance:
For rounded corners and shape customization:
Picture-in-Picture (PIP)
Enable PIP Mode
Enable Picture-in-Picture mode. Default is false.
Enter PIP Programmatically
Close PIP
PIP Cleanup on Activity Destroy
In Android 11+, removing the app's task from the task manager doesn't kill the player in PIP mode. Close PIP in your Activity's onDestroy:
Subtitles and Captions
Show Subtitles
Show or hide video subtitles. Default is true.
Show Captions
Show or hide video captions. Default is true.
Subtitle Text Color
Customize the text color for subtitles. Default is white (0xFFFFFFFF).
Subtitle Background Color
Customize the background color for subtitles. Default is semi-transparent black (0x66121212).
Reverse Audio Controls Order
Rearrange the order of mute/unmute button and closed captions button. Default is false.
When true, the closed captions button appears to the right of the mute/unmute button. When false, the closed captions button appears to the left of the mute/unmute button.
Livestream Features
Livestream Countdown
Display a countdown timer before livestream starts (over trailer video). Users can set reminders for the livestream.
Immersive Mode
Enable immersive fullscreen mode that hides system UI (navigation bars, status bar). Default is false.
Advanced UI Configuration
Player UI Options
Configure advanced player UI elements including custom icons and detailed options.
Customizable Icons:
Player detail button (More Button) - Three dots on top left showing details/share
Mute button - Icon for muted state
Unmute button - Icon for unmuted state
Close button - Icon on top right to close player
Play button - Icon for paused state (center of player)
Pause button - Icon for playing state (when WCAG Talkback is on)
PIP button - Icon for Picture-in-Picture mode
Action Buttons
Add custom action buttons to the player.
Complete Configuration Example
See Also
PlayerOption Reference - Complete player options documentation
ViewOptions Overview - All configuration options
Shopping Integration - CTA handling and shopping features
Livestream Integration - Livestream features and callbacks
Widgets Overview - All available widgets
Last updated
Was this helpful?