Demos

Customizing the Install: Using Custom In-line Text

The NetSession installation uses the DLMHelper method setRecommendedInstall to invoke an installation handler. The default installation handler is displayInstallerPopup. You can define and use a custom handler as shown in this demonstration. Here, the custom handler uses in-line text with instructions and links to proceed with the installation.

If NetSession Interface is already installed on your computer:

Note that to view this demonstration, you must not have NetSession Interface running on your device, since NetSession will detect it's already running and will skip immediately to the download. If you have installed the client, you need to stop it as follows:

- In Windows, open the Control Panel and run Akamai NetSession Interface Control Panel. Open the Advanced tab and click the Stop button.

- On Mac OSX, open the System Preferences pane. Under Other, run Akamai. Open the Advanced tab and click the Stop button.

Starting the Demonstration

Click the Start download link to run the demonstration. Code not shown here will detect that you are not running NetSession Interface and will ask you to download the installer and run it. After that, the download will start automatically. You can pause and restart the download.

Demo

Start download

Code

    var url = "http://client.akamai.com/install/test-objects/10MB.bin";
    var dlm = new DLM(DLMCID, url, null, "dlmContainer", "startDLM");
    dlm.downloadPath = "prompt";
  
    DLMHelper.setRecommendedInstall(function()
    {
      // Display the div, which is already a part of the page
      var installationDiv = document.getElementById("installationDiv");
      installationDiv.style.display = "block";
      // Clicking the ‘Install link’ results in NetSession installer getting downloaded
      var installationLink = document.getElementById("installationLink");
      installationLink.onclick = function() {
        DLMHelper.downloadInstaller();
        return false;
      }
    });
              

NetSession Demonstrations