Share via


IWMSPlaylist.CurrentPlaylistEntry (Visual Basic .NET)

banner art

Previous Next

IWMSPlaylist.CurrentPlaylistEntry (Visual Basic .NET)

The CurrentPlaylistEntry property specifies and retrieves the active playlist element.

Syntax

  Playlist
  .CurrentPlaylistEntry
  
  =
  
  IXMLDOMElement
IXMLDOMElement
  
  =
  
  Playlist
  .CurrentPlaylistEntry

Property Value

An IXMLDOMElement object.

Remarks

There are no restrictions on what element the server's position can be changed to. When CurrentPlaylistEntry is used to make an element not currently on the call stack the current element, all items above its parent element are removed from the call stack.

Unlike the FireEvent method, when this property is used to change the server's current position in the playlist, there are no restrictions on what element the server's current position can be changed to.

When this property is used to set the position of the server in the playlist, and the element is currently on the call stack, the server removes all elements above the element on the call stack. If the element is not currently on the call stack, the server removes all elements above its parent element.

  • Note   The CallerEntry property can be used to discover which items are on the playlist call stack.

Example Code

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub SetPlaylistEntry()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Players As IWMSPlayers
    Dim Player As IWMSPlayer
    Dim Playlist As IWMSPlaylist
    Dim PlaylistEntry As IXMLDOMElement
    Dim CurPlaylistEntry As IXMLDOMElement

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the IWMSPlayers object.
    Players = Server.Players

    ' Retrieve information about each requested playlist.
    For Each Player In Players

        ' Retrieve the playlist requested by the client
        ' if one exists.
        Playlist = Player.RequestedPlaylist

        ' Retrieve information about the current playlist entry.
        PlaylistEntry = Playlist.CurrentPlaylistEntry
        CurPlaylistEntry = PlaylistEntry

        ' Retrieve the next playlist entry.
        PlaylistEntry = Playlist.CallerEntry(CurPlaylistEntry)

        ' Set the current playlist entry to the last entry in
        ' the playlist.
        Playlist.CurrentPlaylistEntry = CurPlaylistEntry

    Next










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