Windows apps
Collapse the table of content
Expand the table of content

IWMSPlaylist Object (C#)

banner art

IWMSPlaylist Object (C#)

The IWMSPlaylist object is used to manage a playlist.

The IWMSPlaylist object exposes the following properties and methods.

Property Description
CurrentMediaInformation Retrieves an IWMSActiveMedia object that contains information about the active media element in the playlist.
CurrentPlaylistEntry Specifies and retrieves the active playlist element.
ElapsedSimpleTime Retrieves the simple duration of the active playlist element.
get_CallerEntry Retrieves the current caller entry.
get_IsStreamCued Retrieves a Boolean value that indicates whether a specific playlist element has been initialized and is ready to stream.
get_NestedPlaylist Retrieves a nested playlist object.

Method Description
CueStream Prepares the next stream in the queue.
FireEvent Sends the specified event to the playlist.
UncueStream Specifies that content previously prepared for streaming is uncued.

Example Code

The following example illustrates how to retrieve an IWMSPlaylist object.

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer          Server;
IWMSPlayers        Players;
IWMSPlayer         Player;
IWMSPlaylist       Playlist;

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;
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
catch (Exception e) {
    // TODO: Handle exceptions.

See Also

© 2017 Microsoft