<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/06/2015 08:35 AM, Michael
Thompson wrote:<br>
</div>
<blockquote
cite="mid:CAKjh=-fVw5xE5AVhik8AOdmqvqfn7pHbrRDHRHZqS00YPMwkLQ@mail.gmail.com"
type="cite">
<div dir="ltr">On 6 January 2015 at 17:48, Philippe <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:philippe@quarta.com.br" target="_blank">philippe@quarta.com.br</a>></span> wrote:
<div>
<div class="gmail_extra"><br>
</div>
</div>
<div class="gmail_extra">> "fs" does not appear in <a
moz-do-not-send="true"
href="http://wiki.freepascal.org/TMPlayerControl">http://wiki.freepascal.org/TMPlayerControl</a></div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Correct. -fs is an input parameter to
mplayer. These aren't explicitly covered in the wiki as
mplayer documentation covers them elsewhere. </div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">> And my "question" is still about
TMPlayerControl, not with MPlayer ...<br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Well, TMPlayerControl is only a thin
wrapper over mplayer, so there's significant overlap. </div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">However, to be clear TMPlayerControl
does not support fullscreen. I've now confirmed your results,
and simply adding -fs to StartParam is not sufficient. </div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">If you're interested, it looks like the
issue is down to the -wid parameter (which sets the display
window handle). If I comment out the two -wid lines in
MPlayerCtrl.pas (line 665, 666), and insert -fs instead, then
fullscreen works. </div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">No easy workaround available I'm
afraid. Looks like a code change in MPlayerCtrl is required
implementing a .FullScreen property. However, I still can't
see how we'd toggle fullscreen, I can only see how to either
start in FullScreen or in a Window. And that caveat from the
mplayer documentation would still hold - not all drivers are
supported.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Patches welcome :-) </div>
<br>
</div>
</blockquote>
<br>
<br>
I played with this for a few minutes and came up with this:<br>
MPlayerControl1.OnPlaying has to be assigned for
MPlayerControl1.Position to work.<br>
<br>
procedure TForm1.FullScreenCheckBoxChange(Sender: TObject);<br>
var<br>
ScreenBounds: types.TRect;<br>
PlayerPosition: Single;<br>
begin<br>
PlayerPosition := MPlayerControl1.Position;<br>
MPlayerControl1.Stop;<br>
<br>
if FullScreenCheckBox.Checked then<br>
begin<br>
FSForm := TForm.Create(Self); //FSForm is a variable in TForm1<br>
FSForm.BorderStyle:=bsNone;<br>
FSForm.Color:=clBlack;<br>
ScreenBounds := Screen.MonitorFromWindow(Handle).BoundsRect;<br>
with ScreenBounds do<br>
FSForm.SetBounds(Left, Top, Right - Left, Bottom - Top);<br>
FSForm.Visible:=True;<br>
<br>
MPlayerControl1.Parent := FSForm;<br>
end<br>
else<br>
begin<br>
MPlayerControl1.Parent := Self;<br>
FSForm.Free;<br>
end;<br>
<br>
MPlayerControl1.Play;<br>
MPlayerControl1.Position := PlayerPosition;<br>
end;<br>
<br>
Andrew<br>
</body>
</html>