public class AVChatParameters
extends java.lang.Object
Call options
Each parameter contains the following aspects:
Modifier and Type | Class and Description |
---|---|
static class |
AVChatParameters.Key<T>
Options for writable and runtime
|
Modifier and Type | Field and Description |
---|---|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_AUDIO_CALL_PROXIMITY
Determine whether to enable the proximity sensor during audio calls
|
static AVChatParameters.Key<java.lang.String> |
KEY_AUDIO_EFFECT_ACOUSTIC_ECHO_CANCELER
Audio pre-processing, noise suppression, used to eliminate background noise of audio calls.
|
static AVChatParameters.Key<java.lang.String> |
KEY_AUDIO_EFFECT_AUTOMATIC_GAIN_CONTROL
Audio processing, Automatic Gain Control
|
static AVChatParameters.Key<java.lang.String> |
KEY_AUDIO_EFFECT_NOISE_SUPPRESSOR
Voice pre-processing, noise suppression, used to eliminate background noise of audio calls.
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_AUDIO_EXTERNAL_CAPTURE
Deprecated.
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_AUDIO_FRAME_FILTER
Voice data pre-processing
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_AUDIO_HIGH_QUALITY
High quality audio
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_AUDIO_PLAYBACK_DEFAULT_SAMPLE_RATE
Audio playback sample rate
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_AUDIO_PROCESS_DUMP_FLAG_DEBUG
Audio playback sample rate
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_AUDIO_REPORT_SPEAKER
Speaker acoustic intensity report
|
static AVChatParameters.Key<java.lang.String> |
KEY_COMPATIBILITY_CONFIG_LOCAL
Custom local compatibility
|
static AVChatParameters.Key<java.lang.String> |
KEY_COMPATIBILITY_CONFIG_SERVER
Custom server compatibility configuration
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_DEVICE_DEFAULT_ROTATION
By default, the device rotates clockwise.
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_DEVICE_ROTATION_FIXED_OFFSET
Device rotation angle offset.
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_PROFILE_TRACE_FLAG_DEBUG
Print kTraceProfile log
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_SERVER_AUDIO_RECORD
Recording audio calls on the server
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_SERVER_LIVE_RECORD
Deprecated.
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_SERVER_RECORD_MODE
Recording mode on the server
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_SERVER_RECORD_SPEAKER
Check if the current user is the speaker when recording calls on the server
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_SERVER_VIDEO_RECORD
Video recording on the server
|
static AVChatParameters.Key<AVChatLiveCompositingLayout> |
KEY_SESSION_LIVE_COMPOSITING_LAYOUT
Deprecated.
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_SESSION_LIVE_MODE
Interactive live mode
|
static AVChatParameters.Key<java.lang.String> |
KEY_SESSION_LIVE_URL
Deprecated.
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_SESSION_MULTI_MODE_USER_ROLE
Roles for group settings
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_VIDEO_CAPTURE_ORIENTATION
Video capture orientation
|
static AVChatParameters.Key<java.lang.String> |
KEY_VIDEO_DECODER_MODE
Video hardware decoding.
|
static AVChatParameters.Key<java.lang.String> |
KEY_VIDEO_ENCODER_MODE
Video hardware encoding mode.
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_VIDEO_FIXED_CROP_RATIO
Video aspect ratio
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_VIDEO_FPS_REPORTED
Video frame rate report
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_VIDEO_FRAME_FILTER
Video data pre-processing.
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_VIDEO_FRAME_FILTER_FORMAT
Video data frame format
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_VIDEO_FRAME_FILTER_NEW
Video data pre-processing.
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_VIDEO_FRAME_RATE
Video frame rate
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_VIDEO_LOCAL_PREVIEW_MIRROR
Local preview mirroring of the front camera
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_VIDEO_MAX_BITRATE
The maximum video bitrate.
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_VIDEO_PREVIEW_QUALITY
Set a video quality for previews.
|
static AVChatParameters.Key<java.lang.Integer> |
KEY_VIDEO_QUALITY
Video quality.
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_VIDEO_ROTATE_IN_RENDING
Auto-rotate when rendering a video
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_VIDEO_SUPPORTED_HW_DECODER
Check if the system supports hardware decoding.
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_VIDEO_SUPPORTED_HW_ENCODER
Check if the system supports hardware encoding.
|
static AVChatParameters.Key<java.lang.Boolean> |
KEY_VIDEO_TRANSPORT_MIRROR
Send mirroring data of the front camera
|
Constructor and Description |
---|
AVChatParameters() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(AVChatParameters.Key key) |
<T> T |
get(AVChatParameters.Key<T> key) |
boolean |
getBoolean(AVChatParameters.Key<java.lang.Boolean> key) |
float |
getFloat(AVChatParameters.Key<java.lang.Float> key) |
int |
getInteger(AVChatParameters.Key<java.lang.Integer> key) |
RtcParameters |
getRawParameters() |
java.lang.String |
getString(AVChatParameters.Key<java.lang.String> key) |
void |
removeParameters(AVChatParameters.Key key) |
<T> void |
set(AVChatParameters.Key<T> key,
T value) |
void |
setBoolean(AVChatParameters.Key<java.lang.Boolean> key,
boolean value) |
void |
setFloat(AVChatParameters.Key<java.lang.Float> key,
float value) |
void |
setInteger(AVChatParameters.Key<java.lang.Integer> key,
int value) |
void |
setRawParameters(RtcParameters parameters) |
AVChatParameters |
setRequestKey(AVChatParameters.Key key) |
AVChatParameters |
setRequestKeys(java.util.Set<AVChatParameters.Key> keys) |
void |
setString(AVChatParameters.Key<java.lang.String> key,
java.lang.String value) |
public static final AVChatParameters.Key<java.lang.Integer> KEY_DEVICE_DEFAULT_ROTATION
By default, the device rotates clockwise. For some special devices, the device orientation cannot be obtained by default. In this case, you can specify the default device angle.
When a device is placed horizontally, the current angle is undefined. If the working environment of a device is always placed horizontally, then a default rotation angle needs to be defined.
Possible values:
ROTATION_0
ROTATION_90
ROTATION_180
ROTATION_270
Writable: true
Runtime: false
Surface#ROTATION_0
,
Surface#ROTATION_90
,
Surface#ROTATION_180
,
Surface#ROTATION_270
public static final AVChatParameters.Key<java.lang.Integer> KEY_DEVICE_ROTATION_FIXED_OFFSET
Device rotation angle offset.
If the angle obtained by the SDK and the actual angle of the device have the same difference, you can define an offset. This is an issue for custom devices. Most mobile phones and tablets do not need to pay attention to this parameter.
Possible values:
ROTATION_0
ROTATION_90
ROTATION_180
ROTATION_270
Writable: true
Runtime: false
Surface#ROTATION_0
,
Surface#ROTATION_90
,
Surface#ROTATION_180
,
Surface#ROTATION_270
public static final AVChatParameters.Key<java.lang.String> KEY_VIDEO_ENCODER_MODE
Video hardware encoding mode.
Only Qualcomm CPU series support hardware encoding. If the device does not support hardware encoding, the setting will automatically roll back to software encoding mode if hardware encoding is set.
Possible values:
Writable: true
Runtime: true
Compatibility - Some devices have compatibility issues and are added to the blacklist.
public static final AVChatParameters.Key<java.lang.String> KEY_VIDEO_DECODER_MODE
Video hardware decoding.
Only Qualcomm CPU series support hardware decoding. If the device does not support hardware decoding, the setting will automatically roll back to software decoding if hardware decoding is set.
Possible values:
Writable: true
Runtime: true
Compatibility - Some devices have compatibility issues and are added to the blacklist.
public static final AVChatParameters.Key<java.lang.Boolean> KEY_VIDEO_SUPPORTED_HW_ENCODER
Check if the system supports hardware encoding.
Only Qualcomm CPU series support hardware encoding.
Writable: false
Runtime: true
Compatibility - Some devices have compatibility issues and are added to the blacklist.
public static final AVChatParameters.Key<java.lang.Boolean> KEY_VIDEO_SUPPORTED_HW_DECODER
Check if the system supports hardware decoding.
Only Qualcomm CPU series support hardware decoding.
Writable: false
Runtime: true
Compatibility - Some devices have compatibility issues and are added to the blacklist.
public static final AVChatParameters.Key<java.lang.String> KEY_AUDIO_EFFECT_NOISE_SUPPRESSOR
Voice pre-processing, noise suppression, used to eliminate background noise of audio calls.
Built-in software and hardware audio processing are supported. The SDK applies hardware processing by default. Fro special use cases, you can disable audio processing.
Not all devices support hardware audio processing. If a device does not support hardware processing and the hardware processing setting will automatically roll back to software processing.
Possible values:
Writable: true
Runtime: false
Compatibility - Some devices have hardware support tags, but actually do not support hardware audio processing. Some devices have poor hardware processing performance and must use software audio processing.
public static final AVChatParameters.Key<java.lang.String> KEY_AUDIO_EFFECT_AUTOMATIC_GAIN_CONTROL
Audio processing, Automatic Gain Control
Possible values:
Writable: true
Runtime: false
public static final AVChatParameters.Key<java.lang.String> KEY_AUDIO_EFFECT_ACOUSTIC_ECHO_CANCELER
Audio pre-processing, noise suppression, used to eliminate background noise of audio calls.
Built-in software and hardware audio processing are supported. The SDK applies hardware processing by default. Fro special use cases, you can disable audio processing.
Not all devices support hardware audio processing. If a device does not support hardware processing and the hardware processing setting will automatically roll back to software processing.
Possible values:
Writable: true
Runtime: false
Compatibility - Some devices have hardware support tags, but actually do not support hardware audio processing. Some devices have poor hardware processing performance and must use software audio processing.
public static final AVChatParameters.Key<java.lang.Boolean> KEY_AUDIO_CALL_PROXIMITY
Determine whether to enable the proximity sensor during audio calls
During an audio call, if the proximity sensor is turned on, the screen will be automatically blacked out when the handset is detected close to a face. Only the proximity sensor is automatically used during video calls.
Writable: true
Runtime: false
public static final AVChatParameters.Key<java.lang.Integer> KEY_VIDEO_QUALITY
Video quality.
During a video call, you can set a desired video publishing resolution.
The actual capture resolution will be different from the one you set. For 720P
, 960x720
or 1280x720
is applied.
In extreme cases, the camera does not support capturing video data at a certain level of video quality, and will automatically lower to the next level. The actual video quality level used can be obtained using this parameter.
Possible values:
Writable: true
Runtime: true
Compatibility - Some settings do not support all levels of video quality
public static final AVChatParameters.Key<java.lang.Integer> KEY_VIDEO_PREVIEW_QUALITY
Set a video quality for previews.
If the resolution is smaller than KEY_VIDEO_QUALITY, the parameter is invalid. The default value is QUALITY_DEFAULT (the preview follows KEY_VIDEO_QUALITY)
The actual preview resolution will be different from the one you set. For 720P
, 960x720
or 1280x720
is applied.
In extreme cases, the camera does not support capturing video data at a certain level of video quality, and will automatically lower to the next level.
Note: If the preview resolution is set, the resolution captured by the device camera will be based on the preview resolution. In this case, the final publishing resolution may be scaled
Possible values:
QUALITY_DEFAULT ( the same effect without the setting)
QUALITY_LOW
QUALITY_MEDIUM
QUALITY_HIGH
QUALITY_480P
QUALITY_540P
QUALITY_720P
Writable: true
Runtime: true
Compatibility - Some settings do not support all levels of video quality
public static final AVChatParameters.Key<java.lang.Boolean> KEY_VIDEO_ROTATE_IN_RENDING
Auto-rotate when rendering a video
When the video is rendered, the video is rotated based on the angle sent by the peer, the current angle of the device and the angle of the current view layout. Hence, the picture is in the positive direction for the current user in any case.
Writable: true
Runtime: true
public static final AVChatParameters.Key<java.lang.Integer> KEY_SESSION_MULTI_MODE_USER_ROLE
Roles for group settings
Normal mode allows to send or receive messages If switched to audience, a user can only receive messages and cannot send any messages
Possible values:
Writable: true
Runtime: true
AVChatUserRole.AUDIENCE
,
AVChatUserRole.NORMAL
public static final AVChatParameters.Key<java.lang.Boolean> KEY_VIDEO_FPS_REPORTED
Video frame rate report
The local preview frame rate and the remote preview frame rate will be reported every 2 seconds. The report is created by AVChatStateObserverLite.onVideoFpsReported(String, int)
Writable: true
Runtime: true
public static final AVChatParameters.Key<java.lang.Integer> KEY_VIDEO_MAX_BITRATE
The maximum video bitrate.
Set the maximum bitrate of video streams. The bitrate must be set in combination with the resolution and cannot be set too small.
Writable: true
Runtime: true
Units: bit per seconds(bps)
Range of valid values: >0 , <5Mbps
public static final AVChatParameters.Key<java.lang.Integer> KEY_VIDEO_FRAME_RATE
Video frame rate
Set the expected frame rate of video streams. Due to device limit and performance requirements, the actual frame rate may be different from the expected frame rate.
Possible values:
Writable: true
Runtime: true
Units: Frames per second (FPS)
public static final AVChatParameters.Key<java.lang.Boolean> KEY_VIDEO_FRAME_FILTER
Video data pre-processing.
Preprocessing of video data can be implemented externally using the callback. The data format is android.graphics.ImageFormat#NV21
,
Data is transferred to the upper layer using AVChatStateObserverLite.onVideoFrameFilter(AVChatVideoFrame, boolean)
.
The thread where the callback is located does not have the android.opengl.EGLContext
context.
Writable: true
Runtime: true
public static final AVChatParameters.Key<java.lang.Boolean> KEY_VIDEO_FRAME_FILTER_NEW
Video data pre-processing.
Preprocessing of video data can be implemented externally using the callback. The data is in android.graphics.ImageFormat#NV21,android.graphics.ImageFormat#I420,#GLES11Ext.GL_TEXTURE_EXTERNAL_OES
format.
Data is transferred to the upper layer by AVChatStateObserverLite.onVideoFrameFilter(VideoFrame, VideoFrame[], VideoFilterParameter)
.
The thread where the callback is located does have the android.opengl.EGLContext
context.
Writable: true
Runtime: true
public static final AVChatParameters.Key<java.lang.Integer> KEY_VIDEO_FRAME_FILTER_FORMAT
Video data frame format
Get the data format by calling AVChatStateObserverLite.onVideoFrameFilter(AVChatVideoFrame, boolean)
AVChatImageFormat.I420
is recommended. The default format is AVChatImageFormat.NV21
Possible values:
Writable: true
Runtime: true
public static final AVChatParameters.Key<java.lang.Boolean> KEY_AUDIO_FRAME_FILTER
Voice data pre-processing
The voice data can be pre-processed externally using this callback PCM
is supported. The data is transferred to the upper layer using AVChatStateObserverLite.onAudioFrameFilter(AVChatAudioFrame)
The data must be synced externally
Writable: true
Runtime: true
@Deprecated public static final AVChatParameters.Key<java.lang.String> KEY_SESSION_LIVE_URL
AVChatManagerLite.createRoom(String, String, List, AVChatCallback)
is recommendedLive streaming URL
Push streaming URL configured by the host client. Non-host clients do not have the setting. To start streaming, the streaming URL must be specified before calling. The URL can be updated during the call
Writable: true
Runtime: true
Units: UTF-8 null-terminated string
public static final AVChatParameters.Key<java.lang.Boolean> KEY_AUDIO_REPORT_SPEAKER
Speaker acoustic intensity report
Report the acoustic intensity of a speaker The acoustic intensity is reported using AVChatStateObserverLite.onReportSpeaker(Map, int)
Writable: true
Runtime: true
public static final AVChatParameters.Key<java.lang.Boolean> KEY_AUDIO_HIGH_QUALITY
High quality audio
By default, the high quality audio is disabled High definition audio uses high sampling rate for audio capture
Writable: true
Runtime: true
Compatibility - Some devices do not support HD audio capture
public static final AVChatParameters.Key<java.lang.Integer> KEY_VIDEO_CAPTURE_ORIENTATION
Video capture orientation
By default, the video is captured in portait orientation. Users can configure the capture orientation to suit the audience needs
Possible values:
ORIENTATION_PORTRAIT
ORIENTATION_PORTRAIT_UPSIDEDOWN
ORIENTATION_LANDSCAPE_LEFT
ORIENTATION_LANDSCAPE_RIGHT
Writable: true
Runtime: true
public static final AVChatParameters.Key<java.lang.Integer> KEY_VIDEO_FIXED_CROP_RATIO
Video aspect ratio
By default, the video capture screen is not cropped The capture aspect ratio of different devices may be different For example 720P
might have 960x720
and 1280x720
Different resolutions will cause issues, such as incomplete screen or black edges
Possible values:
Writable: true
Runtime: true
public static final AVChatParameters.Key<java.lang.Boolean> KEY_VIDEO_LOCAL_PREVIEW_MIRROR
Local preview mirroring of the front camera
Mirror the from camera By default, mirroring the front camera is enabled
Writable: true
Runtime: true
public static final AVChatParameters.Key<java.lang.Boolean> KEY_VIDEO_TRANSPORT_MIRROR
Send mirroring data of the front camera
Mirror the sending image data of the front camera By default, the publishing image from the front camera is not mirrored
Writable: true
Runtime: true
public static final AVChatParameters.Key<java.lang.Boolean> KEY_SERVER_AUDIO_RECORD
Recording audio calls on the server
Audio recording on server in aac
format
Writable: true
Runtime: false
public static final AVChatParameters.Key<java.lang.Boolean> KEY_SERVER_VIDEO_RECORD
Video recording on the server
Record video calls on the server in mp4
format
Writable: true
Runtime: false
public static final AVChatParameters.Key<java.lang.Integer> KEY_SERVER_RECORD_MODE
Recording mode on the server
Set the recording mode on the server. Mixing and individual, mixing, and individual
Possible values:
Writable: true
Runtime: false
public static final AVChatParameters.Key<java.lang.Boolean> KEY_SERVER_RECORD_SPEAKER
Check if the current user is the speaker when recording calls on the server
Set the current user to speaker when recording calls on the server
Writable: true
Runtime: false
@Deprecated public static final AVChatParameters.Key<java.lang.Boolean> KEY_SERVER_LIVE_RECORD
AVChatManagerLite.createRoom(String, String, List, AVChatCallback)
is recommendedRecording interactive live streams
Recording interactive live streams on the server
Writable: true
Runtime: false
@Deprecated public static final AVChatParameters.Key<AVChatLiveCompositingLayout> KEY_SESSION_LIVE_COMPOSITING_LAYOUT
AVChatManagerLite.createRoom(String, String, List, AVChatCallback)
is recommendedComposite layout in interactive live streaming
If a host joins an interactive live stream, different layout conbe configured User can pick a simple layout or custom composite layout
Writable: true
Runtime: false
public static final AVChatParameters.Key<java.lang.Boolean> KEY_SESSION_LIVE_MODE
Interactive live mode
Group meeting mode by calling AVChatManagerLite.joinRoom2(String, AVChatType, AVChatCallback)
.
Writable: true
Runtime: false
public static final AVChatParameters.Key<java.lang.String> KEY_COMPATIBILITY_CONFIG_SERVER
Custom server compatibility configuration
The value of the parameter is a URL pointing to a remote JSON configuration file. The SDK can retrieve and parse the JSON file and keep on the local storage If the cache works, the SDK loads the cached configuration. Otherwise, the configuration file is downloaded and parsed in the current call but will be applied in the next call. The SDK will sync the configuration file with the remote file every 15 minutes. If the remote configuration file is edited, the SDK will download the remote file, parse and cache the downloaded data.
Writable: true
Runtime: false
public static final AVChatParameters.Key<java.lang.String> KEY_COMPATIBILITY_CONFIG_LOCAL
Custom local compatibility
The parameter takes a local file path pointing a configuration file parsed by the SDK The SDK parses the local configuration file for each call For the same options, the local settings take precedence over the server settings.
Writable: true
Runtime: false
@Deprecated public static final AVChatParameters.Key<java.lang.Boolean> KEY_AUDIO_EXTERNAL_CAPTURE
External audio data capture
The SDK get external audio data and encode the data for publishing in a required format
Writable: true
Runtime: false
public static final AVChatParameters.Key<java.lang.Integer> KEY_AUDIO_PROCESS_DUMP_FLAG_DEBUG
public static final AVChatParameters.Key<java.lang.Boolean> KEY_PROFILE_TRACE_FLAG_DEBUG
public static final AVChatParameters.Key<java.lang.Integer> KEY_AUDIO_PLAYBACK_DEFAULT_SAMPLE_RATE
public void clear()
public RtcParameters getRawParameters()
public void setRawParameters(RtcParameters parameters)
public final AVChatParameters setRequestKeys(java.util.Set<AVChatParameters.Key> keys)
public final AVChatParameters setRequestKey(AVChatParameters.Key key)
public final boolean getBoolean(AVChatParameters.Key<java.lang.Boolean> key)
public final int getInteger(AVChatParameters.Key<java.lang.Integer> key)
public final java.lang.String getString(AVChatParameters.Key<java.lang.String> key)
public final void setInteger(AVChatParameters.Key<java.lang.Integer> key, int value)
public final void setBoolean(AVChatParameters.Key<java.lang.Boolean> key, boolean value)
public final void setString(AVChatParameters.Key<java.lang.String> key, java.lang.String value)
public final boolean containsKey(AVChatParameters.Key key)
public final <T> void set(AVChatParameters.Key<T> key, T value)
public final <T> T get(AVChatParameters.Key<T> key)
public final void setFloat(AVChatParameters.Key<java.lang.Float> key, float value)
public final float getFloat(AVChatParameters.Key<java.lang.Float> key)
public final void removeParameters(AVChatParameters.Key key)