TVILocalAudioTrack Class Reference
Inherits from | TVIAudioTrack : TVITrack : NSObject |
---|---|
Declared in | TVILocalAudioTrack.h |
Overview
TVILocalAudioTrack
represents an audio track where the content is captured from your device’s audio subsystem.
options
The TVIAudioOptions
that were provided when the track was added to TVILocalMedia
.
@property (nonatomic, strong, readonly, nullable) TVIAudioOptions *options
Declared In
TVILocalAudioTrack.h
enabled
Indicates if the track content is enabled.
@property (nonatomic, assign, getter=isEnabled) BOOL enabled
Discussion
It is possible to enable and disable local tracks. The results of this operation are signaled to other Participants in the same Room. When an audio track is disabled, silence is sent in place of normal audio.
Declared In
TVILocalAudioTrack.h
– init
Developers shouldn’t initialize this class directly.
- (null_unspecified instancetype)init
Discussion
Use track
or trackWithOptions:enabled:name:
to create a TVILocalAudioTrack
.
Declared In
TVILocalAudioTrack.h
+ track
Creates a TVILocalAudioTrack
with the default settings.
+ (nullable instancetype)track
Return Value
A Track which is ready to be shared with Participants in a Room, or nil
if an error occurs.
Discussion
This method uses the default TVIAudioOptions
, and produces an enabled Track. If you are using a
custom TVIAudioDevice
which doesn’t support audio capturing then attempting to create a TVILocalAudioTrack
will
cause an exception to be thrown.
Declared In
TVILocalAudioTrack.h
+ trackWithOptions:enabled:name:
Creates a TVILocalAudioTrack
with TVIAudioOptions
and an enabled setting.
+ (nullable instancetype)trackWithOptions:(nullable TVIAudioOptions *)options enabled:(BOOL)enabled name:(nullable NSString *)name
Parameters
options |
An instance of |
---|---|
enabled |
Determines if the Track is enabled at creation time. |
name |
The Track name. |
Return Value
A Track which is ready to be shared with Participants in a Room, or nil
if an error occurs.
Discussion
This method allows you to provide specific TVIAudioOptions
, and produce a disabled Track if you wish.
If you are using a custom TVIAudioDevice
which doesn’t support audio capturing then attempting to create a
TVILocalAudioTrack
will cause an exception to be thrown.
Declared In
TVILocalAudioTrack.h