TWCVideoTrack Class Reference
| Inherits from | TWCMediaTrack : NSObject |
|---|---|
| Declared in | TWCVideoTrack.h |
delegate
The video track’s delegate. Set the delegate to receive updates about the track.
@property (nonatomic, weak, nullable) id<TWCVideoTrackDelegate> delegateDiscussion
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*> *attachedViewsDiscussion
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> > *renderersDiscussion
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 videoDimensionsDiscussion
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 *)viewParameters
view |
The view to attach. |
|---|
Discussion
Attaches a view to the video track. The track’s contents will be drawn into the attached view.
The attach: API is the simplest way to display video. For more control see addRenderer:.
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 *)viewParameters
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>)rendererParameters
renderer |
An object or swift struct that implements the |
|---|
Discussion
Adds a renderer to the video track. Renderers provide fine control over how video is displayed.
Use this method instead of attach to add your own renderer to TWCVideoTrack.
Declared In
TWCVideoTrack.h
– removeRenderer:
Removes a renderer from the video track.
- (void)removeRenderer:(nonnull id<TWCVideoRenderer>)rendererParameters
renderer |
An object or swift struct that implements the |
|---|
Discussion
Removes a renderer from the video track.
Declared In
TWCVideoTrack.h