This section describes the two types of CDS download:
Content is retrieved from yospaceCDS with a simple URL. The URL contains the media content's unique ID together with the conversion ID of the derivative from the original upload. Typically the conversion ID describes a format change.
The basic URL looks like this:
protocol://host/accessType/format/err/addressType/contentid[?name=title]
Where the components of the URL are as follows:
http://d.cds1.yospace.com for
downloadsrstp://s.cds1.yospace.com for
streamingmContent which is unrestricted can be freely downloaded.
Content which is restricted is only available to download if the requester provides an authenticated secret key-furthermore this key is only active for a limited duration (specifically, within a time window). For example, this mechanism allows media content to be made available only to users who have just purchased it.
You need to use yospaceCDS authentication library to generate keys. These are included in the URLs as shown above. Refer to the library API documentation for details.
The format definition describes the required output format. It has the general form:
<adapter>[~<adapter specific parameters>]
The adapter indicates the type of handler. Typical values are one of the following:
module - specific named module with special effects on a per-module basis
File Handlers (MIME type, conversion ID, variant
For file-type handlers, the adapter-specific parameters will be the MIME type, with hyphens replaced with underscores:
file~<mimeType>~<conversionId-variant>For example,
file~image_jpeg~1203-foowould indicate a pass-through handler request for a JPEG image of variant foo produced by conversion script 1203 (where foo might indicate a predefined scaling and image quality for this conversion, for example). Sincefile-type handlers are really just returning content, the MIME type must be explicit because no processing is performed on the content itself to determine what it is. That is, yospaceCDS uses the MIME type that is in the URL as the MIME type of the returned content. See the example URLs below to see this in context.
See the previous section for details of each of the components shown in this diagram.
The following are examples of URLs generated for content retrieval. Note that, because they are long, most of these URLs are wrapped over two lines.
http://d.cds1.yospace.com/u/file~video_mpeg~13-foo/0/m/1/2/3/4/abcd/petshow
This is the URL for unrestricted media content that has been processed by a conversion script (conversion ID 13). In this case, it’s a MPEG video. The conversion ID is 13 and the variant is foo.
http://d.cds1.yospace.com/r-12344556-0123456789abcdef/file~video_mpeg~13-foo/0/m/1/2/3/4/abcd/petshow
This URL is for an image similar to the previous example, except that this time it is restricted and will only be released if the key and time window are successfully authenticated.
rtsp://s.cds1.yospace.com/u/file~video_mpeg~3-99/0/m/7/4/5/5/fdrf/feast?title=Dog%20Biscuit
This is identical to the previous example, except that it is being streamed rather than downloaded.
The commonest form of retrieval is to request variant content, that is, content that is the result of a previously-run conversion. Remember that you can only retrieve converted media if you have the variant ID for it, that is, yospaceCDS sent a confirmation request to indicate that the conversion had been successfully completed.
This is converted media content because the conversion was applied before the download request was made. Effectively the download is retrieving a static file.
Use the file adapter, the conversion ID and the variant together as follows:
http://d.cds1.yospace.com/u/file~mimeType~conversionID-variant/0/m/contentId