AUDIO AND VIDEO DOWNLOAD – SIMPLIFIED INTEGRATION PROTOCOL

1. Overview of the download process

The simplified integration protocol is used to provide several ways to download content links:

  • If the web site is browsed in a web navigator, downloads are available through navigator's download manager.
  • If the web site is browser in Pump, downloads are managed directly in a dedicated grid in the software.

The web page which provides media content displays a predefined JavaScript function.
If this function is available for Pump, the download is managed by the software:

  • Meta data related to the media content are extracted trough a JavaScript call using this function.
  • Media download (and other additional files according to meta data available, cover, subtitles, etc...) is handled by the software.

If the function is not available, the download is managed by the software, according to the media content-type. Meta data cannot be retrieved and only the media content is handled by the software.

2. Exposed JavaScript function

The function has the following structure:

function ExtractMetadata(url)

When you call the function above, you must pass one parameter: the url corresponding to the media download requested.

If the url is correct, recognised as valid media content, with associated metadata, a hashtable with all metadata available for this mediaContent is returned.

If the url is not correct, or not associated with a valid media content, a boolean set to “false” is returned.

Parameters Type Comments
url string Must be escaped as described in RFC 1738 part 2.2.
http://www.ietf.org/rfc/rfc1738.txt

3. Return value

If the url provided does not match with a media content, a boolean value is returned.

Val = ExtractMetadata(url);
Val == false

Otherwise, the result format is an array of hash tables.

These values are used to define hash keys:

a) key values for a standard video

Field Name Type Comments
mode String Equal to ‘download” or ‘streaming’
id String The productId attribute associated
content String Equal to 'video'
title String Title of the movie
author String Director’s name
duration Integer In seconds
posterurl HTTP URL The http location of the file that contains the movie artwork (e.g. http://player.vodoo.cvf.fr/app/michel_vaillant.jpg)
mediaurl HTTP URL The http or mms location of the file that contains the movie itself (e.g. http://player.vodoo.cvf.fr/app/michel_vaillant.wmv)

b) Key values list for a standard audio

Field Name Type Comments
mode String Equal to ‘download” or ‘streaming’
id String The productId attribute associated
content String Equal to 'audio'
title String Title of the music
author String Artist’s name
duration Integer In seconds
posterurl HTTP URL The http location of the file containing the cover artwork
mediaurl HTTP URL The http or mms location of the file that contains the track itself

4. Sample

Dump of a result value for correct media content matching

resultValue[0][“mode”] == “download”
resultValue[0][“title”] == “title 1”
resultValue[0][”author”] == “author 1”
resultValue[0][“duration”] == “54”
resultValue[0][“posterurl”] == “http:\\poster.fr”
resultValue[0][“mediaurl”] == “http:\\mediaurl.fr”
resultValue[1][“mode”] == “download”
resultValue[1][“title”] == “title 2”
resultValue[1][”author”] == “author 2”
resultValue[1][“duration”] == “66”
resultValue[1][“posterurl”] == “http:\\poster2.fr”
resultValue[1][“mediaurl”] == “http:\\mediaurl2.fr"

Discover PUMP

PUMP = the software for all your videos with search, download, play, share, convert, sync on mobile...