PlaylistBackgroundSet Method (IMPlaylist)
reference to external object (for example, live source)
path to source.
Possible values:
additional parameters string
background playlist MItem object
Sets the background of playlist.
Syntax
Sub PlaylistBackgroundSet( _
   ByVal _pExternOrRef As Object, _
   ByVal _bsPath As String, _
   ByVal _bsParam As String, _
   ByRef _ppPlaylistItem As MItem _
) 
void PlaylistBackgroundSet( 
   object _pExternOrRef,
   string _bsPath,
   string _bsParam,
   out MItem _ppPlaylistItem
)
procedure PlaylistBackgroundSet( 
    _pExternOrRef: TObject;
    _bsPath: String;
    _bsParam: String;
   Out  _ppPlaylistItem: MItem
); 
void PlaylistBackgroundSet( 
   IUnknown* _pExternOrRef,
   BSTR* _bsPath,
   BSTR* _bsParam,
   [PARAMFLAG::Out] MItem* _ppPlaylistItem
) 

Parameters

_pExternOrRef
reference to external object (for example, live source)
_bsPath
path to source.
Possible values:
  • color name ("red") or #RRGGBB color code;
  • "transparent" for transparent background;
  • path to media file or playlist.
  • empty string to be able to see the last frame of playlist.
_bsParam
additional parameters string
_ppPlaylistItem
background playlist MItem object
Example

Here is example of how to initialize playlist and set a file as its background:

Dim myPlaylist As New MPlaylistClass()
myPlaylist.PreviewWindowSet("", panelPreview.Handle.ToInt32())
myPlaylist.PreviewEnable("", 1, 1)
myPlaylist.ObjectStart(New Object())
Dim pFile As MItem
Dim strPath As String = "d:\clips\SampleClip1.wmv"
myPlaylist.PlaylistBackgroundSet(Nothing, strPath, "", pFile)
myPlaylist.FilePlayStart()
MPlaylistClass myPlaylist = new MPlaylistClass();
myPlaylist.PreviewWindowSet("", panelPreview.Handle.ToInt32());
myPlaylist.PreviewEnable("", 1, 1);
myPlaylist.ObjectStart(new object());
MItem pFile;
string strPath = @"d:\clips\SampleBackClip1.wmv";
myPlaylist.PlaylistBackgroundSet(null, strPath, "", out pFile);
myPlaylist.FilePlayStart();
var
nIndex: integer;
pItem: MItem;
myPlaylist: MPlaylist;
myPreview: IMPreview;
myEvents: TEvents;
myFile:IMFile;
myObject:IMObject;
cookie: LONG_PTR;
begin
myPlaylist:= CreateComObject(CLASS_MPlaylist) as MPlaylist;
myPreview:= myPlaylist as IMPreview;
myObject:= myPlaylist as IMObject;
myEvents:=TEvents.Create();
myObject.ObjectCallbackSet(myEvents, cookie);
myFile:=myPlaylist as IMFile;
myPreview.PreviewWindowSet('', panelPreview.Handle);
myPreview.PreviewEnable('', 1, 1);
myPlaylist.PlaylistBackgroundSet(nil, 'c:\myBackFile.avi', '', pItem);
myFile.FilePlayStart();
end;
See Also

Reference

IMPlaylist Interface
IMPlaylist Members