-
Notifications
You must be signed in to change notification settings - Fork 0
Capturer
Ajša Terko edited this page Feb 15, 2024
·
2 revisions
Creates a screenshot of the participant's camera or screen share.
-
string
- Identity of the participant whose video should be captured. -
VideoType
- The type of video that should be captured.
-
Promise<T>
- A promise that resolves to a generic response depending on the type of capturer used.
let infobipRTC = createInfobipRtc('2e29c3a0-730a-4526-93ce-cda44556dab5', {debug: true});
let applicationCall = infobipRTC.callApplication('45g2gql9ay4a2blu55uk1628', ApplicationCallOptions.builder().setVideo(true).build());
let identity = 'capture_test_identity';
let videoType = VideoType.SCREENSHARE;
// take screenshot of the participant's screen share, which is directly uploaded to the server (cloud)
applicationCall.serverCapturer().takeScreenshot(identity, videoType)
.then(fileResponse => {
console.log(`Screenshot uploaded to the server with id: ${fileResponse.id}, and name: ${fileResponse.name}`);
}).catch(err => {
console.log('There was an error uploading a screenshot to the server!');
});