alongubkin / alongubkin/phonertc

iOS: Change default resolution

未关闭
#57 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Objective-C
星标
864
派生
298
PR 合并指标
30 天内没有已合并 PR

描述

Hi, just wonder how to change default resolutions. Because it looks like ipad mini cannot handler 640*480 quite well.

I change the constrains to

```
self.constraints = [[RTCMediaConstraints alloc]
initWithMandatoryConstraints:
@[
[[RTCPair alloc] initWithKey:@"OfferToReceiveAudio" value:@"true"],
[[RTCPair alloc] initWithKey:@"OfferToReceiveVideo" value:(self.doVideo ? @"true" : @"false")],
++[[RTCPair alloc] initWithKey:@"maxWidth" value:@"320"],
++[[RTCPair alloc] initWithKey:@"minWidth" value:@"320"],
++[[RTCPair alloc] initWithKey:@"maxHeight" value:@"240"],
++ [[RTCPair alloc] initWithKey:@"minHeight" value:@"240"],
++ [[RTCPair alloc] initWithKey:@"maxFrameRate" value:@"15"],
]
optionalConstraints:
@[
[[RTCPair alloc] initWithKey:@"internalSctpDataChannels" value:@"true"],
[[RTCPair alloc] initWithKey:@"DtlsSrtpKeyAgreement" value:@"true"],
]
];
```

But threw this error: "CreateAnswer called with invalid constraints". I have been googling for a while and still no answer, could you guys help me with this ? Thank you

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。