(II) Extra DNA JavaScript API functions
The JavaScript API can be used to pass any of the DNA Proxy API parameters (above), although with slightly modified syntax: For each:
parameter=The JavaScript syntax is instead
parameter:In addition, with JavaScript syntax, any values that are not integers must be enclosed within quotation marks such, e.g.
parameter: 'value'For example, setting the qos= parameter through the JavaScript API would be achieved as follows:
qos=125000(DNA Proxy API)is the same as
qos:125000 (DNA JavaScript API)Furthermore
service=streaming (DNA Proxy API)is the same as
service:'streaming' (DNA JavaScript API) In addition to using the DNA JavaScript API for passing parameters through the DNA Proxy API, several additional function calls are provided for the DNA JavaScript library file. These may be useful in integrating DNA delivery into a website.
btdna_poll() → yields “true” (if btdna detected) or false otherwise. This checks to determine whether btdna.exe is present and functional. It returns true if so, false otherwise. It is able to detect btdna.exe installation after page load in MSIE, but not in Firefox.
btdna_port() → yields a port number (if btdna.exe detected) or undefined otherwise. This is a convenience function wrapping btdna(). It returns the port number used by the btdna.exe service, or undefined if it is unable to detect btdna.exe
btdna_version() → version string (if btdna.exe detected and version string found) or undefined otherwise. This returns the version string of the btdna.exe service, or undefined if it is unable to detect btdna.exe or can't retrieve a version string. It can be useful if testing DNA acceleration with a specific version(s) of the DNA client.
