Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The CurrentMediaInformation property retrieves an IWMSActiveMediaIWMSActiveMedia Object (C#) containing information about the active media element in the playlist.
IWMSActiveMedia = Playlist.CurrentMediaInformation;
Property Value
An IWMSActiveMedia object.
Remarks
This property is read-only.
Example
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlayers Players;
IWMSPlayer Player;
IWMSPlaylist Playlist;
IWMSActiveMedia ActiveMedia;
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];
// Retrieve the playlist that was requested
// by the client, if one exists.
Playlist = Player.RequestedPlaylist;
// Retrieve a pointer to the active media element.
ActiveMedia = Playlist.CurrentMediaInformation;
}
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices
Namespace: Microsoft.WindowsMediaServices.Interop
Assembly: Microsoft.WindowsMediaServices.dll
Library: WMSServerTypeLib.dll
Platform: Windows Server 2003 family, Windows Server 2008 family.