4 Replies Latest reply on Jun 14, 2011 11:03 PM by Mykola3296

    Layout regression in OSMF sprint3?

    Mykola3296 Level 2

      Hello!

       

      I have upgraded my OSMF testing projects to OSMF 1.6 Sprint 3 and found that the layout API function is unpredictable comparing to revisions below 2087.

      IS it a regression or am I missing something?

      StageVideo support is disabled.

       

      I have already written about layout measurement problems here:

      http://forums.adobe.com/thread/766840?tstart=0

      http://bugs.adobe.com/jira/browse/FM-1174

       

      We have managed to avoid an error with a custom plugin I've attached to jira.

      However in trunk revisions post 2074 the situation got worse.

       

      Here is a simplified version of test project from the ticket above that has an issue already:

      http://flashboard.info/layout/projects/OSMFLayout.zip

      What is done there:

      1) A parallel is created

      2) A simple element with just a display trait is created and inserted to parallel.

      3) Layout metadata is added to both elements.

      Here is a source code:

       

       

      /**

      * Create layout metadata for the whole composition

      */

       

      private function createContentMetadata():LayoutMetadata {

       

      var lm:LayoutMetadata = new LayoutMetadata();

      lm.x = 0;

      lm.y = 0;

      lm.width = 320;

      lm.height = 240;

       

      lm.layoutMode = LayoutMode.NONE;

      lm.scaleMode = ScaleMode.LETTERBOX;

      lm.verticalAlign = VerticalAlign.MIDDLE;

      lm.horizontalAlign = HorizontalAlign.CENTER;

       

       

      return lm;

      }

       

       

      /**

      * Creates player contents

      */

       

       

      private function createMedia():MediaElement {

       

      var clmd:LayoutMetadata;

       

       

      //Create main parallel

       

       

      var mp:ParallelElement = new ParallelElement();

      mp.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE, createContentMetadata());

       

       

      //Create control bar

       

       

      var cb:MediaElement = createControlBar();

      clmd =

      new LayoutMetadata();

       

      clmd.left = 5;

      clmd.right = 5;

      clmd.bottom = 5;

      clmd.height = 70;

       

      clmd.index = 3;

       

      clmd.scaleMode = ScaleMode.STRETCH;

      clmd.verticalAlign = VerticalAlign.MIDDLE;

      clmd.horizontalAlign = HorizontalAlign.CENTER;

       

      cb.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE, clmd);

      mp.addChild(cb);

       

       

      return mp;

      }

       

      Here are the results for Sprint3 and 2074 versions:

      http://flashboard.info/layout/index.html

      Screenshot:

      http://flashboard.info/layout/shots/1.png

       

      The grey bar is a "control bar". Sample creates a simple sprite and publishes it as a disply object trait with size 100x20.

      I try to stretch it with metadata to accomodate control bar size to player size as shown in above code.

      However "control bar" is scaled in vertical direction only.

       

      For your reference here is a comparison using setup from my previous report:

      http://flashboard.info/layout/video.html

      Screenshot:

      http://flashboard.info/layout/shots/2.png

      Here not only control bar is measured wrong - all video sizes and scale modes are invalid.

       

      Here are links to sample projects.

      Simple:

      http://flashboard.info/layout/projects/OSMFLayout.zip

      With video:

      http://flashboard.info/layout/projects/LayoutTest.zip

       

      Thank you!

       

      Best regards,

      Nikolai