Skip to content

Capturer

Ajša Terko edited this page Feb 15, 2024 · 2 revisions



takeScreenshot(identity, videoType)

Description

Creates a screenshot of the participant's camera or screen share.

Arguments

  • string - Identity of the participant whose video should be captured.
  • VideoType - The type of video that should be captured.

Returns

  • Promise<T> - A promise that resolves to a generic response depending on the type of capturer used.

Example

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!');
    });

Tutorials

Migration guides

Reference documentation

Clone this wiki locally