Difference between revisions of "Play logs"

From A-SMIL.org
Jump to: navigation, search
(Created)
 
Line 61: Line 61:
 
</report>
 
</report>
 
</source>
 
</source>
 +
 +
== Related ==
 +
 +
* SMIL [[transport]]
 +
* [[SMIL_Connectivity|SMIL connectivity]]

Revision as of 05:34, 29 September 2009

The SMIL script does not support play logs. A-SMIL adds an extension that provides logging capability to media players.

The A-SMIL Logging Protocol

An A-SMIL media player utilizes the HTTP PUT method to upload play logs to an HTTP server that supports the PUT method.

WebDAV-compliant HTTP servers such as Microsoft Internet Information Server (IIS) and Apache HTTP Server 2.0 support the PUT method on directories for which WebDAV protocol is enabled. Follow the instructions for your web server to enable its WebDAV function.

Designating a URL to the Log Storage

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

<head>
  <metadata>
    <server xmlns="http://schemas.adfotain.org/adapi-1.0">
      <subscriptionList>
        <subscription>
          <type>PlaylogCollection</type>
          <action>http://server/webdav_path</action>
          <method>webdav</method> 
        </subscription>
      </subscriptionList>
    </server>
  </metadata>
</head>

Here "http://server/webdav_path" is the path to the WebDAV-enabled direction on your log server.

Designating a Log ID to a Media File

By default, playbacks of media files are not logged. If you want to report a play log when a media file is played, you need to specify so in your SMIL script. The following example illustrates how to assign a log ID to a video file so a log is generated when it is played.

<video src="http://server/video.mpg">
  <param name="logContentId" value="uuid-video" />
</video>

In the example above, uuid-video is a ID string that you can arbitrarily assign so when the video is played, a record is sent to the log server indicating the designated ID is bring played.

Log File Format

A-SMIL uploads log files to the server similar to the POPAI Log Standard 1.0 with several redundant fields removed to optimize network performance. 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}" multi-channel="true">
    <contentPlayLog displayDeviceId="display:0">
      <contentPlayed>
        <contentId>{log-id}</contentId>
        <startTime>{start-time}</startTime>
        <endTime>{end-time}</endTime>
      </contentPlayed>
      <!-- ... more contentPlayed records -->
    </contentPlayLog>
  </player>
</report>

Related