With MediaPlayer1 do
begin
filename := myFile;
display := panel1;
open;
displayrect:= rect(0, 0, screen.width, screen.height);
play;
end;
This should play the movie Fullscren
"Haran" <harulia...@hotmail.remove.com> schrieb im Newsbeitrag
news:1103_984598790@haruliah1...
> Hi there,
> How can I get the TMediaPlayer component to playback videos in fullscreen
mode?
> I don't want to set the display rect to the client's screen size because
the playback slows down exponentially.
>
> Thanks,
> Haran
>
>
>
I tried that solution beforehand, but that's essentially stretching the display rectangle to the client's resolution. However, switch into fullscreen mode is another feature
entirely.
Try this: Change your resolution to 1024 or higher. Then run Window's Media player on an mpeg that's relatively large (320*240). If you maximize vs. hitting alt+enter,
you'll see the difference.
Stretching it causes the renderer to slow down exponentially (ie the higher the res, the higher the frame drop rate). I want to change the screen mode (like screen mode
13 is 320*240*8bit colour I think, back in the Pascal days).
But I was hoping that the TMediaplayer control mimicked the Windows media player where it changes to the highest available fullscreen mode.
(Fullscreen mode is also a requirement for most 3D games, they are generally not accelerated in a window)
I guess it doesn't, and I'm most likely going to have to implement it via Directshow and the Jedi headers.
If anyone has taken this route, I'd love some direction.
Haran
procedure TForm1.Button1Click(Sender: TObject);
const longName :pchar ='f:\delphi\eCC Showcase\ANIM1.MPG'; //your complete
FileName
var ret, shortName : Pchar;
err : DWord;
begin
//getting the short Name (8:3) of selected File
shortName := strAlloc(521);
GetShortPathName(longName, shortname, 512);
//Sending a close Command to the MCi.
ret := strAlloc(255);
err := mciSendString(pchar('close movie'), 0, 0, 0);
// no error Check because at the first call there is no MCI device to
close
//open a new MCI Device with the selected movie File;
err := mciSendString(pchar('open '+shortName+' alias movie'), 0, 0, 0);
shortName := nil;
// if an Error was traced then display a MessageBox with the mciError
String
if err<>0 then
begin
mciGetErrorString(err, ret, 255);
messageDlg(ret, mtinformation, [mbok], 0);
end;
//Sending the "play fullscreen Commadn to the windows MCI
err := mciSendString(pchar('play movie fullscreen'), 0, 0, 0);
// if an Error was traced then display a MessageBox with the mciError
String
if err<>0 then
begin
mciGetErrorString(err, ret, 255);
messageDlg(ret, mtinformation, [mbok], 0);
end;
ret := nil;
end;
"Haran" <harulia...@hotmail.remove.com> schrieb im Newsbeitrag
news:1103_984519752@haruliah1...
Thanks again,
Haran
On Fri, 16 Mar 2001 14:00:14 +0100, "Frank" <amber...@gmx.de> wrote:
> Sorry for the mistake. I thought you'd like to stretch the movie to full
> screen. So I was wrong!
>
> But I have a solution fpr displaying a movie in Fullscreen Mode (as you want
> to). you need to include the mmSystem Unit to run the code, nothing else.
>
>