Difference between revisions of "Player ID"

From A-SMIL.org
Jump to: navigation, search
(Added Content Source Macro)
Line 1: Line 1:
A-SMIL players use the HTTP "User-Agent" header to report its ID to server. Each player reports two pieces of information in this process: a 128-bit UUID (in 8-4-4-4-12 hex string format) and a player name (configurable by the user).
+
There are two ways a server can identify the player by its 128-bit UUID (in 8-4-4-4-12 lower-case hex string format). Server finds the UUID in the following ways.
 +
 
 +
== Content Source Macro ==
 +
 
 +
Each player as a "Content Source" setting configured to point to an URL loaded at boot time. The URL can contain a macro <tt>{$player-id}</tt> that is replaced with the player's UUID.
 +
 
 +
For example, player with ID "f1835d9f-be8f-4054-9e6c-123456789012" configured to load from
 +
 
 +
<pre>
 +
http://server.com/player-{$player-id}.smil
 +
</pre>
 +
 
 +
loads the following actual URL at boot time:
 +
 
 +
<pre>
 +
http://server.com/player-f1835d9f-be8f-4054-9e6c-123456789012.smil
 +
</pre>
 +
 
 +
Note: this feature is only available in player firmware version 1.4.7 and later.
 +
 
 +
== User-Agent Header ==
 +
 
 +
A-SMIL players use the HTTP "User-Agent" header to report its ID to server. Each player reports two pieces of information in this process: a 128-bit UUID and a player name (configurable by the user).
  
 
The player formats its User-Agent string in the following format:
 
The player formats its User-Agent string in the following format:

Revision as of 08:57, 8 July 2010

There are two ways a server can identify the player by its 128-bit UUID (in 8-4-4-4-12 lower-case hex string format). Server finds the UUID in the following ways.

Content Source Macro

Each player as a "Content Source" setting configured to point to an URL loaded at boot time. The URL can contain a macro {$player-id} that is replaced with the player's UUID.

For example, player with ID "f1835d9f-be8f-4054-9e6c-123456789012" configured to load from

http://server.com/player-{$player-id}.smil

loads the following actual URL at boot time:

http://server.com/player-f1835d9f-be8f-4054-9e6c-123456789012.smil

Note: this feature is only available in player firmware version 1.4.7 and later.

User-Agent Header

A-SMIL players use the HTTP "User-Agent" header to report its ID to server. Each player reports two pieces of information in this process: a 128-bit UUID and a player name (configurable by the user).

The player formats its User-Agent string in the following format:

User-Agent: ADAPI/{$APIVersion} (UUID:{$playerId}; NAME:{UrlEncode(UTF8($playerName))}) {$firmwareFamily}/{$firmwareVersion}

For example, for a player with player ID "f1835d9f-be8f-4054-9e6c-123456789012" and player name "12:34:56:78:90:12", the User-Agent header may look like:

User-Agent: ADAPI/1.0 (UUID:f1835d9f-be8f-4054-9e6c-123456789012; NAME:12%3A34%3A56%3A78%3A90%3A12) SMP863X-ADAPI/1.3.2

Related