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 microphoneMuted
Discussion
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 microphoneAdded
Discussion
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> delegate
Discussion
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>)delegate
Parameters
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 *)track
Parameters
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)error
Parameters
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 *)track
Parameters
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)error
Parameters
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 *)addCameraTrack
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
– addCameraTrack:
Creates a default camera capturer and adds its track to the local media collection.
- (nullable TWCCameraCapturer *)addCameraTrack:(NSError *_Nullable *_Nullable)error
Parameters
error |
The error occuered 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)addMicrophone
Return 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)removeMicrophone
Return 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