Share via


IWMSPlayer Object (Visual Basic .NET)

banner art

Previous Next

IWMSPlayer Object (Visual Basic .NET)

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 that is receiving content from the server.
RequestedPlaylist Retrieves an IWMSPlaylist object for the client.
Port Retrieves the port number of the client that is 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.

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub RetrieveObj()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Players As IWMSPlayers
    Dim Player As IWMSPlayer
    Dim i As Integer

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the IWMSPlayers object.
    Players = Server.Players

    ' Retrieve information about each client connection.
    For i = 0 To Players.Count - 1
        Player = Players.Item(i)
    Next i

Catch excCom As COMException
    ' TODO: Handle COM exceptions.
Catch exc As Exception
    ' TODO: Handle errors.
Finally
    ' TODO: Clean-up code goes here.
End Try

End Sub

See Also

Previous Next