FScreenCaptureParameters2

Screen sharing configurations.

USTRUCT(BlueprintType)
struct FScreenCaptureParameters2
{
	GENERATED_BODY()
public:
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenCaptureParameters2")
	bool captureAudio = false;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenCaptureParameters2")
	FScreenAudioParameters audioParams = FScreenAudioParameters();
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenCaptureParameters2")
	bool captureVideo = false;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenCaptureParameters2")
	FScreenVideoParameters videoParams = FScreenVideoParameters();
#if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS)
	FScreenCaptureParameters2(){}
	FScreenCaptureParameters2(const agora::rtc::ScreenCaptureParameters2 & AgoraData){
		captureAudio = AgoraData.captureAudio;
		audioParams = FScreenAudioParameters(AgoraData.audioParams);
		captureVideo = AgoraData.captureVideo;
		videoParams = FScreenVideoParameters(AgoraData.videoParams);
	}
	agora::rtc::ScreenCaptureParameters2 CreateAgoraData() const {
		agora::rtc::ScreenCaptureParameters2 AgoraData;
		AgoraData.captureAudio = captureAudio;
		AgoraData.audioParams = audioParams.CreateAgoraData();
		AgoraData.captureVideo = captureVideo;
		AgoraData.videoParams = videoParams.CreateAgoraData();
		return AgoraData;
	}
	void FreeAgoraData(agora::rtc::ScreenCaptureParameters2& AgoraData) const {
		audioParams.FreeAgoraData(AgoraData.audioParams);
		videoParams.FreeAgoraData(AgoraData.videoParams);
	}
#endif
};

Attributes

captureAudio
Determines whether to capture system audio during screen sharing:
  • true: Capture system audio.
  • false: (Default) Do not capture system audio.
Note:
  • Due to system limitations, capturing system audio is only applicable to Android API level 29 and later (that is, Android 10 and later).
  • To improve the success rate of capturing system audio during screen sharing, ensure that you have called the SetAudioScenario method and set the audio scenario to AUDIO_SCENARIO_GAME_STREAMING.
audioParams
The audio configuration for the shared screen stream. See FScreenAudioParameters.
Attention: This parameter only takes effect when captureAudio is true.
captureVideo
Whether to capture the screen when screen sharing:
  • true: (Default) Capture the screen.
  • false: Do not capture the screen.
Note: Due to system limitations, the capture screen is only applicable to Android API level 21 and above, that is, Android 5 and above.
videoParams
The video configuration for the shared screen stream. See FScreenVideoParameters.
Attention: This parameter only takes effect when captureVideo is true.