TWCVideoTrack Class Reference
Inherits from | TWCMediaTrack : NSObject |
---|---|
Declared in | TWCVideoTrack.h |
Overview
TWCVideoTrack represents either local or remote video, and provides an interface to render frames from the track.
delegate
The video track’s delegate. Set the delegate to receive updates about the track.
@property (nonatomic, weak, nullable) id<TWCVideoTrackDelegate> delegate
Discussion
The video track’s delegate. Set the delegate to receive updates about the track.
Declared In
TWCVideoTrack.h
attachedViews
An array of views that are currently attached to the video track.
@property (nonatomic, strong, readonly, nonnull) NSArray<UIView*> *attachedViews
Discussion
An array of views that are currently attached to the video track.
Note: Use the ‘attach:’ and ‘detach:’ methods to manipulate this collection.
Declared In
TWCVideoTrack.h
renderers
An array of renderers that are currently attached to the video track.
@property (nonatomic, strong, readonly, nonnull) NSArray<id<TWCVideoRenderer> > *renderers
Discussion
An array of renderers that are currently attached to the video track.
Note: Use the ‘addRenderer:’ and ‘removeRenderer:’ methods to manipulate this collection.
Declared In
TWCVideoTrack.h
videoDimensions
The dimensions of the track’s video. Use this to layout attached views.
@property (nonatomic, assign, readonly) CMVideoDimensions videoDimensions
Discussion
The dimensions of the track’s video. Use this to layout attached views.
Declared In
TWCVideoTrack.h
– attach:
Attaches a view to the video track. The track’s contents will be drawn into the attached view.
- (void)attach:(nonnull UIView *)view
Parameters
view |
The view to attach. |
---|
Discussion
Attaches a view to the video track. The track’s contents will be drawn into the attached view.
Declared In
TWCVideoTrack.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 *)view
Parameters
view |
The view to detach. |
---|
Discussion
Detaches a view from the video track. The track’s contents will no longer be drawn into the attached view.
Declared In
TWCVideoTrack.h
– addRenderer:
Adds a renderer to the video track. Renderers provide fine control over how video is displayed.
- (void)addRenderer:(nonnull id<TWCVideoRenderer>)renderer
Parameters
renderer |
An object or swift struct that implements the TWCVideoRenderer protocol. |
---|
Discussion
Adds a renderer to the video track. Renderers provide fine control over how video is displayed.
Declared In
TWCVideoTrack.h
– removeRenderer:
Removes a renderer from the video track.
- (void)removeRenderer:(nonnull id<TWCVideoRenderer>)renderer
Parameters
renderer |
An object or swift struct that implements the TWCVideoRenderer protocol. |
---|
Discussion
Removes a renderer from the video track.
Declared In
TWCVideoTrack.h