Work with NICE DCV features - NICE DCV
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Work with NICE DCV features

The availability of NICE DCV features depends on the permissions configured for the NICE DCV session and the capabilities of the client's web browser.

The features that are available in a NICE DCV session are managed by the permissions that have been specified for the session. This means that even if a feature is supported by the NICE DCV Web Client SDK, access to that feature might be prevented based on the permissions defined by the session administrator. For more information, see Configuring NICE DCV Authorization in the NICE DCV Administrator Guide .

Understanding the featuresUpdate callback function

When the availability of a feature in a NICE DCV session changes, the NICE DCV Web Client SDK notifies you using the featuresUpdate callback function that you specify at the time of establishing the connection. For example:

featuresUpdate: function (connection, list) { ... },

The callback function notifies you only of the features for which the availability has changed. The list parameter is an array of strings, and it includes only the names of the updated features. For example, if the availability of the audio input feature changes for the session, the parameter includes only ["audio-in"] . If at a later point, the availability of the clipboard copy and paste features change for the session, the parameter includes only ["clipboard-copy", "clipboard-paste"] .

Handling feature updates

The featuresUpdate callback function only notifies you that the availability of one or more features has changed. To know which features were updated, you must query the feature using the connection.queryFeature method. This can be done at any time after the notification of change has been received. This method returns a Promise that resolves to the requested feature's updated status. The status value is always associated and it has a Boolean ( true | false ) property called enabled . Some features might have additional properties in the status value. If the feature's availability has not been updated, it's rejected.

The following example code shows how to do this.

// Connection callback called function featuresUpdate (_, list) { if (list.length > 0) { list.forEach((feat) => { connection.queryFeature(feat).then(status => console.log(feat, "is", status.enabled))); }); } }