PlaylistGetByOffset Method (MItemClass)
offset position from the start
index of playlist item
position in file
file path
output playlist item MItem object
Gets the item in playlist by the offset time from start.
Syntax
Public Overridable Sub PlaylistGetByOffset( _
   ByVal _dblTimeOffset As Double, _
   ByRef _pnIndex As Integer, _
   ByRef _pdblFileTime As Double, _
   ByRef _pbsPath As String, _
   ByRef _ppPlaylistItem As MItem _
) 
public virtual void PlaylistGetByOffset( 
   double _dblTimeOffset,
   out int _pnIndex,
   out double _pdblFileTime,
   out string _pbsPath,
   out MItem _ppPlaylistItem
)
public procedure PlaylistGetByOffset( 
    _dblTimeOffset: Double;
   Out  _pnIndex: Integer;
   Out  _pdblFileTime: Double;
   Out  _pbsPath: String;
   Out  _ppPlaylistItem: MItem
); virtual; 
public: virtual void PlaylistGetByOffset( 
   double _dblTimeOffset,
   [PARAMFLAG::Out] int _pnIndex,
   [PARAMFLAG::Out] double _pdblFileTime,
   [PARAMFLAG::Out] BSTR* _pbsPath,
   [PARAMFLAG::Out] MItem* _ppPlaylistItem
) 

Parameters

_dblTimeOffset
offset position from the start
_pnIndex
index of playlist item
_pdblFileTime
position in file
_pbsPath
file path
_ppPlaylistItem
output playlist item MItem object
Example

Here is example of how to add command to the playlist item:

Dim myIndex As Integer
Dim myNextIndex As Integer
Dim myItem As MItem
Dim strPath As String
Dim dblFileDuration As Double
Dim dblFilePos As Double
Dim dblListPos As Double
myPlaylist.PlaylistPosGet(myIndex, myNextIndex, dblFilePos, dblListPos)
myPlaylist.PlaylistGetByOffset(dblListPos, nIndex, dblFileDuration, strPath, myItem)
Dim myTargetItem As MItem
myPlaylist.PlaylistCommandAdd("mute", "true", myItem, myIndex, myTargetItem)
int myIndex;
int myNextIndex;
MItem myItem;
string strPath;
double dblFileDuration;
double dblFilePos;
double dblListPos;
myPlaylist.PlaylistPosGet(out myIndex, out myNextIndex, out dblFilePos, out dblListPos);
myPlaylist.PlaylistGetByOffset(dblListPos, out nIndex, out dblFileDuration, out strPath, out myItem);
MItem myTargetItem;
myPlaylist.PlaylistCommandAdd("mute", "true", myItem, ref myIndex, out myTargetItem);
var
myIndex, myNextIndex: integer;
myItem, myTargetItem: MItem;
strPath: widestring;
dblFileDuration, dblListPos, dblFilePos: double;
begin
myPlaylist.PlaylistPosGet(myIndex, myNextIndex, dblFilePos, dblListPos);
myPlaylist.PlaylistGetByOffset(1, dblFileDuration, strPath, myItem);
myPlaylist.PlaylistCommandAdd('mute', 'true', myItem, myIndex, myTargetItem);
end;
See Also

Reference

MItemClass Class
MItemClass Members