VideoView

open class VideoView : UIView
extension VideoView: RTCVideoViewDelegate

Ready view handling WebRTC video stream

  • Declaration

    Swift

    open var renderer: RTCVideoRenderer { get }
  • Declaration

    Swift

    open private(set) var rendererType: RendererType! { get }
  • only .scaleAspectFit & scaleAspectFill have an effect

    Declaration

    Swift

    open override var contentMode: UIView.ContentMode { get set }
  • Declaration

    Swift

    open override var frame: CGRect { get set }
  • Currently rendering video size

    Declaration

    Swift

    open private(set) var videoSize: CGSize { get }
  • Turns on/off automatic layou update on video size change

    Declaration

    Swift

    open var layoutOnVideoSizeChange: Bool
  • True if .scaleAspectFill renderer rect differs from .scaleAspectFit rect

    Declaration

    Swift

    open var isContentModeSwitchable: Bool { get }
  • Declaration

    Swift

    public init(frame: CGRect, renderer: RendererType)
  • Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)
  • Declaration

    Swift

    open override func layoutSubviews()
  • Called on video size changing

    Declaration

    Swift

    open func onVideoSizeChange(_ onVideoSizeChange: @escaping ((_ size: CGSize) -> Void))
  • Declaration

    Swift

    open func takeSnapshot(rect: CGRect? = nil) -> UIImage?

    Return Value

    Snapshot using defined rect

  • Declaration

    Swift

    public func videoView(_ videoView: RTCVideoRenderer, didChangeVideoSize size: CGSize)