IWMSPlayer Object (C#)
Previous | Next |
IWMSPlayer Object (C#)
You can use the IWMSPlayer object to retrieve properties for a specific player. The IWMSPlayer object exposes the following properties.
Property | Description |
ID | Retrieves a unique value identifying a player that is receiving content from the server. |
NetworkAddress | Retrieves the network address of the client receiving content from the server. |
RequestedPlaylist | Retrieves an IWMSPlaylist object for the client. |
Port | Retrieves the port number of the client receiving content from the server. |
RequestedURL | Retrieves the URL that the player used to request a connection. |
ResolvedURL | Retrieves the URL of the content being streamed to the player. |
Status | Retrieves the status of the player. |
UserName | Retrieves the name of the authenticated player. |
WrapperPlaylist | Retrieves a wrapper playlist object. |
Example Code
The following example illustrates how to retrieve an IWMSPlayer object.
using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; // Declare variables. WMSServer Server; IWMSPlayers Players; IWMSPlayer Player; try { // Create a new WMSServer object. Server = new WMSServerClass(); // Retrieve the IWMSPlayers object. Players = Server.Players; // Retrieve information about each client connection. for (int i = 0; i < Players.Count; i++) { Player = Players[i]; } } catch (COMException comExc) { // TODO: Handle COM exceptions. } catch (Exception e) { // TODO: Handle exceptions. }
See Also
Previous | Next |