SendBirdVideoView
@objcMembers
@objc(SBCVideoView)
public class SendBirdVideoView : RTCEAGLVideoView
Video renderring view. Add to your UIView
to show video.
@IBOutlet weak var localVideoView: UIView?
@IBOutlet weak var remoteVideoView: UIView?
...
let localSBView = SendBirdVideoView(frame: self.localVideoView?.frame ?? CGRect.zero)
let remoteSBView = SendBirdVideoView(frame: self.remoteVideoView?.frame ?? CGRect.zero)
self.call.updateLocalVideoView(localSBView)
self.call.updateRemoteVideoView(remoteSBView)
// When you make a call or accept an incoming call.
let callOptions = CallOptions(
isAudioEnabled = true,
isVideoEnabled = true,
localVideoView: localSBVideoView
remoteVideoView: remoteSBVideoView)
// Or when update local / remote view
self.call.updateLocalVideoView(localSBView)
self.call.updateRemoteVideoView(remoteSBView)
Since
1.0.0- Tag: SendBirdVideoView
-
Initializes SendBirdVideoView with a custom contentMode.
Note
Custom UIView.ContentMode on non-arm64 devices is not supported.Since
1.6.0Declaration
Swift
public init(frame: CGRect, contentMode: UIView.ContentMode)
-
Undocumented
Declaration
Swift
public init(frame: CGRect)
-
Undocumented
Declaration
Swift
public required init?(coder: NSCoder)
-
Undocumented
Declaration
Swift
public init()
-
UIView.ContentMode of video. Default value is scaleAspectFill
Note
Custom UIView.ContentMode on non-arm64 devices is not supported.Since
1.6.0Declaration
Swift
public var videoContentMode: UIView.ContentMode { get set }
-
Embeds the SendBirdVideoView into the provided UIView.
Layout Constraints are added to make the SendBirdVideoView fill the size of the provided UIVIew.
Since
1.6.1Declaration
Swift
@objc(embedInView:) public func embed(in view: UIView)
Parameters
view
UIView in which the SendBirdVideoView will be inserted to. Superview of this SendBirdVideoView.
-
Undocumented
Declaration
Swift
public override func renderFrame(_ frame: RTCVideoFrame?)