1 Reply Latest reply on Feb 9, 2010 4:14 PM by RyanOConnell

    Video Scaling / Resize problems

    Frostis333

      Hi there,

       

      Using the new Sprint release, i have suddenly Problems setting the correct Layout Attributes.

      Thats what i'm trying:

       

      for x elements:


                          video = new VideoElement
                              ( new NetLoader()
                                  , new URLResource(new URL("file://"+filepath))
                              );
                         
                          LayoutUtils.setRelativeLayout(video.metadata, 100, 100);
                          LayoutUtils.setLayoutAttributes(video.metadata, ScaleMode.LETTERBOX, RegistrationPoint.CENTER);
                         
                          serialElement.addChild(video);
      end for                   



                      mediaPlayer.media = serialElement;
                      controlBar.element = serialElement;


                      container.addMediaElement(serialElement);

       

      No Error, No Result. In the last Sprint everything worked fine.

       

       

      As a test I did the following:
                       mediaPlayer.media = serialElement;
                       controlBar.element = serialElement;


                      LayoutUtils.setRelativeLayout(serialElement.metadata, 100, 100);
                      LayoutUtils.setLayoutAttributes(serialElement.metadata, ScaleMode.LETTERBOX, RegistrationPoint.CENTER);

      These four lines worked like expected only for the first video.

       

      Every help is appreciated.

       

      Best Regards

        • 1. Re: Video Scaling / Resize problems
          RyanOConnell Level 2

           

          Frostis333, 

           

          It looks like your example is correct, from what I can see.  Are there are other videos in your serial composition?  If so, you'll need to apply the LayoutUtils.setRelativeLayout and LayoutUtils.setLayoutAttributes to those elements as well as the first element.  If you are, have you tried to play the broken media elements alone, not in a composition?   If there are connections problems, etc.. try listening to the MediaErrorEvent from the video element.  If possible, please try to upload your complete example.