Open Fullscreen Player
The FireworkSdk.startPlayer() method launches a fullscreen video player in a separate activity. This is useful when you want to play videos directly without embedding a FwVideoFeedView or FwStoryblock in your layout.
Overview
Unlike FwVideoFeedView and FwStoryBlockView, which are embedded views, FireworkSdk.startPlayer() launches a standalone player activity that takes over the entire screen. This approach is ideal for:
Opening specific videos from deep links
Playing videos from custom UI elements (buttons, banners, etc.)
Handling video notifications
Creating custom video entry points
Content limits and empty feeds
Since 6.35.1, BaseOption.maxItemCount limits the pages in a fullscreen session, including direct launches:
import com.firework.common.feed.FeedResource
import com.firework.sdk.FireworkSdk
import com.firework.viewoptions.BaseOption
import com.firework.viewoptions.ViewOptions
val options = ViewOptions.Builder()
.baseOption(
BaseOption.Builder()
.feedResource(FeedResource.Discovery)
.maxItemCount(6)
.build()
)
.build()
FireworkSdk.startPlayer(options)Replace FeedResource.Discovery with your desired content source. The default limit is null (unrestricted); positive values are capped at 20. Interstitial ads count as pages. Each session has its own limit, and child playlist sessions inherit it. Only the first page is used when a limit is configured. See Maximum Item Count.
If the initial feed is empty, the player activity closes automatically. Launch success indicates that the player was launched; it does not guarantee that the subsequently loaded feed contains playable content.
Usage
FireworkSdk.startPlayer() has two variants:
1. Start Player with URL
Launch a specific video directly using its URL:
2. Start Player with Feed Configuration
Launch the player with a feed configuration, allowing users to browse through multiple videos:
Using Kotlin DSL
For more concise syntax, use the DSL:
Launch Result
Both variants return a PlayerLaunchResult that indicates success or failure:
Handling Results
Configuration
The player can be configured using ViewOptions. Key options include:
Player Appearance
Content Source
When not using a specific URL, configure the content source:
Picture-in-Picture
Enable PIP mode to allow users to minimize the player:
Player Launch Modes
You can configure the player activity launch mode:
Available launch modes:
SINGLE_TASK- Standard single task launch modeSINGLE_INSTANCE- Single instance launch mode for complete isolationSINGLE_TASK_WITH_OWN_AFFINITY- Single task with custom affinity for separation
Important Notes
The SDK must be initialized before calling
startPlayer()The player launches in a new activity, separate from your app's activity stack
Always handle
PlayerLaunchResult.Failureto provide user feedbackViewOptions can customize all aspects of player behavior
The player handles its own lifecycle - no manual cleanup required
URL variant is useful for specific videos, feed variant for browsing multiple videos
Comparison with Other Widgets
Embedding
Embedded view
Embedded view
Separate activity
Layout Control
Full control
Full control
No control
Thumbnail Display
Yes
No
No
Lifecycle Management
Automatic
Manual
Automatic
Content Selection
User selects
Auto-play
Direct play
Return Result
No
No
Yes
See Also
ViewOptions Configuration - Complete configuration options
PlayerOption - Player customization
BaseOption - Feed source configuration
Feed Sources - Available content sources
Last updated
Was this helpful?