TVIVideoView Class Reference
TVIVideoView draws video frames from a
TVIVideoView should only be used on the application’s main thread. Subclassing
TVIVideoView is not supported.
UIViewContentModeScaleToFill, UIViewContentModeScaleAspectFill and UIViewContentModeScaleAspectFit are the
supported content modes.
TVIVideoView is contained within a
UIWindowScene on iOS 13.0+, it registers for lifecycle notifications from the scene. When the view is used on
earlier versions of iOS or added to a
UIWindow without a
UIWindowScene, it registers for
UIApplication lifecycle notifications instead.
TVIVideoView uses metal, video rendering on iOS 11.x simulators is not supported.
Creates a video view with a frame and delegate.
- (null_unspecified instancetype)initWithFrame:(CGRect)frame delegate:(nullable id<TVIVideoViewDelegate>)delegate
The frame rectangle for the view.
An object implementing the
A delegate which receives callbacks when important view rendering events occur.
@property (nonatomic, weak, nullable) id<TVIVideoViewDelegate> delegate
Note: The delegate is always called on the main thread in order to synchronize with UIKit.
Specify if the video view or the application will handle rotated video content.
@property (nonatomic, assign) BOOL viewShouldRotateContent
Handling rotations at the application level is more complex, but allows you to smoothly animate
transitions. By default, video frame rotation is performed by
TVIVideoView. Set this property to
you want to handle rotations in your own layout using `[TVIVideoViewDelegate videoView:videoOrientationDidChange:].
The dimensions of incoming video frames (without rotations applied). Use this to layout
@property (nonatomic, assign, readonly) CMVideoDimensions videoDimensions
The orientation of incoming video frames. Use this to layout
@property (nonatomic, assign, readonly) TVIVideoOrientation videoOrientation
Indicates that at least one frame of video data has been received.
@property (atomic, assign, readonly) BOOL hasVideoData
Determines whether the view should be mirrored.
@property (nonatomic, assign, getter=shouldMirror) BOOL mirror
This is useful when rendering the local feed from the front camera. The default is