Why not import the Windows Media Player (WMP.DLL) into Delphi and then use
it ?
You can then do something like this:

    FMediaPlayer                    := TWindowsMediaPlayer.Create(Self);
    FMediaPlayer.Visible            := FALSE;
    FMediaPlayer.uiMode             := 'invisible';
    FMediaPlayer.Settings.AutoStart := FALSE;
    FMediaPlayer.Settings.volume    := 100;

With uiMode "invisible", the MediAplyer doesn't show itself and you can have
you own user interface as you like.
To play something, you do something like:
    FMediaPlayer.URL := FFileName;
    FMediaPlayer.Controls.Play;

You can get/change position using the property
FMediaPlayer.Controls.CurrentPosition

And so on...

Hoping this helps...
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be

----- Original Message ----- 
From: "Tony Foale" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, February 19, 2007 1:43 PM
Subject: Help with media player needed


I use .avi and .mpg video files for programme tutorials accessible from
a help form.
The Delphi MediaPlayer component is used to play these, as per the
following procedure:

procedure TFormHelp.ButVideoClick(Sender: TObject);
begin
     OpenDialog1.InitialDir := ExtractFileDir(Application.ExeName) +
'\Docs' ;
     if OpenDialog1.Execute  then
        with MediaPlayer1 do begin
           FileName := OpenDialog1.FileName;
           frames := 1 ;
           try
             Open;              // Open Media Player
             Wait := true ;     // waits until done playing to return to
system control
             Play;              // Play video
           finally
             close ;
           end; //endtry
        end; //endwith
   //endif
end;

and that works fine.

However, media player creates its own form to show the video and the
play-stop-pause-etc. controls stay on the original help form in-operable.
I'd also like to include a sound volume control on the video form.
So I have two questions:

1. Does Delphi 6 have a volume control component, I can't find one?
2. How do I put the volume control and also a play-stop-pause-etc.
control on to the video playing window?

-- 
Regards,

Tony Foale
EspaƱa / Spain

www.tonyfoale.com
[EMAIL PROTECTED]

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to