Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Including the capture screen and record video component in a section

Updated on October 1, 2020

To support unique business use cases, you can include the component to capture screens and record videos inside your own section. As a result, you deliver an application that is flexible and more granular, because the section contains all the elements necessary for the component to work so that you can successfully include it in any harness. You also save time and resources, because you can reuse the section across your application.

For example, in a banking application, you can create a section that displays request details, and then reuse it for different types of requests, such as a loan request or a mortgage request. If you add the component to capture screens and record videos to the section, the users can use this component in every place in your application that utilizes this section.
Before you begin:

For greater flexibility and reuse, you first include the APIs for screen capture and video record in a section. Then you can reuse the section with APIs across your application as an embedded section.

    Include the bundle that contains the screen capture and record videos APIs in a section:

  1. In the navigation pane of Dev Studio, click Records.

  2. Expand the User Interface category, and then click Section.

  3. Open the section with non-auto-generated HTML in which you want to include the component.

    For example: Open the sample CaseCapScreenAndRecVideoBundles section.
  4. On the HTML tab, in the HTML source field, add the PegaCapScreenAndRecVideoBundles section that the component includes, and the bundle that contains the JavaScript that stores the capturing and recording functions, by entering the relevant code.

    For example: To add one of the sample bundles that the component includes, enter the following:<pega:include name="PegaCapScreenAndRecVideoBundles" type="Rule-HTML-Section" ></pega:include> <pega:onlyonce name="Case_cap_screen_video_rec_js"> <pega:static type="script" app="webwb"> <pega:bundle name="Case_cap_screen_video_rec" /> </pega:static> </pega:onlyonce>
  5. Click Save.

  6. Embed the section with the screen capture and record video APIs within another section:

  7. In the navigation pane of Dev Studio, click Records.

  8. Expand the User Interface category, and then click Section.

  9. In the list of instances, open the section with non-autogenerated HTML in which you want to include the capture screen or record video functionality.

    For example: Open the CaptureScreenAndRecordVideoExample sample section.
  10. On the toolbar, click LayoutEmbedded section.

  11. In the Section Include dialog box, in the Section list, select By name, and then in the name text field enter CaseCapScreenAndRecVideoBundles.

  12. On the toolbar, click ActionButton, and then drag the button inside the section with non-autogenerated HTML.

  13. Define an action set on the button to call the API:

    1. Double-click the button that you included in step 11

    2. Create a Run Script action set for the button.

      For more information, see Creating an action set.

    3. In the Function Name field, enter the API name.

      For example: Enter pega.screen.example.case_attachment.captureScreenshot to call an API for capturing screenshots.
    4. Click Submit.

    5. Click Save.

Result: At run time, when a user clicks a button to capture a screen or record a video, an overlay pops up that users interact with to capture their screenshots and videos. Your application then automatically attaches the resulting file to a currently open case.
  • Previous topic Defining custom functions for capture screen and record video component

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us