Re: Gallery-devel Digest, Vol 76, Issue 7

Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> Thu, 16 May 2013 23:21:24 +0200
Newsgroups gmane.comp.web.gallery.devel
Message-ID <CA+z51A6wbdZ6G8kYshM5ftTLBvCOv6m-Rz7cx2UJjotF0zcB+w@mail.gmail.com>
--===============3287642061078852890==
Content-Type: multipart/alternative; boundary=089e01493e2ed4cdc804dcdc723a

--089e01493e2ed4cdc804dcdc723a
Content-Type: text/plain; charset=UTF-8

Hmm... a good point.  Ideally it'd be best to figure out a way to do it
through the player itself, as the width and height in the items table are
only set if they have FFmpeg.  Maybe there's an additional flag we can give
mediaelementjs to shrink the width for portrait-oriented videos... or maybe
we could do it ourselves in js...

Take care,
Shad

Sent from my Swiss Army Phone
On May 16, 2013 9:00 PM, "gallery-user-jnash" <[email protected]>
wrote:

> Oh, and sorry, my patch was backwards driven... doh!
>
>
> On Thu, 16 May 2013, gallery-user-jnash wrote:
>
> > Just a note on the new movie player:
> >
> > In gallery/modules/gallery/model/item.php
> >
> > the g-movie div is set so that it sets the div width at resize-width
> >
> > this is great for 'normal' landscape movies, however, for those (iUsers)
> who
> > like to shoot video in portrait for some ungodly reason, it causes the
> video
> > to be proportionately large.
> >
> > I've added a little patch to mine to adjust for this:
> >
> > I also added a small change to the style attributes to center it.  I
> think
> > it's more appealing.
> >
> > Just thoughts for suggestion:
> >
> >
> >
> > --- item.php  2013-05-16 14:09:05.336311902 -0400
> > +++
> /data1/misc/galladd/gallery-git/gallery3/modules/gallery/models/item.php
> > 2013-05-05 21:22:02.071816103 -0400
> > @@ -766,9 +766,8 @@
> >       $width = $player_width;
> >       $height = ceil($width * 3/4);
> >     }
> > -    if($height > 640) $player_width = floor($width * (640 / $height));
> >     $div_attrs = array_merge(array("id" => "g-item-id-{$this->id}"),
> > $extra_attrs,
> > -                             array("class" => "g-movie", "style" =>
> "width:
> > {$player_width}px; margin-left:auto; margin-right:auto;"));
> > +                             array("class" => "g-movie", "style" =>
> "width:
> > {$player_width}px;"));
> >
> >     // Run movie_img events, which can either:
> >     //  - generate a view, which is used in place of the standard
> > MediaElementPlayer
> >
>
>
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> __[ g a l l e r y - d e v e l ]_________________________
>
> [ list info/archive --> http://gallery.sf.net/lists.php ]
> [ gallery info/FAQ/download --> http://gallery.sf.net ]
>

--089e01493e2ed4cdc804dcdc723a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p>Hmm... a good point.=C2=A0 Ideally it&#39;d be best to figure out a way =
to do it through the player itself, as the width and height in the items ta=
ble are only set if they have FFmpeg.=C2=A0 Maybe there&#39;s an additional=
 flag we can give mediaelementjs to shrink the width for portrait-oriented =
videos... or maybe we could do it ourselves in js...</p>

<p>Take care,<br>
Shad</p>
<p>Sent from my Swiss Army Phone</p>
<div class=3D"gmail_quote">On May 16, 2013 9:00 PM, &quot;gallery-user-jnas=
h&quot; &lt;<a href=3D"mailto:[email protected]">gallery@nashnetwork=
s.com</a>&gt; wrote:<br type=3D"attribution"><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
>
Oh, and sorry, my patch was backwards driven... doh!<br>
<br>
<br>
On Thu, 16 May 2013, gallery-user-jnash wrote:<br>
<br>
&gt; Just a note on the new movie player:<br>
&gt;<br>
&gt; In gallery/modules/gallery/model/item.php<br>
&gt;<br>
&gt; the g-movie div is set so that it sets the div width at resize-width<b=
r>
&gt;<br>
&gt; this is great for &#39;normal&#39; landscape movies, however, for thos=
e (iUsers) who<br>
&gt; like to shoot video in portrait for some ungodly reason, it causes the=
 video<br>
&gt; to be proportionately large.<br>
&gt;<br>
&gt; I&#39;ve added a little patch to mine to adjust for this:<br>
&gt;<br>
&gt; I also added a small change to the style attributes to center it. =C2=
=A0I think<br>
&gt; it&#39;s more appealing.<br>
&gt;<br>
&gt; Just thoughts for suggestion:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --- item.php =C2=A02013-05-16 14:09:05.336311902 -0400<br>
&gt; +++ /data1/misc/galladd/gallery-git/gallery3/modules/gallery/models/it=
em.php<br>
&gt; 2013-05-05 21:22:02.071816103 -0400<br>
&gt; @@ -766,9 +766,8 @@<br>
&gt; =C2=A0 =C2=A0 =C2=A0 $width =3D $player_width;<br>
&gt; =C2=A0 =C2=A0 =C2=A0 $height =3D ceil($width * 3/4);<br>
&gt; =C2=A0 =C2=A0 }<br>
&gt; - =C2=A0 =C2=A0if($height &gt; 640) $player_width =3D floor($width * (=
640 / $height));<br>
&gt; =C2=A0 =C2=A0 $div_attrs =3D array_merge(array(&quot;id&quot; =3D&gt; =
&quot;g-item-id-{$this-&gt;id}&quot;),<br>
&gt; $extra_attrs,<br>
&gt; - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 array(&quot;class&quot; =3D&gt; &quot;g-mov=
ie&quot;, &quot;style&quot; =3D&gt; &quot;width:<br>
&gt; {$player_width}px; margin-left:auto; margin-right:auto;&quot;));<br>
&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 array(&quot;class&quot; =3D&gt; &quot;g-mov=
ie&quot;, &quot;style&quot; =3D&gt; &quot;width:<br>
&gt; {$player_width}px;&quot;));<br>
&gt;<br>
&gt; =C2=A0 =C2=A0 // Run movie_img events, which can either:<br>
&gt; =C2=A0 =C2=A0 // =C2=A0- generate a view, which is used in place of th=
e standard<br>
&gt; MediaElementPlayer<br>
&gt;<br>
<br>
---------------------------------------------------------------------------=
---<br>
AlienVault Unified Security Management (USM) platform delivers complete<br>
security visibility with the essential security capabilities. Easily and<br=
>
efficiently configure, manage, and operate all of your security controls<br=
>
from a single console and one unified framework. Download a free trial.<br>
<a href=3D"http://p.sf.net/sfu/alienvault_d2d" target=3D"_blank">http://p.s=
f.net/sfu/alienvault_d2d</a><br>
__[ g a l l e r y - d e v e l ]_________________________<br>
<br>
[ list info/archive --&gt; <a href=3D"http://gallery.sf.net/lists.php" targ=
et=3D"_blank">http://gallery.sf.net/lists.php</a> ]<br>
[ gallery info/FAQ/download --&gt; <a href=3D"http://gallery.sf.net" target=
=3D"_blank">http://gallery.sf.net</a> ]<br>
</blockquote></div>

--089e01493e2ed4cdc804dcdc723a--


--===============3287642061078852890==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
--===============3287642061078852890==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

__[ g a l l e r y - d e v e l ]_________________________

[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]
--===============3287642061078852890==--