IWMSPlaylist.FireEvent (C#)
The FireEvent method sends the specified event to the broadcast publishing point's shared playlist object.
Playlist.FireEvent(
string pbstrEventName
);
Arguments
pbstrEventName |
[in] string containing the event name. |
Return Value
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
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);
}
}
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.