Search code examples
actionscript-3apache-flexairflash-buildermxml

VideoDisplay and black on top and bottom


i'm using videodisplay to play a rtmp stream, streamed video is 800X600 which also the size of the videodisplay. but when it starts to play a black area appears on both top and bottom of the video.

attached image shows what i mean

enter image description here


Solution

  • Depends on the ratio of video, but I think you can use something like this:

    videoDisplay.scaleMode = ScaleMode.STRETCH;
    

    or

    videoDisplay.scaleMode = ScaleMode.LETTERBOX;
    

     


    Update :

    So in this case I think setting maintainAspectRatio as false within your <mx:videoDisplay /> will help you, Although the main purpose of that is maintaining the original aspect ratio while resizing the video.