EchoTestConfiguration

Configuration for audio and video echo test.

@JsonSerializable(explicitToJson: true, includeIfNull: false)
class EchoTestConfiguration {
  const EchoTestConfiguration(
      {this.view,
      this.enableAudio,
      this.enableVideo,
      this.token,
      this.channelId,
      this.intervalInSeconds});

  @JsonKey(name: 'view')
  final int? view;

  @JsonKey(name: 'enableAudio')
  final bool? enableAudio;

  @JsonKey(name: 'enableVideo')
  final bool? enableVideo;

  @JsonKey(name: 'token')
  final String? token;

  @JsonKey(name: 'channelId')
  final String? channelId;

  @JsonKey(name: 'intervalInSeconds')
  final int? intervalInSeconds;

  factory EchoTestConfiguration.fromJson(Map<String, dynamic> json) =>
      _$EchoTestConfigurationFromJson(json);

  Map<String, dynamic> toJson() => _$EchoTestConfigurationToJson(this);
}

Properties

view
The view used to render the local user's video. This parameter only applies to scenarios testing video devices. Make sure enableVideo is set to true.
enableAudio
Whether to enable the audio device:
  • true: (Default) Enables the audio device. Set to true to test the audio device.
  • false: Disables the audio device.
enableVideo
Whether to enable the video device. Video device detection is not supported yet. Set this parameter to false.
token
Token used to ensure the security of the audio and video echo test. If you have not enabled the App Certificate in the console, you do not need to set this parameter. If you have enabled the App Certificate, you must provide a Token, and the uid used to generate the Token must be 0xFFFFFFFF, and the channel name used must uniquely identify each echo test. For how to generate a Token on the server, refer to Use Token for Authentication.
channelId
Channel name identifying each audio and video echo test. To ensure proper functioning of the echo test, the channel name used by each terminal user under the same project (App ID) on different devices must be unique.
intervalInSeconds
Sets the interval or delay for returning the audio and video echo test results. Value range is [2,10] in seconds. Default is 2 seconds.
  • For audio echo test, the result is returned at the interval you set.
  • For video echo test, the video is displayed briefly, then the delay gradually increases until it reaches the set value.