1 Reply Latest reply on May 10, 2010 10:53 AM by bringrags

    fullScreenSourceRect and MediaContainer

    Will Law

      HI

       

      Imagine a simple player comprised of a 800x600 swf stage in which there is a 640x360 MediaContainer. The container holds a MediaElement playing a  Zeri stream at 1280x720. Scaling is default fit and everything looks good.

       

      When the user wants to go to fullscreen, I scale the MediaContainer to the native size of the video (1280x720), reattach it to the top of the display stack and then set

       

      this.stage.fullScreenSourceRect(container.x,container.y,container.width,container.height);

       

      If I leave it at this stage, I see the video at 1:1 scale in my player, but cropped by the boundaries of the 800x600 stage, as I would expect.

       

      Adding in the subsequent call to change the stage displayState to fullscreen, I would expect the contents of the source rect to be scaled up to full screen. I have done this for many years with Video object and rtmp streams. However, what I see instead is a the same cropped view of my content in fullscreen, as if the source rect were not able to grab the offscreen content.

       

      My first suspicion was the scrollRect property on the container, but I have traced this out and it remains null. I have experimented with MediaContainerUIComponent (as this happens to be a Flex project), but same results. All the player examples I see, including OSMFPlayer, do not use source rect for fullscreen, since the entire player gets scaled up, thereby avoiding this problem.

       

      What is recommended means of allowing fullScreenSourceRect to be used in conjunction with a MediaContainer?

       

      Cheers

       

      Will