Windows Media Player 11 SDK IWMPControls3.currentPositionTimecode (VB and C#)
Previous | Next |
IWMPControls3.currentPositionTimecode (VB and C#)
The currentPositionTimecode property gets or sets the current position in the current media item using a time code format. This property currently supports SMPTE time code.
Property Value
A System.String that is the SMPTE time code.
Remarks
SMPTE time code provides a standard way of identifying an individual video frame, which is useful for synchronizing playback. If a digital media file supports SMPTE time code, Windows Media Player can retrieve the current time code position information or seek to a video frame identified by a particular time code.
SMPTE time code identifies a particular frame by the number of hours, minutes, seconds, and frames that separate it from a particular reference frame—the frame designated as time zero. Usually the time zero frame is the start of the file and a particular SMPTE time code value represents the elapsed time since the start of the file.
The time code is in the format [range]hh:mm:ss.ff where [range] represents the range, hh represents hours, mm represents minutes, ss represents seconds, and ff represents frames. When setting a value for currentPositionTimecode, you must include all eight digits, using zeroes as placeholders.
[range] corresponds to the wRange member of the Windows Media Format WMT_TIMECODE_EXTENSION_DATA structure. For more information about time code ranges, see the Windows Media Format SDK.
Setting and getting currentPositionTimecode is supported only for files that contain SMPTE time code information.
Example Code
The following code example specifies currentPositionTimecode as 1 hour, zero minutes, 30 seconds, and 5 frames. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.
' Cast the interface returned by player.Ctlcontrols to an IWMPControls3 interface ' in order to use the currentPositionTimecode property. Dim controls As WMPLib.IWMPControls3 = player.Ctlcontrols ' Seek to a frame using SMPTE time code. Controls.currentPositionTimecode = "[00000]01:00:30.05"
FakePre-5ef3a0e123d140d08666435308d563bf-0799002203a54f218441877c7701c981
// Cast the interface returned by player.Ctlcontrols to an IWMPControls3 interface // in order to use the currentPositionTimecode property. WMPLib.IWMPControls3 controls = (WMPLib.IWMPControls3)player.Ctlcontrols; // Seek to a frame using SMPTE time code. controls.currentPositionTimecode = "[00000]01:00:30.05";
Requirements
Version: Windows Media Player 9 Series or later
Namespace: WMPLib
Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)
See Also
Previous | Next |