--- title: Lab Meeting Minutes 2022/03/25 tags: lab_meeting --- > Outline > [TOC] --- # PERAL Lab Meeting - 時間:111 年 03 月 25 日 10:00 - 地點:TC 321 - 出席者:吳坤熹老師、謝萬霖、周以恆、吳騰然、劉怡君、田蕙瑜、洪胤勛、丘世宇、莊才賢 - 會議主題: [WebRTC](http://ms15.voip.edu.tw/~webmaster/meeting/1102/PPT/webRTC_v2.pptx) - 主講者: 莊才賢 - 主記: 謝萬霖 ## 會議內容 - WebRTC feature - Acquire audio and video - Communicating data - History - Licenses are used to be expensive - RTC is time-comsuming on web - Google IP Solution (GIPS) is open-sourced - a great push on WebRTC - Session Description Protocol (SDP) - RFC 8866 - Describe session, not transport nor content - Can work with - HTTP - SIP - SAP - RTSP - SDP format (Session description) - Protocol version (v=) - default 0 - Origin (o=) - `<username> <sess-id> <sess-version> <nettype> <addrtype> <unicast-address>` - `username` if not support, `"-"` - Connection Information (c=) - `<nettype> <addrtype> <connection-address>` - if no candidate, insert dummy - e.g. `c=IN IP4 0.0.0.0` - Session Name (s=) - `<session name>` - if no meaningful, use `s="-"` - Bandwidth Information (b=) - Session Information (i=) - URI (u=)` - Email Address (e=) - Phone Number (p=) - SDP format (Time description) - Not important - SDP format (Media description) - Media Description (m=) - start from "m=", end at next "m=" and end of session - SDP can contain more than one "m=" - The prior the higher priority - `<media> <port> <proto> <fmt> ...` - Offer/Answer model - Purpose - Initialize session - Update session - Initialize the session 1. Offerer send SDP offer to Answerer - Describe local environment 3. Answerer reply answer to offerer - describe the overlap of local environment and offerer’s encoding and codec - Update session 1. new SDP offer/answer can achieve this behavior 2. the offer’s modification can be reject by anser at any reason - Interactive Connectivity Establishment (ICE) - find a best route systematically to communicate over the NAT or firewall - a systematically methods to find best route - Steps 1. gather all canidates address 2. prioritizing candidates 3. eliminating redundant candidates 4. connectivity check 5. sort canidate 6. find the best route - WebRTC APIs - MediaStream (aka getUserMedia) - RTCPeerConnection - RTCDataChannel - MediaStream - get the stream from browser - may contain multi tracks ![](https://i.imgur.com/kC49NEK.png) - RTCPeerConnection - Signal processing - Codec handling - P2P communcation - Security - Bandwitdth management ![](https://i.imgur.com/gnYiot0.png) - browser 提供簡單 api 簡化建立 p2p connection 過程 - 除了提供協商通道和傳輸資料,剩下的操作被包裝在 browser - Establish RTCPeerConnection 1. signaling 2. constraints 3. peer connection 4. Run callbacks - onnegotiationneeded - 設定 local 的 sdp offer - onicecandidate - 送出 local 可行網路的 sdp - onTrack - 設定傳回的 track 用途 - onMessage - 接收 sdp offer 儲存到 peer connection 並產生 sdp answer 回傳給傳遞 offer 的 user - 把 candidate 加入到 peer connection 讓瀏覽器底層進行協商 - Image explanation - webRTC’s offer/answer model ![](https://i.imgur.com/VCBH7Jd.png) - ICE’s behavior ![](https://i.imgur.com/8AoEMTH.png) - Demo - Architecture ![](https://i.imgur.com/04ZD2R0.png) ### 建議&問題 1. Music on Hold 傳送音樂過去,怎樣叫效能好?[name=Solomon] Ans : 1. 送整段音樂過去 2. 送 Signal 過去播 local 音樂 [name=Solomon] 2. 可以在 history 之後先簡單介紹 WebRTC 模組,這樣在說明 SDP 和 ICE 才比較不容易迷失。[name=Edgar] ## 待追蹤事項 1. [name=] Ans : [name=] ## 臨時動議 1. [name=] Ans : [name=] --- 散會結束時間: 12:00