【问题标题】:Webrtc peer connection create answer/offer with different sdpConstraintsWebrtc 对等连接创建具有不同 sdpConstraints 的答案/提议
【发布时间】:2013-10-22 15:56:23
【问题描述】:

假设以下情况:

Peer A 只想向 Peer B 发送音频流 Peer B 只想向 Peer A 发送视频流

因此,

使用

创建报价

var sdpConstraints = { '强制的': { 'OfferToReceiveAudio':真, 'OfferToReceiveVideo': 假 } };

当 B 收到报价并创建答案时,sdpConstraints 应该是什么?

webrtc 支持这个假设吗?有什么建议吗?

提前致谢

【问题讨论】:

    标签: google-chrome firefox audio video webrtc


    【解决方案1】:

    如果我了解您想要做什么,您对 A 的限制似乎是向后的,因为 A 想要接收视频并发送音频。

    你可能想试试A:

    var sdpConstraints = { 'mandatory': { 'OfferToReceiveAudio': false, 'OfferToReceiveVideo': true } };
    

    对于 B:

    var sdpConstraints = { 'mandatory': { 'OfferToReceiveAudio': true, 'OfferToReceiveVideo': false } };
    

    【讨论】:

    • 这只是一个假设,有什么规则吗?如果A发送音频+视频,B只发送视频......
    • 我试过一个是真的,另一个是假的,都没有工作。 OfferToReceiveAudio 和 OfferToReceiveVideo 必须同时为真
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-25
    • 2015-06-13
    • 1970-01-01
    • 1970-01-01
    • 2013-08-07
    • 1970-01-01
    相关资源
    最近更新 更多