c sdk 新增webrtc相关函数 (#4473)

另外调整函数位置,whip、whep请求设置Content-Type为application/sdp
This commit is contained in:
Lidaofu
2025-09-24 17:40:43 +08:00
committed by GitHub
parent a3eb07adfc
commit 493714bc7d
6 changed files with 355 additions and 57 deletions

View File

@@ -154,6 +154,7 @@ void WebRtcClient::doNegotiateWhepOrWhip() {
_negotiate = make_shared<HttpRequester>();
_negotiate->setMethod("POST");
_negotiate->addHeader("Content-Type", "application/sdp");
_negotiate->setBody(std::move(offer_sdp));
_negotiate->startRequester(_url._negotiate_url, [weak_self](const toolkit::SockException &ex, const Parser &response) {
auto strong_self = weak_self.lock();