Receiver for HTML5 SDK

Introduction

Receiver for HTML5 SDK provides a set of API that enables Windows App and desktop delivery to the custom websites from Citrix XenApp and XenDesktop. This SDK enables hosting of Receiver for HTML5 on a web server other than StoreFront. The ability to host HTML5 HDX engine helps in better caching, updating and sharing of resources.

Using this SDK, you can embed the view of remote Windows applications and desktops in your website, control its size, enable disconnect using some commands, change the error strings to make them custom for your requirement. Please refer the documentation to know more about the options available with the SDK.

This SDK requires the ICA file to launch the XenApp or XenDesktop session. This ICA file can be generated using StoreFront API or Web Interface API.

SDK Capabilities

  1. Session Launch
    Currently Receiver for Web launches the HTML5 HDX session in a new tab.This API allows HTML5 HDX session to be embedded within a website or to be opened in a new tab.
  2. HTML5 Receiver Events
    HTML5 HDX session provides a set of events for the website to give better control on the session with respect to various connection states, errors and URL redirection. The user experience with the HDX session can be customized using the events.
  3. UI Customizations
    It is possible to leverage the embedding of the session along with the receiver events to achieve some of the UI customizations mentioned below to build preferred experience:
    1. Session connection experience
      Custom connection experience could be built using the various connection events.
    2. Error dialog customization
      Following are the 2 ways to customize error dialog.
      • Suppress error dialog shown by Receiver for HTML5 and show the custom error dialog:
        1. When the session is embedded within the website, custom error UI that aligns with the website could be shown using the error events and suppressing the error dialog shown by Receiver for HTML5 using the configuration options.
      • Error dialog shown by Receiver for HTML5 with custom error message:
        • Error messages in the locales folder can be edited which will be picked by error dialog shown by Receiver for HTML5.
    3. URL Redirection dialog customization
      URL redirection can be customized by the website using the urlredirection events and suppressing the URL redirection dialog shown by Receiver for HTML5 using the configuration options.
  4. Session disconnect
    Website could disconnect or send “ctrl+alt+del” to the session using the APIs. This is more helpful when the in-session toolbar is hidden.

Security considerations

  1. Change the X-Frame-Options or frame-ancestors CSP directive on the server to allow embedding of HDXEngine.html (provided with SDK package) from same origin.
  2. If Receiver for HTML5 is hosted/loaded from a different origin than that of the custom website then change the CSP directives to allow scripts/other resources to be loaded. To have better enforcement of directives on different browsers, ensure to edit the CSP directives using both http headers from server and also the meta tag in HDXEngine.html (provided with SDK package). Also, edit the allow-access-control-origin header to enable cross-site resource sharing.

Sample SDK example

Refer the end-to-end example in the download. This example shows the integration with StoreFront SDK and Receiver for HTML5 SDK

Steps to run the SDK sample example page:

  • Copy all 3 files from CitrixReceiverHTML5SDK_1.8.zip to Receiver for Web root folder
  • Copy SDKExample.html to the Receiver for Web root folder
  • Open the StoreFront admin console, select the Authentication node and click "Add/Remove Methods". Enable "HTTP Basic"
  • Navigate to the SDKExample.html in a Web browser

API documentation

Detailed API documentation along with sample code snippets should be taken from the SDK documentation download

Note: Citrix account credentials are required to access certain SDK content.  If you do not have a Citrix account, please complete the Developer Registration process.

Please use the support forum below to report any issues, for questions, and for general discussion.

Support Forum

Watch related videos on the Citrix Developer YouTube channel.

Share your ideas with us

Create your Citrix Developer account today
An account gives you access to all of the benefits of the Citrix Developer community.

You built a great solution integrating with Citrix APIs, now continue the next step of your journey with Citrix Ready.