TVILocalMedia Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | TVILocalMedia.h |
Overview
TVILocalMedia is a collection of audio and video tracks which can be shared in a TVIRoom.
The lifecycle of TVILocalMedia is independent of TVIRoom. The same media can be shared in zero, one, or many Rooms.
audioController
The Audio Controller.
@property (nonatomic, strong, readonly, nonnull) TVIAudioController *audioControllerDeclared In
TVILocalMedia.h
audioTracks
A collection of local audio tracks.
@property (nonatomic, strong, readonly, nonnull) NSArray<TVILocalAudioTrack*> *audioTracksDeclared In
TVILocalMedia.h
videoTracks
A collection of local video tracks.
@property (nonatomic, strong, readonly, nonnull) NSArray<TVILocalVideoTrack*> *videoTracksDeclared In
TVILocalMedia.h
– addAudioTrack:
Adds a local audio track to TVILocalMedia.
- (nullable TVILocalAudioTrack *)addAudioTrack:(BOOL)enabledParameters
enabled |
Specifies if |
|---|
Return Value
An instance of TVILocalAudioTrack if successful, or nil if not.
Declared In
TVILocalMedia.h
– addAudioTrack:constraints:error:
Adds a local video track to TVILocalMedia.
- (nullable TVILocalAudioTrack *)addAudioTrack:(BOOL)enabled constraints:(nullable TVIAudioConstraints *)constraints error:(NSError *_Nullable *_Nullable)errorParameters
enabled |
Specifies if |
|---|---|
constraints |
The audio constraints. |
error |
An |
Return Value
An instance of TVILocalAudioTrack if successful, or nil if not.
Declared In
TVILocalMedia.h
– removeAudioTrack:
Removes a local audio track from TVILocalMedia
- (BOOL)removeAudioTrack:(nonnull TVILocalAudioTrack *)trackParameters
track |
The |
|---|
Return Value
YES if successful, or NO if the removal fails.
Declared In
TVILocalMedia.h
– removeAudioTrack:error:
Removes a local audio track from TVILocalMedia
- (BOOL)removeAudioTrack:(nonnull TVILocalAudioTrack *)track error:(NSError *_Nullable *_Nullable)errorParameters
track |
The |
|---|---|
error |
An NSError which will be filled out if the operation fails, or set to nil on success. |
Return Value
YES if successful, or NO if the removal fails.
Declared In
TVILocalMedia.h
– addVideoTrack:capturer:
Adds a local video track to TVILocalMedia.
- (nullable TVILocalVideoTrack *)addVideoTrack:(BOOL)enabled capturer:(nonnull id<TVIVideoCapturer>)capturerParameters
enabled |
Specifies if |
|---|---|
capturer |
A video capturer which conforms to |
Return Value
An instance of TVILocalVideoTrack if successful, or nil if not.
Declared In
TVILocalMedia.h
– addVideoTrack:capturer:constraints:error:
Adds a local video track to TVILocalMedia.
- (nullable TVILocalVideoTrack *)addVideoTrack:(BOOL)enabled capturer:(nonnull id<TVIVideoCapturer>)capturer constraints:(nullable TVIVideoConstraints *)constraints error:(NSError *_Nullable *_Nullable)errorParameters
enabled |
Specifies if |
|---|---|
capturer |
A video capturer which conforms to |
constraints |
The |
error |
An NSError which will be filled out if the operation fails, or set to nil on success. |
Return Value
An instance of TVILocalVideoTrack if successful, or nil if not.
Declared In
TVILocalMedia.h
– removeVideoTrack:
Removes a local video track from TVILocalMedia
- (BOOL)removeVideoTrack:(nonnull TVILocalVideoTrack *)trackParameters
track |
The |
|---|
Return Value
YES if success, NO if failure.
Declared In
TVILocalMedia.h
– removeVideoTrack:error:
To remove local video track from TVILocalMedia.
- (BOOL)removeVideoTrack:(nonnull TVILocalVideoTrack *)track error:(NSError *_Nullable *_Nullable)errorParameters
track |
The |
|---|---|
error |
An NSError which will be filled out if the operation fails, or set to nil on success. |
Declared In
TVILocalMedia.h