Avatar of pdash33
pdash33Flag for Canada

asked on 

Open avi with mediaplayer causes pop up window.

Hi

I got a multimedia player that pops up a seperate window when playing a avi that is controlled by code, but it plays ok when set on the control, I can't use the second one due to potential path changes on deployment.

Any thoughts , how do I get the multimedia player to play in a panel or on the form, I told it to do so in code.

Also the TAnimate will only play some avi's, others it says it cant open the file even though multimedia player plays the same avi fine, I am guessing its a driver issue.

Here is the code under form create event.

 MediaPlayer1.Notify := False ;
                MediaPlayer1.Wait := True ;
                MediaPlayer1.display :=  Panel1;
                MediaPlayer1.DISPLAYRECT := Panel1.CLIENTRECT;
                MediaPlayer1.DeviceType := dtAVIVideo;

                MediaPlayer1.FileName :=  ExtractFilePath(Application.ExeName) + 'Images\videos\bunny.avi'  ;
                MediaPlayer1.Open;
                MediaPlayer1.Play;  


Thanks Phil
Delphi

Avatar of undefined
Last Comment
pdash33
Avatar of philipjc
philipjc

I can get this code to work fine if I set devicetype to dtAutoSelect but not with dtAviVideo.

Go figure

Phil
ASKER CERTIFIED SOLUTION
Avatar of pdash33
pdash33
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of pdash33
pdash33
Flag of Canada image

ASKER

I found the reason myself  as noone else came up with an answer.
Delphi
Delphi

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

60K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo