Open jinleileiking opened 1 year ago
sequenceDiagram Browser-->>Server: publish Browser-->>Server: publish request sdp Server-->>Server: SetRemoteDescription Server-->>Server: CreateAnswer Server-->>Server: SetLocalDescription Server-->>Browser: publish response sdp Server-->>Server: publish request sdp done Browser-->>Server: publish request trickle Server-->>Server: AddICECandidate Server-->>Server: publish request trickle done Server-->>Server: OnICECandidate (call back) Server-->>Browser: publish response trickle Server-->>Server: Ontrack (call back)
sequenceDiagram activate Server Note left of Browser: rtc.CreatePeerConnection Browser->>Server: subscribe Note right of Server: me.RegisterDefaultCodecs() <br/> me.RegisterHeaderExtension() <br/> webrtc.RegisterDefaultInterceptors <br/> webrtc.NewAPI <br/> api.NewPeerConnection <br/> deactivate Server activate Browser Note right of Server: peerConnection.OnNegotiationNeeded <br/> pc.CreateOffer <br/> pc.SetLocalDescription <br/> Server->>Browser: subscribe request offer sdp Note left of Browser: s.pc.SetRemoteDescription <br/> s.pc.CreateAnswer <br/> s.pc.SetLocalDescription <br/> Browser-->>Server: subscribe request answer sdp deactivate Browser Browser->>Server: subscribe request stream id Note right of Server: webrtc.NewTrackLocalStaticRTP(stream id)
firestore
publish
subscribe