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'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'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, "gallery-user-jnas= h" <<a href=3D"mailto:[email protected]">gallery@nashnetwork= s.com</a>> 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> > Just a note on the new movie player:<br> ><br> > In gallery/modules/gallery/model/item.php<br> ><br> > the g-movie div is set so that it sets the div width at resize-width<b= r> ><br> > this is great for 'normal' landscape movies, however, for thos= e (iUsers) who<br> > like to shoot video in portrait for some ungodly reason, it causes the= video<br> > to be proportionately large.<br> ><br> > I've added a little patch to mine to adjust for this:<br> ><br> > I also added a small change to the style attributes to center it. =C2= =A0I think<br> > it's more appealing.<br> ><br> > Just thoughts for suggestion:<br> ><br> ><br> ><br> > --- item.php =C2=A02013-05-16 14:09:05.336311902 -0400<br> > +++ /data1/misc/galladd/gallery-git/gallery3/modules/gallery/models/it= em.php<br> > 2013-05-05 21:22:02.071816103 -0400<br> > @@ -766,9 +766,8 @@<br> > =C2=A0 =C2=A0 =C2=A0 $width =3D $player_width;<br> > =C2=A0 =C2=A0 =C2=A0 $height =3D ceil($width * 3/4);<br> > =C2=A0 =C2=A0 }<br> > - =C2=A0 =C2=A0if($height > 640) $player_width =3D floor($width * (= 640 / $height));<br> > =C2=A0 =C2=A0 $div_attrs =3D array_merge(array("id" =3D> = "g-item-id-{$this->id}"),<br> > $extra_attrs,<br> > - =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("class" =3D> "g-mov= ie", "style" =3D> "width:<br> > {$player_width}px; margin-left:auto; margin-right:auto;"));<br> > + =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("class" =3D> "g-mov= ie", "style" =3D> "width:<br> > {$player_width}px;"));<br> ><br> > =C2=A0 =C2=A0 // Run movie_img events, which can either:<br> > =C2=A0 =C2=A0 // =C2=A0- generate a view, which is used in place of th= e standard<br> > MediaElementPlayer<br> ><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 --> <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 --> <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==--