views:

11

answers:

1

I'm using windows media services 9 to provide streaming service and would like to make sure users can only play within specified interval to prevent abuse. The media server reads and from asx file and the player can start and end at the correct offset. I can get the start offset at AuthorizePlayEvent using

IWMSContext.GetQwordValue(WMSDefines.WMS_PRESENT_START_TIME,WMSDefines.WMS_PRESENT_START_TIME_ID, out dec, 0); 

But I'm having problem getting the duration or end offset. I know windows media server writes log that contains c-starttime and x-duration. But the x-duration here doesn't seem to be what I want. I like to detect the that gets passed from asx file at either AuthorizeOpenEvent or AuthorizePlayEvent. Is this possible?

Thanks!

A: 

I ended up rolling my own synchronized dictionary to keep track of active players at every heartbeat and disconnect player that exceed specified interval. I spent around 2 days looking for build-in server side parameters and was surprised to find nothing is available reliably.

logoin