public class LocalVideoTrack extends VideoTrack
VideoCapturer
.Modifier and Type | Method and Description |
---|---|
static LocalVideoTrack |
create(android.content.Context context,
boolean enabled,
VideoCapturer videoCapturer)
Creates a local video track.
|
static LocalVideoTrack |
create(android.content.Context context,
boolean enabled,
VideoCapturer videoCapturer,
VideoConstraints videoConstraints)
Creates a local video track.
|
void |
enable(boolean enabled)
Sets the state of the local video track.
|
VideoCapturer |
getVideoCapturer()
Retrieves the
VideoCapturer associated with this video track. |
VideoConstraints |
getVideoConstraints()
Retrieves the video constraints associated with this track.
|
boolean |
isEnabled()
Check if the local video track is enabled.
|
void |
release()
Releases native memory owned by video track.
|
addRenderer, getRenderers, getTrackId, removeRenderer
public static LocalVideoTrack create(android.content.Context context, boolean enabled, VideoCapturer videoCapturer)
VideoCapturer.getSupportedFormats()
to find the closest supported
VideoFormat
to 640x480 at 30 frames per second. The closest format is used to apply
default VideoConstraints
to the returned LocalVideoTrack
.context
- application context.enabled
- initial state of video track.videoCapturer
- capturer that provides video frames.public static LocalVideoTrack create(android.content.Context context, boolean enabled, VideoCapturer videoCapturer, VideoConstraints videoConstraints)
videoConstraints
compatible with videoCapturer
. Default constraints described in
create(Context, boolean, VideoCapturer)
will be applied to the returned
LocalVideoTrack
for the following conditions:
null
as videoConstraints
.videoConstraints
are incompatible with videoCapturer
Video constraints are incompatible with a capturer if there is not at least one supported
VideoFormat
for which all the following conditions true:
VideoConstraints.minFps
and VideoConstraints.maxFps
are both
less than or equal supported capture format frame rate.VideoConstraints.minVideoDimensions
width and height are less than or
equal to a supported capture format width and height.VideoConstraints.maxVideoDimensions
width and height are greater than or
equal to a supported capture format width and height.context
- application context.enabled
- initial state of video track.videoCapturer
- capturer that provides video frames.videoConstraints
- constraints to be applied on video track.public VideoCapturer getVideoCapturer()
VideoCapturer
associated with this video track.public VideoConstraints getVideoConstraints()
If you do not provide any video constraints, the default video constraints are set to a maximum video dimension size of 640x480 at a frame rate of 30 frames per second.
public boolean isEnabled()
isEnabled
in class VideoTrack
public void enable(boolean enabled)
enabled
- the desired state of the local video track.public void release()