Difference between revisions of "Inventory reporting"

From A-SMIL.org
Jump to: navigation, search
(Created)
 
(Designating a URL to the Inventory Handler)
Line 3: Line 3:
 
== Designating a URL to the Inventory Handler ==
 
== Designating a URL to the Inventory Handler ==
  
In your SMIL script, you need to add a section to your <tt>head</tt> section to define where the media player should PUT or POST the inventory file. A typical definition looks like this.
+
In your SMIL script, you need to add a section to your <tt>head</tt> section to define where the media player should PUT the inventory file. A typical definition looks like this.
  
 
<source lang="smil">
 
<source lang="smil">

Revision as of 16:11, 18 May 2012

A-SMIL player reports status of file objects in the player's cache. Both media files that have completed downloading and is in the process of being downloaded are reported. The report is sent back to designated server every 5 minutes.

Designating a URL to the Inventory Handler

In your SMIL script, you need to add a section to your head section to define where the media player should PUT the inventory file. A typical definition looks like this.

<head>
  <metadata>
    <x-server xmlns="http://schemas.adfotain.org/adapi-1.0">
      <subscriptionList>
        <subscription>
          <type>InventoryReport</type>
          <action>http://server/inventory_cgi</action>
          <method>put</method> 
        </subscription>
      </subscriptionList>
    </x-server>
  </metadata>
</head>

Here "http://server/inventory_cgi" is the path to your server-side script (PHP, etc.) on your log server.

Log File Format

A log file uploaded to the server looks like this.

<report xmlns="http://schemas.adfotain.org/adapi-1.0">
  <date>{createDate}</date>
  <version>1.0</version>
  <player id="{playerId}">
    <contentDirectory>
      <objectInfo>
        <object id="{uuid}" persistent="true|false">
          <resourceURI><!--resourceURI--></resourceURI>
          <state><!--TRANSFER|STREMAING|CHECKSUM|CHECKSUM_ERROR|COMPLETE--></state>
          <contentType><!--mimeType--></contentType>
          <contentLength><!--empty if unknown size or data is in TRANSFER state--></contentLength>
          <lastModified><!--empty if n/a, otherwise xsd:dateTime based on local TZ--></lastModified>
          <expires><!--empty, 0, or xsd:dateTime based on locale TZ--></Expires>
          <transferLength><!--size downloaded in cache so far--></transferLength>
        </object>
        <!-- More <object>'s -->
      </objectInfo>
    </contentDirectory>
  </player>
</report>

Related