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.ElapsedSimpleTime (Visual Basic .NET)
The ElapsedSimpleTime property retrieves the simple duration of the active playlist element.
Syntax
Integer = Playlist .ElapsedSimpleTime
Property Value
Integer containing the duration.
If this property fails, it returns an error number.
| Number | Description |
| 0x80070057 | No media element is active. |
Remarks
This property is read-only. The simple duration is defined by the explicit begin and duration attributes, if any. If there is no explicit begin or duration defined, the simple duration is defined by the implicit duration of the element. The simple duration does not include the repetition of elements.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetElapsedTime()
' Declare variables.
Dim Server As WMSServer
Dim Players As IWMSPlayers
Dim Player As IWMSPlayer
Dim Playlist As IWMSPlaylist
Dim iValue As Integer
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 the elapsed time of the current
' playlist entry.
iValue = Playlist.ElapsedSimpleTime
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 |