WebRtcAPI流程
2016-11-12 14:46:14 23 举报
webrtc 流程
作者其他创作
大纲/内容
1.Ringing
onLocalCandidate
onCreatePRAnswerSuccess
pc1.addStream
onGotRemoteStream
pc2.setLocalDescription
onSetLocalSuccess
主呼方
addIceCandidate 必须在setRemoteDescription之后最好在onSetLocalPranswerSuccess之后
pc2.addIceCandidate
answer - pranswerrecvonly - inactive避免立刻打开摄像头 隐私问题
pc2.createPRAnswer
可能会有多个candidate每个回调一次
打开摄像头和麦克风
initC(102)SDP
onGotLocalStream
getUserMedia
pc1.setLocalDescription
可以用attachMediaStream把视频显示到video标签上
收到Offer SDP
被呼方
pc2.addStream
onSetRemoteSuccess
onCreateOfferSuccess
2. Ringing
trickC(105)(candidates)
ansC(106)(SDP)
onCreateAnswerSuccess
termC(107)(reason)
通话中
pc1.addIceCandidate
onSetLocalOfferSuccess
acptC(104)(SDP)
onIceStateChange (connected)
sdp 中有ssrc的时才会回调
pc1.setRemoteDescription
pc2.createAnswer
pc1.createOffer
pc2.setRemoteDescription
用户挂断
WebRtc API 流程
结束通话
用户接听
trcklC(105)(candidates)
onSetLocalAnswerSuccess
收藏
0 条评论
下一页