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

Use GeometryReader 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 GeometryReader to get the size of the screen area and pass it to the constructor of this view

    Declaration

    Swift

    public let visibleSize: CGSize
  • Creates a SwiftUI view that displays the video content of a highlight that HighlightVideoPlayer plays.`

    Note

    Use GeometryReader to get the size of the screen area and pass it to the visibleSize parameter.

    Declaration

    Swift

    public init(player: HighlightVideoPlayer?, visibleSize: CGSize)

    Parameters

    player

    The video player that is used to play the video.

    visibleSize

    The 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)