How to stream audio from browser to WebRTC native C++ application

后端 未结 3 1201
长情又很酷
长情又很酷 2021-02-13 19:43

I have so far managed to run the following sample:

WebRTC native c++ to browser video streaming example

The sample shows how to stream video from a native C++ ap

3条回答
  •  爱一瞬间的悲伤
    2021-02-13 20:06

    I know this is an old question, but I struggled myself to find a solution currently so I thought sharing is appreciated.

    There's is one more or less simple way to get an example running which streams from the browser to native code.You need the webrtc source http://www.webrtc.org/native-code/development

    The two tools you need are the peerconnection server and client. Both can be found in the folder talk/example/peerconnection

    To get it working you need to patch it to enable DTLS for the peerconnection client. So patch it with the patch provided here https://code.google.com/p/webrtc/issues/detail?id=3872 and rebuild the client. Now you are set up on the native site!

    For the browser I recommend the peer2peer example from here https://github.com/GoogleChrome/webrtc after starting the peerconnection_server and connection the peerconnection_client try to connect with the peer2peer example.

    Maybe a connection constraint is necessary:
    { "DtlsSrtpKeyAgreement": true }

提交回复
热议问题