Downloads to a Web Browser

BitTorrent DNA can be used for the delivery of files that are linked off of web pages and downloaded using a standard web browser.  There are two integration methods suitable for this:

  1. DNA Downloader
  2. JavaScript API

1. DNA Downloader

The DNA Downloader integration method involves creation of a small executable that automates both the DNA client installation and the download of a specified file thru the DNA peer network (using the DNA client).  During the download process the DNA Downloader provides visibility into the file download completion via a progress bar.  The DNA Downloader is a particularly good integration method for application/game installation files (such as .exe or .msi) as after the download completes the file can be automatically executed making the file download and the application installation appear to be one seamless process.

For a more detailed description of the DNA Downloader see: DNA Downloader

 

2. JavaScript API

The JavaScript integration involves modifying HTML on a webpage that links to a file by containing it within a JavaScript function call, btdna().

Example:

btdna({url:'http://my/own/file'})

The btdna() function detects the presence of DNA on the end user’s computer and will return a rewritten URL which uses the DNA client to access the content.  DNA will offload the content delivery using the peer network.  If DNA is not available the URL will not be rewritten and the end-user will get the content directly from the server as normal.  In this way, all end users will continue to be able to access content on your website regardless or not whether they have the DNA client installed on their computers.

For a more detailed description of the JavaScript integration method, along with sample code and API documentation see: Download Service to a Web Browser – JavaScript