Share via


IWMSPlaylist.FireEvent (C#)

banner art

Previous Next

IWMSPlaylist.FireEvent (C#)

The FireEvent method sends the specified event to the broadcast publishing point's shared playlist object.

Syntax

  Playlist
  .FireEvent(
  
  string
    pbstrEventName
  
  );

Parameters

pbstrEventName

[in] string containing the event name.

Return Values

This method does not return a value.

Remarks

In order to achieve a faster stream switch, the IWMSPlaylist.CueStream method should be called prior to the FireEvent method. Send the specified event to the playlist. The event being trapped must be associated with a media element that is a child element of an excl time container.

Example Code

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

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

string             strEvent;

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 requested
        // by the client, if one exists.
        Playlist = Player.RequestedPlaylist;

        // Send the event for the requested playlist.
        strEvent = "excl1_Event";
        Playlist.FireEvent (strEvent);
    }







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