Skip to content

OpenPlayerAtTimePositions

function

Delphi
function OpenPlayerAtTimePositions (StartTime: LargeInteger; StopTime: LargeInteger; KeepBounds: Boolean; CloseAndReopenIfAlreadyOpened: Boolean): Boolean;
C++Builder
bool __fastcall OpenPlayerAtTimePositions(LargeInteger StartTime, LargeInteger StopTime, bool KeepBounds, bool CloseAndReopenIfAlreadyOpened);
C#
public bool OpenPlayerAtTimePositions(long StartTime, long StopTime, bool KeepBounds, bool CloseAndReopenIfAlreadyOpened);
VB.NET
Public Function OpenPlayerAtTimePositions(StartTime As Long, StopTime As Long, KeepBounds As Boolean, CloseAndReopenIfAlreadyOpened As Boolean) As Boolean
C++/Qt
BOOL OpenPlayerAtTimePositions (__int64 StartTime, __int64 StopTime, BOOL KeepBounds, BOOL CloseAndReopenIfAlreadyOpened);

Opens a video clip that starts and stops playing within the boundaries of the specified start and stop times. StartTime and StopTime are expressed in 100ns units (e.g. 2.5 seconds = 25000000).

StartTime: opens the clip starting from this frame time (0 = from the beginning).

StopTime: stops playing the clip at this frame time (0 = until the end).

KeepBounds:

  • true: when invoking StopPlayer the position returns to the StartTime position; when the clip is paused, it is not possible to set a position before StartTime or after StopTime.

  • false: when invoking StopPlayer the position returns to frame time 0; when the clip is paused, it is possible to set a position before StartTime or after StopTime.

CloseAndReopenIfAlreadyOpened:

  • true: if OpenPlayerAtTimePositions is invoked again, the clip is reopened.

  • false: if OpenPlayerAtTimePositions is invoked again, the start and stop positions are updated to the specified positions.

Notes:

  • When the video clip is already open and the CloseAndReopenIfAlreadyOpened parameter is false, invoking this function modifies the playing boundaries without closing and reopening the video clip.

  • To specify only a start time and let the clip play until the end, set StopTime = 0.

  • To specify only a stop time and let the clip play from the beginning, set StartTime = 0.

  • To reset the normal clip boundaries, set StopTime = 0 and StartTime = 0.

E.g. OpenPlayerAtTimePositions (30000000, 60000000, true, false) plays the clip between 3 seconds and 6 seconds (from the beginning of the clip).