For Server Rendered Application [No Page Refresh]
If your application does not have any page refresh or full page reloads in between the workflow and your application is built on JSP, PHP, ASP.NET, Java frameworks, you can use the below mentioned steps to integrate the Proview session initiation and termination.
Note: Client Domain needs to be whitelisted before script execution.
Start Session
To integrate Proview and to start a session in your application, the recommended workflow is mentioned below. Insert this JavaScript code snippet into the pages where proctoring needs to be enabled. As a best practice, it is always recommended to start the session prior to initiation of your workflow or the timer beginning as it should not put the user at a disadvantage in case of high response or load time.
Script
<script> // Initializing proctoring session (function(i,s,o,g,r,a,m){i['TalviewProctor']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window, document, 'script', ‘<init-script>’, 'tv'); tv('init', '<token>', { sessionTitle: '<Title for the session>', session_type: '<type of proctoring>', profileId: '<assessment_platform_candidate_id>', session: '<assessment_session_id>', event_external_id: '<live_proctoring_event_external_id>', // Optional previewStyle:'position: fixed; bottom: 0px;', initCallback: function(err, uuid){ // err: Errors from ProctorClient // uuid: Unique UUID created by Proctoring system for the session console.log(err, uuid); } }); </script>
Stop Session
Upon the completion of the assessment, proctoring can be stopped in two ways.
- This approach requires no code changes and initiates automatically upon closing/unload of the window in which proctoring code is injected. The Proview application will unload and attempt to drain the outstanding buffer of data to the server before the window closes. However, there may not be adequate time for the application to exit cleanly, and recordings could be corrupted.
- Alternatively, the integrating application can make a stop function call to the Proview application by passing a callback as a single parameter. This function takes no arguments.
Script
<script> ProctorClient3.stop(function () { }); </script>
Init script
https://cdn.proview.io/v7/init.js
This JavaScript snippet loads all the required assets for Proctoring into your webpage, as an embedded application. The second line of the snippet is where the configurations are mentioned for the type of integration to be done. The init function as described above takes three arguments.
- The first argument states the nature of the call, i.e. initialization, and must be set the value of 'init' for all applications.
- The second argument is the account token that is being used for your account. It will be of the GUID format (ex: b3f6224e-d072-4gea-9053-9216b9994d43). Contact your account manager to generate your account token.
- The third argument is an options hash which supports various configuration options as described.
Parameter | Type | Default | Description |
sessionTitle | String | Title for the session as string value | |
session_type | String |
| |
session | String | Null | The unique name of the session will be used by Proctoring to tag this session. It is recommended to use a unique ID of the session if so, used the Proview log records can be automatically reconciled with integrating application’s internal assessment records |
profileId | String | Null | User ID unique for each user, this is an optional feature if you like to monitor users across sessions and correlate their usage from multiple sessions. |
previewStyle | String | False | Allow assessment platform to position in screen recording playback view as per the assessment screen layout |
initCallback | Function | This callback function can take two parameters:
| |
ProctorClient3.stop | Function | Stop function that will stop the initialized proctoring session and the function itself take are ref/function as an argument which will trigger once the session stopped successfully. |
Best practices for Proview integration:
- Ensure that Proview loads prior to your workflow or module initiation
- Terminate Proview after your workflow or module completion by the user
- Error handling while Proview initiation must be designed to avoid bad UX
- A Proview session must not be allowed to run for more than 90 minutes
- If a workflow or module requires more than 90 minutes, a page refresh and data upload should be done at an interim point in the workflow
- Ensure camera, microphone and notification permissions are not being overwritten by your application
- Server errors and API errors should be handled gracefully for the entire session
- Ensure WebRTC and HTTPS protocols are supported by your application
- During integration development, you can reach out to the Talview implementation support team for any queries or issues that you encounter
- Post-development closure, you will also be provided with test scripts and functional scenarios to validate the end to end integration is working as expected
- A Talview QA engineer will test the end to end workflow with your team on staging as well as part of the production validation test to ensure fringe errors do not creep in
- In case you are not opting for the embedded playback, you can log in to the Proview admin account with credentials provided at the time of requirement gathering
- All Proview sessions will be available on that account for your reference with respect to the Session ID of the user