mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
修复webrtc echo test无法在chrome上使用的问题
This commit is contained in:
parent
03655a71b2
commit
4dcac10b3a
@ -34,3 +34,14 @@ void WebRtcEchoTest::onRtp(const char *buf, size_t len, uint64_t stamp_ms) {
|
||||
void WebRtcEchoTest::onRtcp(const char *buf, size_t len) {
|
||||
sendRtcpPacket(buf, len, true, nullptr);
|
||||
}
|
||||
|
||||
//修改mline的a=msid属性,目的是在echo test的情况下,如果offer和answer的msid相同,chrome会忽略远端的track
|
||||
void WebRtcEchoTest::onCheckSdp(SdpType type, RtcSession &sdp) {
|
||||
if (type == SdpType::answer) {
|
||||
for (auto &m : sdp.media) {
|
||||
for (auto &ssrc : m.rtp_rtx_ssrc) {
|
||||
ssrc.msid = "zlmediakit msid";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@ public:
|
||||
protected:
|
||||
///////WebRtcTransportImp override///////
|
||||
void onRtcConfigure(RtcConfigure &configure) const override;
|
||||
void onCheckSdp(SdpType type, RtcSession &sdp) override;
|
||||
void onRtp(const char *buf, size_t len, uint64_t stamp_ms) override;
|
||||
void onRtcp(const char *buf, size_t len) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user