Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMSPlaylist.NestedPlaylist (Visual Basic .NET)
The NestedPlaylist property retrieves a nested playlist object.
Syntax
IWMSPlaylist = Playlist .NestedPlaylist( pPlaylistEntry As IXMLDOMElement )
Parameters
pPlaylistEntry
[in] IXMLDOMElement object containing a playlist entry object.
Property Value
If this property fails, it returns an error number.
| Number | Description |
| 0x80004005 | pPlaylistEntry is not a nested playlist. |
Remarks
This property is read-only. This property gets a nested playlist. If the first parameter of the playlist is not a media element that references a playlist file, or if the media element is not cued or is not the current element, an error code is returned.
The IsStreamCued property can be used to determine whether the media element is cued.
Example Playlist File
In the following playlist, the src attribute for "media2" references another playlist.
The nested playlist (playlist.wsx) contains the following syntax:
A short time after the server starts streaming "media1" from the first playlist, it will cue "nested_media1" in the nested playlist. At this point, the NestedPlaylist property can be used to retrieve an IWMSPlaylist object for the nested playlist. After the server finishes streaming all of the items in the nested playlist, it will return to the parent playlist and start streaming "media3". At this point "media2" will no longer be cued, and you can no longer use the NestedPlaylist property to retrieve an IWMSPlaylist object for it. However, you can always use the CueStream method to re-cue the nested playlist.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetNestedPlaylist()
' Declare variables.
Dim Server As WMSServer
Dim Players As IWMSPlayers
Dim Player As IWMSPlayer
Dim Playlist As IWMSPlaylist
Dim NestedPlaylist As IWMSPlaylist
Dim PlaylistEntry As MSXML.IXMLDOMElement
Dim CurPlaylistEntry As MSXML.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
' Retrieve information about each playlist entry.
While Not PlaylistEntry Is Nothing
CurPlaylistEntry = PlaylistEntry
' Retrieve the nested playlist object if one exists.
NestedPlaylist = Playlist.NestedPlaylist(PlaylistEntry)
' Retrieve the next playlist entry.
PlaylistEntry = Playlist.CallerEntry(CurPlaylistEntry)
End While
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 |