TVIVideoTrack Class Reference
| Inherits from | TVITrack : NSObject |
|---|---|
| Declared in | TVIVideoTrack.h |
– init
Developers shouldn’t initialize this class directly.
- (null_unspecified instancetype)initDiscussion
Tracks cannot be created explicitly.
Declared In
TVIVideoTrack.h
delegate
The video track’s delegate. Set the delegate to receive updates about the track.
@property (nonatomic, weak, nullable) id<TVIVideoTrackDelegate> delegateDeclared In
TVIVideoTrack.h
attachedViews
An array of views that are currently attached to the video track.
@property (nonatomic, strong, readonly, nonnull) NSArray<UIView*> *attachedViewsDiscussion
Note: Use the ‘attach:’ and ‘detach:’ methods to manipulate this collection.
Declared In
TVIVideoTrack.h
renderers
An array of renderers that are currently attached to the video track.
@property (nonatomic, strong, readonly, nonnull) NSArray<id<TVIVideoRenderer> > *renderersDiscussion
Note: Use the ‘addRenderer:’ and ‘removeRenderer:’ methods to manipulate this collection.
Declared In
TVIVideoTrack.h
videoDimensions
The dimensions of the track’s video. Use this to layout attached views.
@property (nonatomic, assign, readonly) CMVideoDimensions videoDimensionsDeclared In
TVIVideoTrack.h
– attach:
Attaches a view to the video track. The track’s contents will be drawn into the attached view.
- (void)attach:(nonnull UIView *)viewParameters
view |
The view to attach. |
|---|
Discussion
The attach: API is the simplest way to display video. For more control see addRenderer:.
Declared In
TVIVideoTrack.h
– detach:
Detaches a view from the video track. The track’s contents will no longer be drawn into the attached view.
- (void)detach:(nonnull UIView *)viewParameters
view |
The view to detach. |
|---|
Declared In
TVIVideoTrack.h
– addRenderer:
Adds a renderer to the video track. Renderers provide fine control over how video is displayed.
- (void)addRenderer:(nonnull id<TVIVideoRenderer>)rendererParameters
renderer |
An object or swift struct that implements the |
|---|
Discussion
Use this method instead of attach to add your own renderer to TVIVideoTrack.
Declared In
TVIVideoTrack.h
– removeRenderer:
Removes a renderer from the video track.
- (void)removeRenderer:(nonnull id<TVIVideoRenderer>)rendererParameters
renderer |
An object or swift struct that implements the |
|---|
Declared In
TVIVideoTrack.h