Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
fd23a87c
Commit
fd23a87c
authored
Apr 01, 2021
by
ziyue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
answer sdp通过chrome校验
parent
4853a5af
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
185 行增加
和
31 行删除
+185
-31
webrtc/Sdp.cpp
+1
-2
webrtc/WebRtcTransport.cpp
+1
-1
webrtc/answer.sdp
+23
-20
webrtc/janus_answer.sdp
+69
-0
webrtc/janus_offer.sdp
+83
-0
www/webrtc/ZLMRTCClient.js
+8
-8
没有找到文件。
webrtc/Sdp.cpp
查看文件 @
fd23a87c
...
...
@@ -1176,7 +1176,7 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
break
;
}
case
TrackApplication
:
{
enable
=
fals
e
;
enable
=
tru
e
;
break
;
}
default
:
break
;
...
...
@@ -1195,7 +1195,6 @@ void RtcConfigure::setDefaultSetting(string ice_ufrag,
video
.
ice_pwd
=
audio
.
ice_pwd
=
application
.
ice_pwd
=
ice_pwd
;
video
.
direction
=
audio
.
direction
=
application
.
direction
=
direction
;
video
.
fingerprint
=
audio
.
fingerprint
=
application
.
fingerprint
=
fingerprint
;
application
.
enable
=
false
;
}
void
RtcConfigure
::
addCandidate
(
const
SdpAttrCandidate
&
candidate
,
TrackType
type
)
{
...
...
webrtc/WebRtcTransport.cpp
查看文件 @
fd23a87c
...
...
@@ -104,7 +104,7 @@ std::string WebRtcTransport::getAnswerSdp(const string &offer){
throw
std
::
invalid_argument
(
"支持group BUNDLE模式"
);
}
auto
str
=
_answer_sdp
->
toString
();
InfoL
<<
str
;
InfoL
<<
"
\r\n
"
<<
str
;
return
str
;
}
...
...
webrtc/answer.sdp
查看文件 @
fd23a87c
v=0
o=- 0 0 IN IP4 0.0.0.0
s=zlmediakit_webrtc_session
i=zlmediakit_webrtc_session
v=0
o=- 2712902958023202213 2 IN IP4 127.0.0.1
s=-
t=0 0
c=IN IP4 0.0.0.0
a=msid-semantic: WMS *
a=group:BUNDLE 0 1
m=audio 0 UDP/TLS/RTP/SAVPF 111
a=mid:0
a=msid-semantic: WMS
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=ice-ufrag:PdK3
a=ice-pwd:PdK31zZ1sKhPU2ACzP5av37f
a=fingerprint:sha-256 D1:4F:7B:70:86:99:BE:1E:7E:B8:C7:0F:13:BC:78:C4:6A:F9:2C:F6:F3:5E:42:11:0F:1C:74:18:F6:DD:95:75
a=setup:passive
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:68ws
a=ice-pwd:68wscAOadU4rdMwZ4Ow14M5u
a=ice-options:trickle
a=fingerprint:sha-256 BF:F8:C2:35:19:2E:C3:17:44:5A:BA:DF:08:C4:65:87:AB:0C:85:B9:91:69:80:8E:55:D9:2F:EF:5C:D6:F3:A2
a=setup:active
a=mid:0
a=ice-lite
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=recvonly
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
m=video 0 UDP/TLS/RTP/SAVPF 102 121
a=mid:1
m=video 9 UDP/TLS/RTP/SAVPF 102 121
c=IN IP4 0.0.0.0
a=ice-ufrag:PdK3
a=ice-pwd:PdK31zZ1sKhPU2ACzP5av37f
a=fingerprint:sha-256 D1:4F:7B:70:86:99:BE:1E:7E:B8:C7:0F:13:BC:78:C4:6A:F9:2C:F6:F3:5E:42:11:0F:1C:74:18:F6:DD:95:75
a=setup:passive
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:68ws
a=ice-pwd:68wscAOadU4rdMwZ4Ow14M5u
a=ice-options:trickle
a=fingerprint:sha-256 BF:F8:C2:35:19:2E:C3:17:44:5A:BA:DF:08:C4:65:87:AB:0C:85:B9:91:69:80:8E:55:D9:2F:EF:5C:D6:F3:A2
a=setup:active
a=mid:1
a=ice-lite
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:13 urn:3gpp:video-orientation
...
...
@@ -35,6 +37,7 @@ a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extension
a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
...
...
@@ -43,4 +46,5 @@ a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtpmap:121 rtx/90000
a=fmtp:121 apt=102
\ No newline at end of file
a=fmtp:121 apt=102
webrtc/janus_answer.sdp
0 → 100644
查看文件 @
fd23a87c
v=0
o=mozilla...THIS_IS_SDPARTA-87.0 5715694060540081921 0 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 9C:9C:D9:4B:2B:82:84:95:C2:23:BC:3A:0B:BE:3B:8B:D5:6A:DA:A6:B2:F4:43:5E:C1:07:48:F8:AF:CE:FC:3D
a=group:BUNDLE video data
a=ice-options:trickle
a=msid-semantic:WMS *
m=video 9 UDP/TLS/RTP/SAVPF 120 122 121 123 126 127 97 98
c=IN IP4 0.0.0.0
a=sendrecv
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:5 urn:ietf:params:rtp-hdrext:toffset
a=extmap:7 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1
a=fmtp:120 max-fs=12288;max-fr=60
a=fmtp:122 apt=120
a=fmtp:121 max-fs=12288;max-fr=60
a=fmtp:123 apt=121
a=fmtp:127 apt=126
a=fmtp:98 apt=97
a=ice-pwd:518cb4fc626f82bef2ada4e9221dfb50
a=ice-ufrag:d5484fed
a=mid:video
a=msid:{9cd17d8b-f96d-4663-866b-72ddd3b8b54b} {3dcd399d-4933-41d5-89fd-87070cfc3cf6}
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=rtcp-fb:120 ccm fir
a=rtcp-fb:120 goog-remb
a=rtcp-fb:120 transport-cc
a=rtcp-fb:121 nack
a=rtcp-fb:121 nack pli
a=rtcp-fb:121 ccm fir
a=rtcp-fb:121 goog-remb
a=rtcp-fb:121 transport-cc
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=rtcp-fb:126 goog-remb
a=rtcp-fb:126 transport-cc
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=rtcp-fb:97 goog-remb
a=rtcp-fb:97 transport-cc
a=rtcp-mux
a=rtpmap:120 VP8/90000
a=rtpmap:122 rtx/90000
a=rtpmap:121 VP9/90000
a=rtpmap:123 rtx/90000
a=rtpmap:126 H264/90000
a=rtpmap:127 rtx/90000
a=rtpmap:97 H264/90000
a=rtpmap:98 rtx/90000
a=setup:active
a=ssrc:697402393 cname:{f1ba68ef-ad59-4fff-a1f3-dbbb0cda3118}
a=ssrc:258662392 cname:{f1ba68ef-ad59-4fff-a1f3-dbbb0cda3118}
a=ssrc-group:FID 697402393 258662392
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=sendrecv
a=ice-pwd:518cb4fc626f82bef2ada4e9221dfb50
a=ice-ufrag:d5484fed
a=mid:data
a=setup:active
a=sctp-port:5000
a=max-message-size:1073741823
webrtc/janus_offer.sdp
0 → 100644
查看文件 @
fd23a87c
v=0
o=mozilla...THIS_IS_SDPARTA-87.0 1617247876363377 1 IN IP4 23.101.8.213
s=-
t=0 0
a=group:BUNDLE video data
a=msid-semantic: WMS janus
a=ice-lite
a=sendrecv
m=video 9 UDP/TLS/RTP/SAVPF 120 121 126 97 122 123 127 98
c=IN IP4 23.101.8.213
a=sendrecv
a=mid:video
a=rtcp-mux
a=ice-ufrag:ePgh
a=ice-pwd:ZURiB67/xs69E76aOa7JDw
a=ice-options:trickle
a=fingerprint:sha-256 EF:7A:50:9C:05:8C:EF:84:4D:72:B2:74:30:BA:FD:82:76:D1:C3:FE:0C:A0:10:43:B8:6C:B2:ED:B3:F7:77:8B
a=setup:actpass
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:5 urn:ietf:params:rtp-hdrext:toffset
a=extmap:6/recvonly http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:7 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1
a=fmtp:120 max-fs=12288;max-fr=60
a=fmtp:121 max-fs=12288;max-fr=60
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=rtcp-fb:120 ccm fir
a=rtcp-fb:120 goog-remb
a=rtcp-fb:120 transport-cc
a=rtcp-fb:121 nack
a=rtcp-fb:121 nack pli
a=rtcp-fb:121 ccm fir
a=rtcp-fb:121 goog-remb
a=rtcp-fb:121 transport-cc
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=rtcp-fb:126 goog-remb
a=rtcp-fb:126 transport-cc
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=rtcp-fb:97 goog-remb
a=rtcp-fb:97 transport-cc
a=rtpmap:120 VP8/90000
a=rtpmap:121 VP9/90000
a=rtpmap:126 H264/90000
a=rtpmap:97 H264/90000
a=rtpmap:122 rtx/90000
a=fmtp:122 apt=120
a=rtpmap:123 rtx/90000
a=fmtp:123 apt=121
a=rtpmap:127 rtx/90000
a=fmtp:127 apt=126
a=rtpmap:98 rtx/90000
a=fmtp:98 apt=97
a=ssrc-group:FID 3581519470 2258376012
a=msid:janus janusv0
a=ssrc:3581519470 cname:janus
a=ssrc:3581519470 msid:janus janusv0
a=ssrc:3581519470 mslabel:janus
a=ssrc:3581519470 label:janusv0
a=ssrc:2258376012 cname:janus
a=ssrc:2258376012 msid:janus janusv0
a=ssrc:2258376012 mslabel:janus
a=ssrc:2258376012 label:janusv0
a=candidate:1 1 udp 2013266431 23.101.8.213 41901 typ host
a=end-of-candidates
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 23.101.8.213
a=sendrecv
a=sctp-port:5000
a=mid:data
a=ice-ufrag:ePgh
a=ice-pwd:ZURiB67/xs69E76aOa7JDw
a=ice-options:trickle
a=fingerprint:sha-256 EF:7A:50:9C:05:8C:EF:84:4D:72:B2:74:30:BA:FD:82:76:D1:C3:FE:0C:A0:10:43:B8:6C:B2:ED:B3:F7:77:8B
a=setup:actpass
a=candidate:1 1 udp 2013266431 23.101.8.213 41901 typ host
a=end-of-candidates
www/webrtc/ZLMRTCClient.js
查看文件 @
fd23a87c
...
...
@@ -4,7 +4,7 @@ var ZLMRTCClient = (function (exports) {
const
Events$1
=
{
WEBRTC_NOT_SUPPORT
:
'WEBRTC_NOT_SUPPORT'
,
WEBRTC_ICE_CANDIDATE_ERROR
:
'WEBRTC_ICE_CANDIDATE_ERROR'
,
WEBRTC_OFFER_
ANWSER_EXCHANGE_FAILED
:
'WEBRTC_OFFER_ANWSER
_EXCHANGE_FAILED'
,
WEBRTC_OFFER_
answer_EXCHANGE_FAILED
:
'WEBRTC_OFFER_answer
_EXCHANGE_FAILED'
,
WEBRTC_ON_REMOTE_STREAMS
:
'WEBRTC_ON_REMOTE_STREAMS'
,
WEBRTC_ON_LOCAL_STREAM
:
'WEBRTC_ON_LOCAL_STREAM'
};
...
...
@@ -7360,16 +7360,16 @@ var ZLMRTCClient = (function (exports) {
let
ret
=
response
.
data
;
if
(
ret
.
code
!=
0
)
{
// mean failed for offer/an
ws
er exchange
this
.
dispatch
(
Events$1
.
WEBRTC_OFFER_
ANWSER
_EXCHANGE_FAILED
,
ret
);
// mean failed for offer/an
sw
er exchange
this
.
dispatch
(
Events$1
.
WEBRTC_OFFER_
answer
_EXCHANGE_FAILED
,
ret
);
return
;
}
let
an
ws
er
=
{};
an
ws
er
.
sdp
=
ret
.
sdp
;
an
wser
.
type
=
'anws
er'
;
log
(
this
.
TAG
,
'an
ws
er:'
,
ret
.
sdp
);
this
.
pc
.
setRemoteDescription
(
an
ws
er
).
then
(()
=>
{
let
an
sw
er
=
{};
an
sw
er
.
sdp
=
ret
.
sdp
;
an
swer
.
type
=
'answ
er'
;
log
(
this
.
TAG
,
'an
sw
er:'
,
ret
.
sdp
);
this
.
pc
.
setRemoteDescription
(
an
sw
er
).
then
(()
=>
{
log
(
this
.
TAG
,
'set remote sucess'
);
}).
catch
(
e
=>
{
error
(
this
.
TAG
,
e
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论