我们正在使用Actionscript getCamera()API通过RTMP访问和流式传输相机。我不确定是否有人遇到这个但是根据浏览器我们在相机输入上得到了一些非常奇怪的效果。在某些情况下,相机显示拉伸,并且通常在Firefox中显示中央,右侧有绿色条。
是否可以在所有浏览器上以16:9的比例播放相机?
var videoWidth:Number = 427;
var videoHeight:Number = 240;
camera = Camera.getCamera();
// here are all the quality and performance settings
if (camera != null)
{
camera.setMode(videoWidth, videoHeight, videoFrameRate, false); // false gives framerate priority apparently?? http://www.flash-communications.net/technotes/setMode/index.html
camera.setQuality(videoBitrate, videoQuality);
camera.setKeyFrameInterval(2);
}
else
{
sourceVideoLabel.text = "No Camera Found\n";
}
在Chrome中:
在Firefox中: