【发布时间】:2020-04-08 18:48:15
【问题描述】:
在webrtc中,如何使用peer连接在Android中添加min_height、max_height、min_fps等视频约束?
【问题讨论】:
标签: android webrtc webrtc-android videocall
在webrtc中,如何使用peer连接在Android中添加min_height、max_height、min_fps等视频约束?
【问题讨论】:
标签: android webrtc webrtc-android videocall
您可以使用 MediaConstraints KeyValuePair 添加它
videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("maxHeight", Integer.toString(videoHeight)));
videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("maxWidth", Integer.toString(videoWidth)));
videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("maxFrameRate", Integer.toString(videoFps)));
videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("minFrameRate", Integer.toString(videoFps)))
【讨论】: