Present, push or embed the instantiated VideoFeedViewController.
ImportantFireworkVideoSDK.inializedSDK() must be called before trying to use any Firework Video UI Components. It is advised to call this at app start to ensure proper functionality.
The VideoFeedView provides a UIView wrapper for the FireworkVideo.VideoFeedViewController. You can customize the VideoFeedView just like the FireworkVideo.VideoFeedViewController.
Integration
Follow the instruction to install FireworkVideoUI.
The VideoFeedSwiftUIView provides a SwiftUI View wrapper for the FireworkVideo.VideoFeedViewController. You can customize the VideoFeedSwiftUIView just like the FireworkVideo.VideoFeedViewController.
Integration
Follow the instruction to install FireworkVideoUI.
Custom Call-To-Action button handling is done via the FireworkVideoCTADelegate protocol. This provides control over what occurs when a call-to-action button is tapped.
A VideoFeedViewController can be forced to refreshed by calling the refresh() method on the instance that should be refreshed. This functionality is useful if your feed is embedded along with other components that are also updated and you support features like pull to refresh.
Receive video feed events
Set the delegate
feedVC.delegate = self
Conform to VideoFeedViewControllerDelegate protocol
func videoFeedDidLoadFeed(
_ viewController: VideoFeedViewController
) {
debugPrint("Video feed loaded successfully.")
}
func videoFeed(
_ viewController: VideoFeedViewController,
didFailToLoadFeed error: VideoFeedError
) {
debugPrint("Video feed did fail loading.")
if case .contentSourceError(let feedContentSourceError) = error,
case .emptyFeed = feedContentSourceError {
// This is a specific error.
// SDK will trigger this error when the feed is empty.
// For example, this error will be triggered when loading an empty playlist.
} else {
// Other error
}
}