AudioCaptureParameters
The audio configuration for the shared screen stream.
public static class AudioCaptureParameters { public int sampleRate = 16000; public int channels = 2; public int captureSignalVolume = 100; public boolean allowCaptureCurrentApp = true; @CalledByNative("AudioCaptureParameters") public int getSampleRate() { return sampleRate; } @CalledByNative("AudioCaptureParameters") public int getChannels() { return channels; } @CalledByNative("AudioCaptureParameters") public int getCaptureSignalVolume() { return captureSignalVolume; } @Override public String toString() { return "AudioCaptureParameters{" + "sampleRate=" + sampleRate + ", channels=" + channels + ", captureSignalVolume=" + captureSignalVolume + ", allowCaptureCurrentApp=" + allowCaptureCurrentApp + '}'; } }
Only available where captureAudio is true
.
Attributes
- sampleRate
- Audio sample rate (Hz). The default value is 16000.
- channels
- The number of audio channels. The default value is 2, which means stereo.
- captureSignalVolume
- The volume of the captured system audio. The value range is [0, 100]. The default value is 100.
- allowCaptureCurrentApp
- Whether to capture audio from the current app:
true
: (Default) Caputre audio from the current app.false
Do not capture the audio from the current app:
Note: This parameter can only set whether to capture audio from the current app and cannot control whether the captured app audio is published to the channel. You need to set it through the options parameter when calling joinChannel [2/2] or updateChannelMediaOptions.