IWMSPlaylist.CurrentMediaInformation (C#)

banner art

Previous Next

IWMSPlaylist.CurrentMediaInformation (C#)

The CurrentMediaInformation property retrieves an IWMSActiveMedia object containing information about the active media element in the playlist.

Syntax

  IWMSActiveMedia =
  
  Playlist
  .CurrentMediaInformation;

Property Value

An IWMSActiveMedia object.

Remarks

This property is read-only.

Example Code

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;
    }







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.

See Also

Previous Next