Difference between revisions of "Player events"

From A-SMIL.org
Jump to: navigation, search
m (Corrected <server> as <x-server>)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
A-SMIL players can report on various events happening to a player, including
+
A-SMIL players can report on various events happening to a player, such as :
  
 
<dl>
 
<dl>
Line 27: Line 27:
 
           <type>EventlogCollection</type>
 
           <type>EventlogCollection</type>
 
           <action>http://server/webdav_path</action>
 
           <action>http://server/webdav_path</action>
           <method>put</method>  
+
           <method>put</method>
 +
          <refreshInterval>3600</refreshInterval>
 +
          <retryInterval>3600</retryInterval>
 
         </subscription>
 
         </subscription>
 
       </subscriptionList>
 
       </subscriptionList>
Line 36: Line 38:
  
 
Here "http://server/webdav_path" is the path to the WebDAV-enabled direction on your log server.
 
Here "http://server/webdav_path" is the path to the WebDAV-enabled direction on your log server.
 
+
The refresh interval can be adjusted by adding an extra <refreshInterval> tag, this can control the report update frequency.
 
A log file named in the format <TT>event-{time-based-uuid}.xml</TT> will be placed in the server path by the player.
 
A log file named in the format <TT>event-{time-based-uuid}.xml</TT> will be placed in the server path by the player.
  
Line 63: Line 65:
 
</report>
 
</report>
 
</source>
 
</source>
 +
<br>
 +
== Player Event Listed by Event Source ==
 +
Player events listed by different event sources as below :
  
=== FETCH_FAILED Event ===
+
=== Source : ContentManager ===
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 
<dl>
 
<dl>
 +
<dt>event:
 +
<dd>LRU_OBJECT_REMOVED
 +
<dt>eventType:
 +
<dd><tt>informational</tt>  if lastAccessTime is before 30 days
 +
<dt>meta "resourceURI":
 +
<dd>URI for the object that removed
 +
<dt>meta "lastAccessTime":
 +
<dd>object last access time
 +
</dl>
 +
</div>
 +
<br>
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>OBJECT_REMOVED
 +
<dt>eventType:
 +
<dd><tt>informational</tt>
 +
<dt>meta "resourceURI":
 +
<dd>URI for the object that removed
 +
</dl>
 +
</div>
 +
<br>
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>OBJECT_UPDATED
 +
<dt>eventType:
 +
<dd><tt>informational</tt>
 +
<dt>meta "resourceURI":
 +
<dd>URI for the object that updated
 +
<dt>meta "contentLength":
 +
<dd>content length in bytes
 +
<dt>meta "lastModifiedTime":
 +
<dd>object last modified time
 +
</dl>
 +
</div>
 +
<br>
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>FETCH_FAILED
 
<dt>eventType:  
 
<dt>eventType:  
 
<dd><tt>error</tt> if no other versions available in cache; <tt>warning</tt> if an earlier version exists
 
<dd><tt>error</tt> if no other versions available in cache; <tt>warning</tt> if an earlier version exists
Line 77: Line 124:
 
<dd>If a previous version exists, its modified time
 
<dd>If a previous version exists, its modified time
 
</dl>
 
</dl>
 +
</div>
 +
<br>
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>FETCH_FAILED : E_CHECKSUM_NOT_MATCHED
 +
<dt>eventType:
 +
<dd><tt>error</tt>
 +
<dt>meta "xmp:errorMessage":
 +
<dd>E_CHECKSUM_NOT_MATCHED
 +
<dt>meta "md5":
 +
<dd>MD5 calculated from downloaded media
 +
</dl>
 +
</div>
 +
<br>
  
=== MEDIA_NOT_AVAILABLE Event ===
+
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 
<dl>
 
<dl>
 +
<dt>event:
 +
<dd>BROKEN_OBJECT_REMOVED
 
<dt>eventType:  
 
<dt>eventType:  
<dd><tt>error</tt>
+
<dd><tt>warning</tt>
 +
<dt>meta "resourceURI":
 +
<dd>URI for the object that removed
 +
<dt>meta "lastModifiedTime":
 +
<dd>object last modified time
 +
<dt>meta "contentLength":
 +
<dd>content length in bytes
 +
<dt>meta "transferLength":
 +
<dd>actual file size; -1 means file not found
 +
</dl>
 +
</div>
 +
<br>
 +
 
 +
 
 +
----
 +
 
 +
=== Source : MediaPlayer ===
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>MEDIA_NOT_AVAILABLE
 +
<dt>eventType:
 +
<dd><tt>error</tt>  
 
<dt>meta "resourceURI":
 
<dt>meta "resourceURI":
<dd>URI for the file that is not available
+
<dd>URI for the object that not available
 
</dl>
 
</dl>
 +
</div>
 +
<br>
  
=== MEDIA_OPEN_ERROR Event ===
+
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 
<dl>
 
<dl>
 +
<dt>event:
 +
<dd>MEDIA_OPEN_ERROR
 
<dt>eventType:  
 
<dt>eventType:  
 
<dd><tt>error</tt>
 
<dd><tt>error</tt>
 
<dt>meta "resourceURI":
 
<dt>meta "resourceURI":
<dd>URI for the file that fails to open
+
<dd>URI for the object that fails to open
 
</dl>
 
</dl>
 +
</div>
 +
<br>
  
=== MEDIA_PLAYBACK_ERROR Event ===
+
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 
<dl>
 
<dl>
 +
<dt>event:
 +
<dd>MEDIA_PLAYBACK_ERROR
 
<dt>eventType:  
 
<dt>eventType:  
 
<dd><tt>error</tt>
 
<dd><tt>error</tt>
 
<dt>meta "resourceURI":
 
<dt>meta "resourceURI":
<dd>URI for the file that fails to play
+
<dd>URI for the object that fails to play
 +
</dl>
 +
</div>
 +
<br>
 +
===  Source : MediaControl ===
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>SMIL_LOADED
 +
<dt>eventType:
 +
<dd><tt>informational</tt>
 +
<dt>meta "instanceId":
 +
<dd>fixed value:"display:0"
 +
<dt>meta "resourceURI":
 +
<dd>URI for the object that loaded
 +
<dt>meta "contentLength":
 +
<dd>object length in bytes
 +
<dt>meta "lastModifiedTime":
 +
<dd>object last modified time
 +
</dl>
 +
</div>
 +
<br>
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>SMIL_NOT_AVAILABLE
 +
<dt>eventType:
 +
<dd><tt>informational</tt>
 +
<dt>meta "instanceId":
 +
<dd>fixed value:"display:0"
 +
<dt>meta "resourceURI":
 +
<dd>URI for the object that not available
 +
</dl>
 +
</div>
 +
<br>
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>SMIL_OPEN_ERROR
 +
<dt>eventType:
 +
<dd><tt>error</tt> document error (too large, syntax error, other errors), other internal errors
 +
<dt>meta "instanceId":
 +
<dd>fixed value:"display:0"
 +
<dt>meta "resourceURI":
 +
<dd>URI for the object that loaded
 +
<dt>meta "contentLength":
 +
<dd>object length in bytes
 +
<dt>meta "lastModifiedTime":
 +
<dd>object last modified time
 +
</dl>
 +
</div>
 +
<br>
 +
 
 +
=== Source : System ===
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>STORAGE_FORMATTED
 +
<dt>eventType:
 +
<dd><tt>warning</tt>
 +
</dl>
 +
</div>
 +
<br>
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>STORAGE_TRUNCATED
 +
<dt>eventType:
 +
<dd><tt>warning</tt>
 +
</dl>
 +
</div>
 +
<br>
 +
 
 +
=== Source : TimeService ===
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>TIME_SYNCHRONIZED
 +
<dt>eventType:
 +
<dd><tt>informational</tt>
 +
<dt>meta "protocol":
 +
<dd>Time synchornization protocol ( http | rdate )
 +
<dt>meta "server":
 +
<dd>URI for the time server
 +
<dt>meta "adjustment":
 +
<dd>the time being adjusted after syhchronization
 +
</dl>
 +
</div>
 +
<br>
 +
 
 +
<div style="background-color:#ffffc0;text-align:left;border-style:dashed;border-color:#808080;border-width:1px;font-size:normal">
 +
<dl>
 +
<dt>event:
 +
<dd>TIME_SYNCHRONIZATION_ERROR
 +
<dt>eventType:
 +
<dd><tt>warning</tt>
 +
<dt>meta "protocol":
 +
<dd>Time synchornization protocol ( http | rdate )
 +
<dt>meta "server":
 +
<dd>URI for the time server
 
</dl>
 
</dl>
 +
</div>
 +
<br>
  
 
== Related ==
 
== Related ==
  
 +
* [[Inventory reporting]]
 
* [[Play logs]]
 
* [[Play logs]]
* [[Player information]]
 

Latest revision as of 06:44, 12 June 2014

A-SMIL players can report on various events happening to a player, such as :

Download failure (event FETCH_FAILED):
occurs when a file cannot be downloaded due to network failure or URL not found.
File not found error (event MEDIA_NOT_AVAILABLE):
occurs when file does not exist in player's storage. This can happen due to insufficient space which causes the player's storage "garbage collector" erasing files least-recently-used (LRU).
Media format error (event MEDIA_OPEN_ERROR):
occurs when the header information of the media file describes a format not supported by the player.
Media contents error (event MEDIA_PLAYBACK_ERROR):
occurs during playback of a media file, most likely due to a corrupt media stream.

Designating a URL for Reporting

In your SMIL script, you need to add a section to your head section to define where the media player should upload its logs. For event reporting it should looks like this.

<head>
  <metadata>
    <x-server xmlns="http://schemas.adfotain.org/adapi-1.0">
      <subscriptionList>
        <subscription>
          <type>EventlogCollection</type>
          <action>http://server/webdav_path</action>
          <method>put</method>
          <refreshInterval>3600</refreshInterval>
          <retryInterval>3600</retryInterval>
        </subscription>
      </subscriptionList>
    </x-server>
  </metadata>
</head>

Here "http://server/webdav_path" is the path to the WebDAV-enabled direction on your log server. The refresh interval can be adjusted by adding an extra <refreshInterval> tag, this can control the report update frequency. A log file named in the format event-{time-based-uuid}.xml will be placed in the server path by the player.

Event Report Format

The A-SMIL event report 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}">
     <playerEventLog>
       <event>
         <eventType>informational|warning|error|critical</eventType>
         <eventTime>{eventTime}</eventTime>
         <eventSource>{moduleName}</eventSource>
         <eventName>{eventEnumName}</eventName>
         <metadata>
           <meta name="{meta1-name}" content="{meta1-content}"/>
           <meta .../>
         </metadata>
       </event>
     </playerEventLog>
  </player>
</report>


Player Event Listed by Event Source

Player events listed by different event sources as below :

Source : ContentManager

event:
LRU_OBJECT_REMOVED
eventType:
informational if lastAccessTime is before 30 days
meta "resourceURI":
URI for the object that removed
meta "lastAccessTime":
object last access time


event:
OBJECT_REMOVED
eventType:
informational
meta "resourceURI":
URI for the object that removed


event:
OBJECT_UPDATED
eventType:
informational
meta "resourceURI":
URI for the object that updated
meta "contentLength":
content length in bytes
meta "lastModifiedTime":
object last modified time


event:
FETCH_FAILED
eventType:
error if no other versions available in cache; warning if an earlier version exists
meta "resourceURI":
URI for the file that failed to transfer
meta "transferLength":
Number of bytes transferred so far
meta "lastCachedLength":
If a previous version exists, its length in bytes
meta "lastCachedModifiedTime":
If a previous version exists, its modified time


event:
FETCH_FAILED : E_CHECKSUM_NOT_MATCHED
eventType:
error
meta "xmp:errorMessage":
E_CHECKSUM_NOT_MATCHED
meta "md5":
MD5 calculated from downloaded media


event:
BROKEN_OBJECT_REMOVED
eventType:
warning
meta "resourceURI":
URI for the object that removed
meta "lastModifiedTime":
object last modified time
meta "contentLength":
content length in bytes
meta "transferLength":
actual file size; -1 means file not found




Source : MediaPlayer

event:
MEDIA_NOT_AVAILABLE
eventType:
error
meta "resourceURI":
URI for the object that not available


event:
MEDIA_OPEN_ERROR
eventType:
error
meta "resourceURI":
URI for the object that fails to open


event:
MEDIA_PLAYBACK_ERROR
eventType:
error
meta "resourceURI":
URI for the object that fails to play


Source : MediaControl

event:
SMIL_LOADED
eventType:
informational
meta "instanceId":
fixed value:"display:0"
meta "resourceURI":
URI for the object that loaded
meta "contentLength":
object length in bytes
meta "lastModifiedTime":
object last modified time


event:
SMIL_NOT_AVAILABLE
eventType:
informational
meta "instanceId":
fixed value:"display:0"
meta "resourceURI":
URI for the object that not available


event:
SMIL_OPEN_ERROR
eventType:
error document error (too large, syntax error, other errors), other internal errors
meta "instanceId":
fixed value:"display:0"
meta "resourceURI":
URI for the object that loaded
meta "contentLength":
object length in bytes
meta "lastModifiedTime":
object last modified time


Source : System

event:
STORAGE_FORMATTED
eventType:
warning


event:
STORAGE_TRUNCATED
eventType:
warning


Source : TimeService

event:
TIME_SYNCHRONIZED
eventType:
informational
meta "protocol":
Time synchornization protocol ( http | rdate )
meta "server":
URI for the time server
meta "adjustment":
the time being adjusted after syhchronization


event:
TIME_SYNCHRONIZATION_ERROR
eventType:
warning
meta "protocol":
Time synchornization protocol ( http | rdate )
meta "server":
URI for the time server


Related