TWCLocalMedia Class Reference
| Inherits from | TWCMedia : NSObject |
|---|---|
| Declared in | TWCMedia.h |
Overview
TWCLocalMedia represents the media sources that will be shared with other Conversation Participants.
microphoneMuted
Indicates wether your local audio is muted.
@property (nonatomic, assign, getter=isMicrophoneMuted) BOOL microphoneMutedDiscussion
Indicates wether your local audio is muted.
Declared In
TWCMedia.h
microphoneAdded
Indicates if you are sharing audio.
@property (nonatomic, assign, readonly, getter=isMicrophoneAdded) BOOL microphoneAddedDiscussion
Indicates if you are sharing audio.
Declared In
TWCMedia.h
delegate
An object conforming to the TWCLocalMediaDelegate protocol, which will respond to events from TWCLocalMedia.
@property (nonatomic, weak, nullable) id<TWCLocalMediaDelegate> delegateDiscussion
An object conforming to the TWCLocalMediaDelegate protocol, which will respond to events from TWCLocalMedia.
Declared In
TWCMedia.h
– initWithDelegate:
Initializes a new TWCLocalMedia object.
- (nullable instancetype)initWithDelegate:(nullable id<TWCLocalMediaDelegate>)delegateParameters
delegate |
A delegate which will receive local media callbacks. |
|---|
Return Value
A new TWCLocalMedia object if successful, otherwise nil in case of failures.
Discussion
Initializes a new TWCLocalMedia object.
Declared In
TWCMedia.h
– addTrack:
Add a video track to the local media collection.
- (BOOL)addTrack:(nonnull TWCVideoTrack *)trackParameters
track |
The video track to add. |
|---|
Discussion
Add a video track to the local media collection.
Declared In
TWCMedia.h
– addTrack:error:
Add a video track to the local media collection.
- (BOOL)addTrack:(nonnull TWCVideoTrack *)track error:(NSError *_Nullable *_Nullable)errorParameters
track |
The video track to add. |
|---|---|
error |
An error if the track could not be added. |
Return Value
‘YES’ if success, ‘NO’ if failure.
Discussion
Add a video track to the local media collection.
Declared In
TWCMedia.h
– removeTrack:
Remove a video track from the local media collection.
- (BOOL)removeTrack:(nonnull TWCVideoTrack *)trackParameters
track |
The video track to remove. |
|---|
Discussion
Remove a video track from the local media collection.
Declared In
TWCMedia.h
– removeTrack:error:
Remove a video track from the local media collection.
- (BOOL)removeTrack:(nonnull TWCVideoTrack *)track error:(NSError *_Nullable *_Nullable)errorParameters
track |
The video track to remove. |
|---|---|
error |
An error if the track could not be removed. |
Return Value
‘YES’ if success, ‘NO’ if failure.
Discussion
Remove a video track from the local media collection.
Declared In
TWCMedia.h
– addCameraTrack
Creates a default camera capturer and adds its track to the local media collection.
- (nullable TWCCameraCapturer *)addCameraTrackReturn Value
The capturer which was added.
Discussion
Creates a default camera capturer and adds its track to the local media collection.
Declared In
TWCMedia.h
– addCameraTrack:
Creates a default camera capturer and adds its track to the local media collection.
- (nullable TWCCameraCapturer *)addCameraTrack:(NSError *_Nullable *_Nullable)errorParameters
error |
The error occurred while adding the camera track. |
|---|---|
error |
An error if the camera track could not be added. |
Return Value
The capturer which was added.
Discussion
Creates a default camera capturer and adds its track to the local media collection.
Declared In
TWCMedia.h
– addMicrophone
Adds audio stream to local media, if not already added
- (BOOL)addMicrophoneReturn Value
Result of operation, YES if successful, NO if microphone is already added or operation submitted last is in progress.
Discussion
Adds audio stream to local media, if not already added
Declared In
TWCMedia.h
– removeMicrophone
Removes audio stream from local media, if already added
- (BOOL)removeMicrophoneReturn Value
Result of operation, YES if successful, NO if microphone was not added or operation submitted last is in progress.
Discussion
Removes audio stream from local media, if already added
Declared In
TWCMedia.h