Thread: [Mplayerplug-in-devel] How can I resize the plugin inside html/xul doument
Brought to you by:
kdekorte
From: Asaf <tv...@ne...> - 2006-10-08 13:19:25
|
at first creation it works, But changing size dynamicly through javaScript does not. Setting width/height doesnt seems to have effect nore does left/top Thanks |
From: Kevin D. <kde...@gm...> - 2006-10-08 14:11:45
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Asaf wrote: > at first creation it works, But changing > size dynamicly through javaScript does not. > Setting width/height doesnt seems to have effect > nore does left/top > > Thanks Please send a test case. Those options should be working... The left and top are not actually controlled by the plugin, so perhaps you don't have the correct object? Also, have you opened the javascript console and looked for any errors there. Kevin - -- Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=-1509369771935935023 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFFKQcb6w2kMH0L1dERAjRIAKCW6Rmt2Ul+SYD1oADL6FIpAEbJSQCcD7kI UdPbbEwCzF17SjhS05i6q/k= =XtIN -----END PGP SIGNATURE----- |
From: Asaf <tv...@ne...> - 2006-10-08 14:21:58
|
On =D7=90', 2006-10-08 at 08:11 -0600, Kevin DeKorte wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Asaf wrote: > > at first creation it works, But changing > > size dynamicly through javaScript does not. > > Setting width/height doesnt seems to have effect > > nore does left/top > >=20 > > Thanks >=20 > Please send a test case. Those options should be working... The lef= t and > top are not actually controlled by the plugin, so perhaps you don't= have > the correct object? Also, have you opened the javascript console an= d > looked for any errors there. >=20 > Kevin > - -- Sorry I did another test and the box is resizing -=20 But mplayers picture is the same size,=20 So when the box becomes smaller, the rest of the image is Clipped , instead of resized. as if mplayer is unaware to the change. here is the code - no javascript Errors : =09dump("\nTVNGO - X() - Enter "); =09=09=09try{ =09=09=09=09var elem =3D document.getElementById("media"); =09=09=09=09elem.width =3D 300; =09=09=09=09elem.height =3D 200; =09=09=09=09dump("\nTVNGO - X() - Leave ");=09=09 =09=09=09} catch (ex) { =09=09=09=09dump("\nTVNGO - Z() - ERROR !! "+ex); =09=09=09} operating on the following EMBED <html:embed id=3D"media" class=3D"media_0" type=3D"application/x-mp= layer2" width=3D"540" height=3D"420" left=3D"100" top=3D"100" />=09=09=09= =09=09=09=09=09 =09=09 I start playing, using Open() and Play() some http://......... While its playing ,i try the resize. the picture is Clipped. Thanks=20 |
From: Kevin D. <kde...@gm...> - 2006-10-08 14:25:49
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Asaf wrote: > On א', 2006-10-08 at 08:11 -0600, Kevin DeKorte wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Asaf wrote: >>> at first creation it works, But changing >>> size dynamicly through javaScript does not. >>> Setting width/height doesnt seems to have effect >>> nore does left/top >>> >>> Thanks >> Please send a test case. Those options should be working... The left and >> top are not actually controlled by the plugin, so perhaps you don't have >> the correct object? Also, have you opened the javascript console and >> looked for any errors there. >> >> Kevin >> - -- > > Sorry > > I did another test and the box is resizing - > But mplayers picture is the same size, > So when the box becomes smaller, the rest > of the image is Clipped , instead of resized. > as if mplayer is unaware to the change. > > here is the code - no javascript Errors : > > dump("\nTVNGO - X() - Enter "); > try{ > var elem = document.getElementById("media"); > elem.width = 300; > elem.height = 200; > dump("\nTVNGO - X() - Leave "); > } catch (ex) { > dump("\nTVNGO - Z() - ERROR !! "+ex); > } > > > operating on the following EMBED > <html:embed id="media" class="media_0" type="application/x-mplayer2" > width="540" height="420" left="100" top="100" /> > > > I start playing, using Open() and Play() some http://......... > While its playing ,i try the resize. > the picture is Clipped. > > Thanks Ah ok... I think I know where the problem is... I'll have to look into it. I'm guessing that in the SetWindow method the drawing area is not getting resized and hopefully doing that will trigger a resize in mplayer. Kevin - -- Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=-1509369771935935023 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFFKQpq6w2kMH0L1dERApGEAJ0Q7koploblLx9Rya+7ftNTs8CJrQCfeArI V/fsiiXOqxrhRmNa9PUWLU8= =N2hw -----END PGP SIGNATURE----- |
From: Asaf <tv...@ne...> - 2006-10-09 12:53:10
|
On =D7=90', 2006-10-08 at 08:25 -0600, Kevin DeKorte wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Asaf wrote: > > On =D7=90', 2006-10-08 at 08:11 -0600, Kevin DeKorte wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> Asaf wrote: > >>> at first creation it works, But changing > >>> size dynamicly through javaScript does not. > >>> Setting width/height doesnt seems to have effect > >>> nore does left/top > >>> > >>> Thanks > >> Please send a test case. Those options should be working... The = left and > >> top are not actually controlled by the plugin, so perhaps you do= n't have > >> the correct object? Also, have you opened the javascript console= and > >> looked for any errors there. > >> > >> Kevin > >> - -- > >=20 > > Sorry > >=20 > > I did another test and the box is resizing -=20 > > But mplayers picture is the same size,=20 > > So when the box becomes smaller, the rest > > of the image is Clipped , instead of resized. > > as if mplayer is unaware to the change. > >=20 > > here is the code - no javascript Errors : > >=20 > > =09dump("\nTVNGO - X() - Enter "); > > =09=09=09try{ > > =09=09=09=09var elem =3D document.getElementById("media"); > > =09=09=09=09elem.width =3D 300; > > =09=09=09=09elem.height =3D 200; > > =09=09=09=09dump("\nTVNGO - X() - Leave ");=09=09 > > =09=09=09} catch (ex) { > > =09=09=09=09dump("\nTVNGO - Z() - ERROR !! "+ex); > > =09=09=09} > >=20 > >=20 > > operating on the following EMBED > > <html:embed id=3D"media" class=3D"media_0" type=3D"application/= x-mplayer2" > > width=3D"540" height=3D"420" left=3D"100" top=3D"100" />=09=09= =09=09=09=09=09=09 > > =09=09 > >=20 > > I start playing, using Open() and Play() some http://......... > > While its playing ,i try the resize. > > the picture is Clipped. > >=20 > > Thanks=20 >=20 > Ah ok... I think I know where the problem is... I'll have to look = into > it. I'm guessing that in the SetWindow method the drawing area is n= ot > getting resized and hopefully doing that will trigger a resize in m= player. >=20 > Kevin >=20 Another problem , semiliar issue a little explanation first:=20 I'm running into non-standart problems becouse of non-standart usage i think, my usage is completly dynamic, I start with blank XUL window,=20 all elements are created & maniplated dynamicly in javascript,=20 and somtimes things dont work the same way as in the static approach, I see this also with the Flash plugin. If you dont have time for such issues,=20 maybe you could point us how to fix such problems. Now I caught another quirk behaviour, I set style attribut to the <Embed> : v_element.setAttribute("style","position :absolute;left:0px;top:0px;z= -index:0;"); now , when I call Play(), The plugin opens a new window instead of playing in the same window , as it was doing without the "setAttribut= e". Why is that ? Thanks=20 Asaf =20 |
From: Kevin D. <kde...@gm...> - 2006-10-09 13:52:32
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Asaf wrote: > > Another problem , semiliar issue > > a little explanation first: > > I'm running into non-standart problems becouse of non-standart > usage i think, my usage is completly dynamic, I start with blank XUL > window, > all elements are created & maniplated dynamicly in javascript, > and somtimes things dont work the same way as in the static approach, > I see this also with the Flash plugin. > > If you dont have time for such issues, > maybe you could point us how to fix such problems. > > Now > > I caught another quirk behaviour, > I set style attribut to the <Embed> : > v_element.setAttribute("style","position :absolute;left:0px;top:0px;z-index:0;"); > > now , when I call Play(), The plugin opens a new window instead of > playing in the same window , as it was doing without the "setAttribute". > > Why is that ? > > Thanks > > Asaf I think the reason you are seeing that is because there is a height and width of zero set for the window. The plugin therefore won't have a window to draw to, and so it won't be embedded. The embed tag, but have a height and width attached to it otherwise the window won't be created. They can be incorrect values, and the plugin should resize properly when given new height a width values, this currently is bug I am looking into, but have not had a chance to reproduce or fix yet. I'm guessing the bug is around line 1202 in plugin.cpp and the "drawing_area" is not being properly resized. But have not fixed it yet. Kevin - -- Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=-1509369771935935023 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFFKlQZ6w2kMH0L1dERApx0AJ4kL5KUt2f86cr5a3hw9WAh50YTVACfRh0Y 0Q+8dLSlx0W3pMnzEi6aob8= =QQjL -----END PGP SIGNATURE----- |
From: Kevin D. <kde...@gm...> - 2006-10-10 14:18:39
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Asaf wrote: > On א', 2006-10-08 at 08:11 -0600, Kevin DeKorte wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Asaf wrote: >>> at first creation it works, But changing >>> size dynamicly through javaScript does not. >>> Setting width/height doesnt seems to have effect >>> nore does left/top >>> >>> Thanks >> Please send a test case. Those options should be working... The left and >> top are not actually controlled by the plugin, so perhaps you don't have >> the correct object? Also, have you opened the javascript console and >> looked for any errors there. >> >> Kevin >> - -- > > Sorry > > I did another test and the box is resizing - > But mplayers picture is the same size, > So when the box becomes smaller, the rest > of the image is Clipped , instead of resized. > as if mplayer is unaware to the change. > > here is the code - no javascript Errors : > > dump("\nTVNGO - X() - Enter "); > try{ > var elem = document.getElementById("media"); > elem.width = 300; > elem.height = 200; > dump("\nTVNGO - X() - Leave "); > } catch (ex) { > dump("\nTVNGO - Z() - ERROR !! "+ex); > } > > > operating on the following EMBED > <html:embed id="media" class="media_0" type="application/x-mplayer2" > width="540" height="420" left="100" top="100" /> > > > I start playing, using Open() and Play() some http://......... > While its playing ,i try the resize. > the picture is Clipped. > > Thanks Asaf, This problem is now fixed in CVS... the container window of the video is now properly resized when the embed element is resized. Kevin - -- Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=-1509369771935935023 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFFK6u66w2kMH0L1dERAqnmAJ4wzRFZsS8mt1K7iXikJtZXVq04+gCfb0lQ Hj3ftzoH19dF1+CCBa2aDPI= =mlKX -----END PGP SIGNATURE----- |