Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在使用WebRTC for Ant Media Server发布时更改纵横比?_Webrtc_Ant Media Server - Fatal编程技术网

如何在使用WebRTC for Ant Media Server发布时更改纵横比?

如何在使用WebRTC for Ant Media Server发布时更改纵横比?,webrtc,ant-media-server,Webrtc,Ant Media Server,我想在Ant Media Server中为WebRTC发布使用不同的纵横比 如何改变它 您可以在/usr/local/antmedia/webrtcappe/WEB-INF/index.html下打开index.html文件 并更改下面的行 var mediaConstraints = { video : true, audio : true }; 到 您也可以使用4/3作为纵横比。我不认为仅仅更改html会有所帮助,基础视频需要使用正确的纵横比进行编码才能正常工作。Ant m

我想在Ant Media Server中为WebRTC发布使用不同的纵横比


如何改变它

您可以在/usr/local/antmedia/webrtcappe/WEB-INF/index.html下打开index.html文件

并更改下面的行

var mediaConstraints = {
    video : true,
    audio : true
};


您也可以使用4/3作为纵横比。

我不认为仅仅更改html会有所帮助,基础视频需要使用正确的纵横比进行编码才能正常工作。Ant media在非企业版中可能不支持此功能-
var mediaConstraints = {
    video :  { aspectRatio: 16/9 },
    audio : true
};