Player configurations (Flutter)
We have the following three entries to open the player.
VideoFeedwidgetStoryBlockwidgetopenVideoPlayerAPI
When customizing the player, you need to handle the above entries if you use them.
Configuration reference
Customize player styles
As the following code snippets, we could customize styles for video overlay CTA, action button, countdown timer, etc.
Customize player styles for video feed widget
// Configure player configuration for VideoFeed widget
final videoPlayerConfiguration = VideoPlayerConfiguration();
// Customize the video overlay CTA button style
videoPlayerConfiguration.ctaButtonStyle = VideoPlayerCTAStyle(
backgroundColor: "#2089ff",
textColor: "#ffffff",
fontSize: 14,
shape: ButtonShape.roundRectangle,
iOSFontInfo: IOSFontInfo(
fontName: "Helvetica",
systemFontStyle: IOSSystemFontStyle.italic,
systemFontWeight: IOSSystemFontWeight.heavy,
), // or ButtonShape.oval
);
// Customize the style of action button style, such as share button
videoPlayerConfiguration.actionButtonStyle = VideoPlayerActionButtonStyle(
backgroundColor: "#2089ff",
textColor: "#ffffff",
dividingLineColor: "#ffffff",
shape: ButtonShape.oval,
);
// Customize the style of cancel button style
videoPlayerConfiguration.cancelButtonStyle = VideoPlayerActionButtonStyle(
backgroundColor: "#ffffff",
textColor: "#000000",
shape: ButtonShape.oval,
);
// Specifies the appearance of the countdown timer
videoPlayerConfiguration.countdownTimerConfiguration =
CountdownTimerConfiguration(
appearance: CountdownTimerAppearanceMode.light,
);
VideoFeed(
source: VideoFeedSource.playlist,
channel: "your encoded channel id",
playlist: "your encoded playlist id",
videoPlayerConfiguration: videoPlayerConfiguration,
);Customize player styles for story block widget
Customize player styles for openVideoPlayer API
Enable PiP(Picture in Picture)
Set up the iOS project
To enable PiP outside the iOS app, you also need to add "Audio, Airplay, and Picture in Picture" background mode via Signing & Capabilities in your iOS project settings(as shown in the following screenshot). More information about this can be found here: Apple Documentation

Set enablePictureInPicture to true on Dart side
Customize player icons
Set up iOS project
Add the custom icons to the asset catalogs(e.g. Images.xcassets, Assets.xcassets or other names) in your iOS project. Such as:

For more details, please refer to https://developer.apple.com/documentation/xcode/adding-images-to-your-xcode-project
Set up Android project
Add the custom icons to the drawable directory(App resources overview and Support different pixel densities) in your Android project. Such as:

Configure the icon names on the Dart side
Customize player logo
To display the channel logo instead of the more icon (three dots) in the player, you could refer to the following code snippets.
Customize Ad badge
We offer a global API for customizing ad badges, and these configurations are applicable to both the player and the video feed. The API is FireworkSDK.getInstance().adBadgeConfiguration.
Customize video or livestream shared URL
To customize video or livestream shared URL, you could use FireworkSDK.getInstance().onCustomShareUrl to customize the URL. The sample codes are:
Customize other player configurations
Last updated
Was this helpful?