2

I have a mobile application that I am going to allow for landscape mode when you are playing stagevideo.

I'm farmiliar with creating a veiwport and getting stagevideo to play on ios. I am detecting when the device orientation changes and I would then like to rotate stagevideo object when the orientation changes. I'm not finding any examples or documentation on how to do this.

I notice that the Rectangle object has topLeft and bottomRight values that can be set. I'm wondering if changing the values will do the trick, or will creating a new view port setting X, Y and width and height will rotate the video if I set the X and Y to the corner that is now "0, 0" after rotation ? In other words if I rotate my phone clockwise in landscape then the new view port would be something like this.

sv.viewPort = new Rectangle(0, view.stage.stageHeight, view.stage.stageHeight, view.stage.stageWidth);
ketan
  • 19,129
  • 42
  • 60
  • 98
mattwallace
  • 4,132
  • 6
  • 43
  • 77
  • 1
    As this post is 2 years old, I'm wondering if anyone had a solution to this. The StageVideo documentation says, it's not possible to rotate, unless you rotate for 90 degrees, which would be fine for me. – nbuechi May 09 '14 at 14:34

1 Answers1

0

You can rotate the video played by the StageVideo class by encoding it rotated! For example, in After Effects, just rotate the composition containing the video after nesting it into a new composition. Then render. Then pick it up with StageVideo. Voila.

Craig
  • 814
  • 1
  • 6
  • 9