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.
Picture in Picture (PiP)
This feature allows the user to watch media while the application is in a backgrounded state. While in background mode a video will display in a floating, resizable window.
To enable PiP functionality, you’ll need to add Background Modes capability via Signing & Capabilities in your project settings. More information about this can be found here: Apple Documentation
Once the background mode is enabled, moving from an active state to a background state will immediately trigger the Picture In Picture functionality. PictureInPictureController is responsible for handling all of this functionality. PictureInPictureController retains a strong reference of AVPictureInPictureController. AVPictureInPictureController is a controller that responds to user-initiated Picture in Picture playback of video in a floating, resizable window.
Conform to VideoFeedViewControllerDelegate protocol
funcvideoFeedDidLoadFeed(_viewController: VideoFeedViewController) {debugPrint("Video feed loaded successfully.")}funcvideoFeed(_viewController: VideoFeedViewController,didFailToLoadFeederror: VideoFeedError) {debugPrint("Video feed did fail loading.")ifcase .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 }}