TRTCVideoStreamType
parameter to TRTCVideoStreamTypeSub
when calling the startScreenCapture
API.TRTCVideoStreamType
parameter to TRTCVideoStreamTypeBig
when calling the startScreenCapture
API.Description | C++ | C# | Electron |
Selects a sharing source | selectScreenCaptureTarget | ||
Starts screen sharing | startScreenCapture | ||
Pauses screen sharing | pauseScreenCapture | ||
Resumes screen sharing | resumeScreenCapture | ||
Ends screen sharing | stopScreenCapture |
getScreenCaptureSources
to get a list of sharable sources, which is returned via the response parameter sourceInfoList
.getScreenCaptureSources
includes desktop windows.startScreenCapture
API to start screen sharing.selectScreenCaptureTarget
to change the sharing source.pauseScreenCapture
and stopScreenCapture
is that pauseScreenCapture
pauses screen capturing and displays the image at the moment it is paused. Remote users see the paused video image until screen capturing is resumed.setSubStreamEncoderParam
API to set the video quality of screen sharing, including resolution, bitrate, and frame rate. We recommend the following settings:Clarity | Resolution | Frame Rate | Bitrate |
FHD | 1920 x 1080 | 10 | 800 Kbps |
HD | 1280 x 720 | 10 | 600 Kbps |
SD | 960 x 720 | 10 | 400 Kbps |
ITRTCCloudCallback
.
Users who want to view the shared screen can start rendering the substream image of the remote user by calling the startRemoteView API.//Sample code: Watch the shared screenvoid CTRTCCloudSDK::onUserSubStreamAvailable(const char * userId, bool available) {LINFO(L"onUserSubStreamAvailable userId[%s] available[%d]\\n", UTF82Wide(userId).c_str(), available);liteav::ITRTCCloud* trtc_cloud_ = getTRTCShareInstance();if (available) {trtc_cloud_->startRemoteView(userId, liteav::TRTCVideoStreamTypeSub, hWnd);} else {trtc_cloud_->stopRemoteView(userId, liteav::TRTCVideoStreamTypeSub);}}
SourceTypeWindow
) is shared, if the window size changes, will the resolution of the video stream change accordingly?setSubStreamEncoderParam
API to set encoding parameters for screen sharing or specify the parameters when calling the startScreenCapture
API.
Was this page helpful?