This document specifies data exchange between WMS plug-in and gateway (web server).
Voynex Media Guard assumes that user has two servers:
These servers can be located at the same computer.
Gateway interconnects with Voynex Media Guard via application layer protocol based on HTTP. Thus gateway server has to incorporate functionality of the HTTP server. The most common implementation of the gateway looks like this: business logics is coded in CGI scripts, HTTP communication carried out by Web server and accounts related operations are performed by DBMS.
This documents describes communication protocol so this specification does not put any requirements on OS, DBMS and web server installed. So it can be either Linux-Apache-MySQL-PHP or Windows-IIS-MSSQL-ASP. This specification defines authorization steps, requests and responses to perform authorization of the WMS clients and statistics gathering.
mms:\\mediaserver\media.asf[?tail], where
mediaserver - media server, where media services are installed,
media.asf - requested resource name (title - video/audio),
[tail - request parameters which may contain unique user identificator.]
Tail is transmitted to the gateway server unaltered (see the item 2), Voynex Media Guard plug-in does not modify it.
http:\\paymentserver\contoller.html?key=Password&[authorize=Method&]client=Id&ip=IpAddr&referer=URL&title=URL[&tail], where
paymentserver - Payment Server,
contoller.html - authorization page,
key - password to access the page (string),
authorize - authorization method (string) [optional],
client - WMS user ID (number),
ip - client IP address (dotted format),
referer - HTTP referrer (URL),
title - requested media resource name (URL),
tail - tail (string) [optional]
Authorization method (authorize) is an optional parameter. It can be used to define the authorization method for the gateway to apply to all the clients coming from the particular mediaserver. This parameter makes sence when several media servers are used and various authorization methods have be applied to each server. Also it can be used for debug purposes or to switch authorization methods for the gateway without the need to modify the scripts.
WMS user ID (client) is the identificator of the user connected to WMS. This ID is assigned to client by WMS and is not guaranted to be unique.
http:\\mediaserver
Gateway's response contains the following data:
service={0|1|...}
time={0,...,n}, where
service - service type:
0 - Default service (not used),
1 - Reserved for Pay-per-minute,
Service numbers > 1 are not used by the plug-in and can be defined by the gateway for its own needs.
For example, the following service types can be defined in addition to Pay-per-minute:
time - purchased (paid) time (Tpaid).
Time measured in SECONDS. If time = 0, then access media content will be denied.
The name of the parameter is case insensitive. Thus 'service', 'SERVICE', 'Service' means the same parameter. Parameters can be located anywhere in the body of the HTTP response and delimited by any non-digital characters. Parameters' order is significant. Parameters have to appear in the response in the same order as listed above.
http:\\paymentserver\statistics.html?key=Password&ip=IpAddr&played=Num&streamed=Num&sent=Num[&tail], where
paymentserver - Payment server,
statistics.html - HTML page where statistical data sent,
key - password to access the page (string),
client - WMS user ID (number),
ip - client IP address (dotted format),
played - time of the media playback Tplayed (number),
streamed - time equivalent of data amount streamed to the client Tstreamed (number),
sent - amount of data sent to client (number)
tail - tail (string) [optional],
Time measured in SECONDS, data in BYTES.
It is always true that Tplayed ≤ media title's duration. Usually
Tstreamed > Tplayed. It happens because Tstreamed
includes time needed for buffering. But for example Windows Media Player downloads media
data and playbacks it simultaneously. Thus if the bandwidth of the client's connection
exceeds the bandwidth needed for non-buffered media playback, media is downloaded faster
then it played. In this case Tstreamed ≤ Tplayed
Example: Windows Media Player plays the 1st minute of a clip, but 3 minutes of this clip
was downloaded to the client.
The developer of the business logics of the gateway can chose which time parameter will be used for billing.
Voynex Media Guard Plug-in increments Tplayed during playback and disconnects client if Tplayed > Tpaid.