MPLATFORMLib Namespace > IMPlaylist Interface : PlaylistGetByOffset Method |
Sub PlaylistGetByOffset( _ ByVal _dblTimeOffset As Double, _ ByRef _pnIndex As Integer, _ ByRef _pdblFileTime As Double, _ ByRef _pbsPath As String, _ ByRef _ppPlaylistItem As MItem _ )
void PlaylistGetByOffset( double _dblTimeOffset, out int _pnIndex, out double _pdblFileTime, out string _pbsPath, out MItem _ppPlaylistItem )
procedure PlaylistGetByOffset( _dblTimeOffset: Double; Out _pnIndex: Integer; Out _pdblFileTime: Double; Out _pbsPath: String; Out _ppPlaylistItem: MItem );
void PlaylistGetByOffset( double _dblTimeOffset, [PARAMFLAG::Out] int _pnIndex, [PARAMFLAG::Out] double _pdblFileTime, [PARAMFLAG::Out] BSTR* _pbsPath, [PARAMFLAG::Out] MItem* _ppPlaylistItem )
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;