TWCLocalMedia Class Reference

Inherits from TWCMedia : NSObject
Declared in TWCMedia.h

Overview

Representation of the local client’s media - camera selection, screen share enablement, muting and pausing.

  microphoneMuted

Indicates whether your local audio is muted.

@property (nonatomic, assign, getter=isMicrophoneMuted) BOOL microphoneMuted

Discussion

Indicates whether your local audio is muted.

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

The new TWCLocalMedia object

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