refine: update static_cast in webrtc api

This commit is contained in:
Johnny 2023-04-21 19:55:14 +08:00
parent cb92cd0b89
commit 5d33e4c9f9

View File

@ -1595,7 +1595,7 @@ void installWebApi() {
auto offer = allArgs.getArgs();
CHECK(!offer.empty(), "http body(webrtc offer sdp) is empty");
WebRtcPluginManager::Instance().getAnswerSdp(*(static_cast<Session *>(&sender)), type,
WebRtcPluginManager::Instance().getAnswerSdp(static_cast<Session&>(sender), type,
WebRtcArgsImp(allArgs, sender.getIdentifier()),
[invoker, val, offer, headerOut](const WebRtcInterface &exchanger) mutable {
//设置返回类型
@ -1620,7 +1620,7 @@ void installWebApi() {
auto offer = allArgs.getArgs();
CHECK(!offer.empty(), "http body(webrtc offer sdp) is empty");
WebRtcPluginManager::Instance().getAnswerSdp(*(static_cast<Session *>(&sender)), type,
WebRtcPluginManager::Instance().getAnswerSdp(static_cast<Session&>(sender), type,
WebRtcArgsImp(allArgs, sender.getIdentifier()),
[invoker, offer, headerOut](const WebRtcInterface &exchanger) mutable {
// 设置跨域