Alternate XML Response

The IVA Video API works seamlessly to deliver video to many different players.  However, we know that some players have trouble following the redirect of the “cmd= 6” option in our video API.  In many cases it is because the developer is not using the proper application URL from step one of the video API. So it often makes sense to stop and check the player requirements for video, or for the developer to simply recheck the application URL as this is the simplest fix for the problem.

If this fails, and the player just cannot follow the redirect to the video, your alternative is to use the option “cmd = 3”.  This option, instead of telling our API to redirect to the video, instead returns an XML response with information about the video including the direct video URL.  You can then parse the XML and grab the video link to pass directly to the player.  (IVA suggests that you do NOT cache the links to these videos as they have an expiration date after which they no longer work.)  Using this option will cause a slight delay in getting the video because of the extra steps needed on the server side of your website or application.  If you still need to use this option you will create the video API links as described in the documentation except to change “cmd = 6” to “cmd =3”.

cmd=6 - does a 302 redirect to the video. (Recommended option)
cmd=3 - returns an XML response that contains the direct link to the CDN.
XML Response (cmd=3&fmt=4&videokbrate=750)

The XML returned to the Flash player contains a playlist node that contains request info and videos. Below is an example:

<name>TEST ACCOUNT</name>
<contentprovider>Video Detective Network</contentprovider>
<copyright>Universal Studios Home Entertainment</copyright>

Video API XML Request Information

This section of XML contains information about the entire playlist. It contains special business rules based on the customerid along with some parameters that are used for the entire request.
NameCustomer name based on the customerid
 ContentProvider Attribution for where the content originated
 MaxVideoDuration Allowable duration based on the customer profile. Values: -1 = no limit, 0 = content not allowed, otherwise the value is the duration in seconds.
 MaxMusicDuration  Allowable duration based on the customer profile. Values: -1 = no limit, 0 = content not allowed, otherwise the value is the duration in seconds.
 MaxRate Max videokbrate for customer to display.  Values: -1 = no limit, otherwise is set to the allowable kbps.
 InserAdBeginning Determines ad insertion placement based on customer profile.  Values: 255 = true,  0 = false.
 InsertAdEnding Determines ad insertion placement based on customer profile.  Values: 255 = true,  0 = false.
 SessionIDPass-through value from request. This is used for 3rd party session tracking (CDATA).
 CustomData Pass-through value from request. Custom Player can use this data however needed.
 VideoIs any video item inside the playlist. A video can either be content from the VideoDetective/IVA network or a reference to an advertisement from a 3rd party server.

Video API XML Content Return

AdvertisementTrue or false.
PublishedIdUnique ID for the specific video asset.
CopyrightName of the copyright holder (studio or label).
TitleTitle found in the VideoDetective/IVA database
YearYear the content was first released.
URLBase URL to the video asset.
PhotoURLURL of the screen capture associated with the asset. Default size is 320 x 240 px.
PhotoNotAvailableImage for if there is no screen capture associated with the asset.
MediaIDDefines the type of content. Values: 0 = Movie, 3 = Music Video, ect.
StreamlengthinsecondsEstimated length of the content in seconds
Starttimelocation in seconds to start the playback of the video. Default is empty = 0 .
DurationLength in seconds to play the content. Default is empty = full playback
ClientSkipAllow or disallow the ability to fast forward or skip the content. Values: Default = 255 (true) or 0 = false.

In most cases using this implementation of the Video API will throw off the results in our analytics reporting.  The work around for this is to pass the header “X-Forwarded-For”.  This will pass the originating IP address of the user giving us the data we need to populate accurate reports for your account.  See the wikipedia page for more information.