SwiftUI - Video Inline Player
The BlazeSwiftUIVideosInlinePlayerView is a SwiftUI view for the powerful BlazeSDK video player component, providing native SwiftUI integration for embedding video players within your iOS app. It supports two distinct modes: interactive (full overlay with controls) and preview (minimal overlay that opens full screen on tap). The player manages the entire video playback lifecycle, including creation, embedding, and cleanup, while maintaining playback continuity during transitions between inline and fullscreen states. It handles video loading, placeholder images, playback controls, and user interactions like play/pause, seeking, and muting. The component offers rich customization options through styling properties and a clean, SwiftUI-friendly API. Integration is simple with SwiftUI modifiers for delegation and control access.
Controlling Playback ManuallyThe SwiftUI Inline feature provides the BlazeSwiftUIVideoInlinePlayerController object, which is used to control playback states manually when paired with a BlazeSwiftUIVideosInlinePlayerView
The app should handle empty/error states.The player doesn't provide an empty or error state UI display. App developers should ensure they decide on proper logic to handle these scenarios, utilizing the player's delegate handles.
SwiftUI is specialThe following properties are flagged as
destructibleif changed after an initial creation of a BlazeSwiftUIVideosInlinePlayerView instance, causing the player to be recreated for that view to reflect the changes; which might be an expensive operation if not performed cautiously:
- playerMode
- dataSourceType
- containerIdentifier
- cachePolicy
- adsConfigType
- shouldOrderVideosByReadStatus
Any other properties can be safely updated without causing player recreation.
Updated about 2 months ago
