VideoPlayerPreview
public struct VideoPlayerPreview : UIViewRepresentable
A SwiftUI view that displays the video content of a highlight that HighlightVideoPlayer plays.
This struct is a SwiftUI wrapper that uses VideoRenderView UIKit based component to display the video content.
Note
UseGeometryReader to get the size of the screen area and pass it to the visibleSize parameter.
-
The video player that is used to play the video.
Declaration
Swift
public let player: HighlightVideoPlayer? -
The size of the screen area allocated for this view.
Used to calculate the video and animation of the highlight. Use
GeometryReaderto get the size of the screen area and pass it to the constructor of this viewDeclaration
Swift
public let visibleSize: CGSize -
Creates a SwiftUI view that displays the video content of a highlight that
HighlightVideoPlayerplays.`Note
UseGeometryReaderto get the size of the screen area and pass it to thevisibleSizeparameter.Declaration
Swift
public init(player: HighlightVideoPlayer?, visibleSize: CGSize)Parameters
playerThe video player that is used to play the video.
visibleSizeThe size of the screen area allocated for this view.
-
Declaration
Swift
public func makeUIView(context: Context) -> UIView -
Declaration
Swift
public func updateUIView(_ uiView: UIView, context: Context)
VideoPlayerPreview Structure Reference