Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 videodisplay 播放 rtmp 流,流式视频是 800X600,这也是 videodisplay 的大小。但是当它开始播放时,视频的顶部和底部都会出现黑色区域。
附图显示了我的意思
取决于视频的比例,但我认为你可以使用这样的东西:
videoDisplay.scaleMode = ScaleMode.STRETCH;
或者
videoDisplay.scaleMode = ScaleMode.LETTERBOX;
更新 :
因此,在这种情况下,我认为在您的设置中设置maintainAspectRatio为false<mx:videoDisplay />会对您有所帮助,尽管这样做的主要目的是在调整视频大小的同时保持原始纵横比。
maintainAspectRatio
<mx:videoDisplay />