video zoom

I'm working on a small function that zooms the video (with optional panning) but using the code below doesn't seem to work, any tips

addEventListener("controller_key_down",keyPressed,true);

function keyPressed(evt)
{

Player.video.main.changeLayout(0,0,Player.createVideoScale(1,2),0,0,1920,1080,"00:00:00:00");

}

The above code should have changed the video on any key press.



Answer this question

video zoom

  • su45937

    LevelX, have you got this working yet

  • Lady_A

    You can only specify 0 duration if the video is paused; otherwise, you need a duration anywhere from 1 frame to 3 seconds.

  • jkirk

    Also you want 'false' as your last parameter, not 'true'. Otherwise you won't get events unless you have a button highlighted (which by default you won't have).

  • Kamen

    Thanks I changed it to this now:

    addEventListener("controller_key_down",keyPressed,false);

    function keyPressed(evt)
    {

    Player.video.main.changeLayout(0,0,Player.createVideoScale(1,2),0,0,1920,1080,"00:00:01:00");

    }

    but still no effect in emulator or on the A1.


  • akaRickShaw

    Ok, I finally got the zoom working now just the panning routine and test it on the Toshiba and im done :)

    It seems that I cannot use negative numbers for the x position of the video.


  • Barry Mull

    Peter said "You can only specify 0 duration if the video is paused; otherwise, you need a duration anywhere from 1 frame to 3 seconds" but this is wrong. I think what he meant to say was "if paused you MUST specify a duration of zero. If playing, anything from 0 to 3 seconds is good.

  • Maartin

    This code should zoom the video out i.e. assuming the video is 1920x1080 you will see it half-sized in the top left corner of the aperture. (I assume the aperture is also 1920x1080).

    If the video is other sizes, then ihdsim will get it wrong in various ways.

    I'd check the key handler is running. I don't see anything wrong with the changeLayout call.



  • David S. Anderson

    Not yet, I had a deadline so not much time to experiment. Giving it another try today, am going for that zoom and pan effect.
  • video zoom