{"id":324190,"date":"2021-06-02T09:00:41","date_gmt":"2021-06-02T09:00:41","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=324190"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=324190","title":{"rendered":"WebRTC \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0445 (\u0447\u0430\u0441\u0442\u044c 1)"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b &#8212; \u044d\u0442\u043e \u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u043d\u0438\u0433\u0438 <a href=\"https:\/\/webrtcforthecurious.com\" rel=\"noopener noreferrer nofollow\">webrtcforthecurious.com<\/a>. \u0412\u0441\u044f \u043a\u043d\u0438\u0433\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0431\u0438\u0442\u0430 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0447\u0442\u0438 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u043d\u043e WebRTC. <\/p>\n<p>\u041a\u043d\u0438\u0433\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 WebRTC &#171;\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c&#187;, \u0434\u043b\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0430\u0434\u043e \u0447\u0438\u0442\u0430\u0442\u044c RFC. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 RFC \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c. \u0421\u0442\u043e\u0438\u0442 \u043e\u0441\u043e\u0431\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0433\u043b\u0430\u0432\u0443 &#171;\u041e\u0442\u043b\u0430\u0434\u043a\u0430&#187;, \u0433\u0434\u0435 \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0434\u0435\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0441\u0435\u0442\u044c\u044e, \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u043c.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0430\u0441\u0442\u044c 1 &#8212; \u0432\u0432\u043e\u0434\u043d\u0430\u044f.<\/p>\n<hr>\n<p><strong>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Webrtc?<\/strong><\/p>\n<p>Web Real-Time Communication \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e WebRTC, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c \u0438 API \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. WebRTC \u043a\u0430\u043a \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b &#8212; \u044d\u0442\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u043c\u0435\u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 (\u043e\u0431\u044b\u0447\u043d\u043e \u043c\u0435\u0434\u0438\u0430) \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0434\u0443\u043f\u043b\u0435\u043a\u0441 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u0441\u0435\u0442\u0438. WebRTC \u043a\u0430\u043a API \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c. API \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f JavaScript.<\/p>\n<p>\u0422\u0430\u043a\u043e\u0435 \u0436\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 HTTP \u0438 Fetch API: WebRTC-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b &#8212; \u044d\u0442\u043e \u043a\u0430\u043a HTTP, \u0430 WebRTC API &#8212; \u044d\u0442\u043e \u043a\u0430\u043a Fetch API \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e JavaScript \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b WebRTC \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0442\u0430\u043a\u0436\u0435 \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 go<a href=\"https:\/\/github.com\/pion\/webrt\" rel=\"noopener noreferrer nofollow\"> pion\/webrtc<\/a>. \u041f\u0438\u0448\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043d\u0430 rust: <a href=\"https:\/\/github.com\/webrtc-rs\/webrtc\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/webrtc-rs\/webrtc<\/a> (\u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043d\u0438\u0435 pion\/webrtc \u043d\u0430 rust).<\/p>\n<p>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b WebRTC \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 IETF \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 <a href=\"https:\/\/datatracker.ietf.org\/wg\/rtcweb\/documents\/\" rel=\"noopener noreferrer nofollow\">rtcweb<\/a>. API WebRTC \u0437\u0430\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 W3C \u043a\u0430\u043a <a href=\"https:\/\/w3c.github.io\/webrtc-pc\/\" rel=\"noopener noreferrer nofollow\">webrtc-pc<\/a>.<\/p>\n<p><strong>\u041f\u0440\u0438\u0435\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 WebRTC<\/strong><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u0430\u0441\u0442 \u0432\u0430\u043c WebRTC. \u0421\u043f\u0438\u0441\u043e\u043a \u043d\u0435 \u043f\u043e\u043b\u043d\u044b\u0439, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041d\u0435 \u0432\u043e\u043b\u043d\u0443\u0439\u0442\u0435\u0441\u044c, \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u043b\u043e\u0432\u0430 \u0432\u0430\u043c \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0438\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0435\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 WebRTC:<\/p>\n<ul>\n<li>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442<\/p>\n<\/li>\n<li>\n<p>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>NAT Traversal<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u043b\u0438 \u043a\u043e\u043b\u0435\u0441, \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u043b\u0430\u043b\u0438 WebRTC<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430 (latency, \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0430\u0443\u0434\u0438\u043e \u0438\/\u0438\u043b\u0438 \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a\u0430) \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 1 \u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/p>\n<\/li>\n<\/ul>\n<p><strong>WebRTC \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439<\/strong><\/p>\n<p>\u042d\u0442\u043e \u0442\u0435\u043c\u0430, \u0434\u043b\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u0430\u044f \u043a\u043d\u0438\u0433\u0430. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u043e\u0431\u044a\u0435\u043c \u0435\u0435 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>\u0421\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u0438\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0438\u0440\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u0447\u0435\u0442\u044b\u0440\u0435 \u0448\u0430\u0433\u0430 \u0438\u0434\u0443\u0442 \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c, \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0448\u0430\u0433 \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0444\u0430\u043a\u0442 \u0432 WebRTC \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432! <\/p>\n<p>WebRTC  \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439. \u0412 \u044d\u0442\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 WebRTC &#8212; \u044d\u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u0445 \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 2000-\u0445 \u0433\u043e\u0434\u043e\u0432. <\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0448\u0430\u0433\u043e\u0432 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u043d\u043e \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 &#171;\u0441 \u0432\u044b\u0441\u043e\u0442\u044b \u043f\u0442\u0438\u0447\u044c\u0435\u0433\u043e \u043f\u043e\u043b\u0435\u0442\u0430&#187;. <\/p>\n<h4>\u0421\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433 \u0438\u043b\u0438 \u043a\u0430\u043a \u0430\u0433\u0435\u043d\u0442\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430 \u0432 \u0441\u0435\u0442\u0438<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f WebRTC-\u0430\u0433\u0435\u043d\u0442, \u043e\u043d \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u0441 \u043a\u0435\u043c \u0435\u043c\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f, \u0438 \u043a\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u0421\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433 (Signaling) \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443! \u0421\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0432\u0430 \u0430\u0433\u0435\u043d\u0442\u0430 \u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0439\u0442\u0438 \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430 \u0432 \u0441\u0435\u0442\u0438 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u043e\u0431\u043c\u0435\u043d \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0421\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b SDP (Session Description Protocol). SDP \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u041a\u0430\u0436\u0434\u043e\u0435 SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043f\u0430\u0440 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 (<a href=\"https:\/\/tools.ietf.org\/html\/rfc4566\" rel=\"noopener noreferrer nofollow\">rfc4566<\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0430\u0431\u043e\u0440 \u043c\u0435\u0434\u0438\u0430-\u0441\u0435\u043a\u0446\u0438\u0439. SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f WebRTC-\u0430\u0433\u0435\u043d\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0430\u043a\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\n<p>\u0430\u0434\u0440\u0435\u0441\u0430 IP \u0438 \u043f\u043e\u0440\u0442\u044b \u0430\u0433\u0435\u043d\u0442\u043e\u0432, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u0430\u0433\u0435\u043d\u0442\u043e\u043c (\u044d\u0442\u043e \u0442.\u043d. ICE-\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u044b)<\/p>\n<\/li>\n<li>\n<p>\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0443\u0434\u0438\u043e \u0438 \u0432\u0438\u0434\u0435\u043e \u0442\u0440\u0435\u043a\u043e\u0432 \u0430\u0433\u0435\u043d\u0442 \u0436\u0435\u043b\u0430\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 \u0430\u0443\u0434\u0438\u043e \u0438 \u0432\u0438\u0434\u0435\u043e \u043a\u043e\u0434\u0435\u043a\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0430\u0433\u0435\u043d\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f (<code>uFrag<\/code>\/<code>uPwd<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 (\u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430)<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433 \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0431\u044b \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u043a\u0435; \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 WebRTC \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 SDP \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438. \u0422\u0443\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u044e\u0431\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u043c\u0435\u043d\u0430 \u044d\u0442\u0438\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438: REST, Websocket, \u0434\u0430 \u0445\u043e\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u043e\u043c \u043f\u043e \u043f\u043e\u0447\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u0438\u0440\u0443 SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0430 \u0442\u043e\u0442 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0441\u0432\u043e\u0435. \u0412 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b firebase \u0434\u043b\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433\u0430.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 NAT Traversal \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e STUN\/TURN<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043e\u0431\u043e\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d WebRTC \u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u0414\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u0443\u0441\u0442\u043e\u044f\u0432\u0448\u0430\u044f\u0441\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c ICE.<\/p>\n<p>ICE  (Interactive Connectivity Establishment) &#8212; \u044d\u0442\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u044f\u044e\u0449\u0438\u0439 WebRTC. ICE \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438. \u042d\u0442\u0438 \u0430\u0433\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442\u044c \u0431\u044b\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0435\u0442\u0438, \u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438 \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043d\u0446\u0430\u0445 \u0441\u0432\u0435\u0442\u0430.  ICE \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043c\u0430\u0433\u0438\u044f \u0437\u0434\u0435\u0441\u044c \u044d\u0442\u043e \u0442.\u043d. NAT Traversal \u0438 STUN\/TURN \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041e\u0431\u0435 \u044d\u0442\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 ICE \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0442\u043a\u0438. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0433\u043b\u0443\u0431\u0436\u0435.<\/p>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, WebRTC \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u044e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438. \u0414\u0430\u043b\u0435\u0435 \u044d\u0442\u043e\u0442 \u043a\u0430\u043d\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0430\u0443\u0434\u0438\u043e\/\u0432\u0438\u0434\u0435\u043e \u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u0428\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DTLS \u0438 SRTP<\/h4>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0434\u0443\u043f\u043b\u0435\u043a\u0441\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043f\u0438\u0440\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 ICE, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u044f\u044e\u0442 WebRTC: <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc6347\" rel=\"noopener noreferrer nofollow\">DTLS<\/a> (Datagram Transport Layer  Security), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0439 TLS \u043d\u0430\u0434 UPD. (TLS &#8212; \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u043c\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 https). \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b &#8212; \u044d\u0442\u043e <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc3711\" rel=\"noopener noreferrer nofollow\">SRTP<\/a> (Secure Real-time Transport Protocol).<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 WebRTC \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 DTLS-&#171;\u0440\u0443\u043a\u043e\u043f\u043e\u0436\u0430\u0442\u0438\u0435&#187; \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u043d\u0435\u0435 \u0447\u0435\u0440\u0435\u0437 ICE. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 HTTPS WebRTC \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 CA \u0434\u043b\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0432\u0435\u0440\u044f\u0435\u0442 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0432 \u0445\u043e\u0434\u0435 \u043e\u0431\u043c\u0435\u043d\u0430 SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433\u0430. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0435 DTLS \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f DataChannel, \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 &#8212; \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0447\u0430\u0442\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0432\u0438\u0434\u0435\u043e\/\u0430\u0443\u0434\u0438\u043e \u0432 WebRTC \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b: RTP. \u0414\u043b\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f RTP-\u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b SRTP. SRTP \u0441\u0435\u0441\u0441\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0439 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0432 \u0445\u043e\u0434\u0435 DTLS \u0441\u0435\u0441\u0441\u0438\u0438 (<a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc5764\" rel=\"noopener noreferrer nofollow\">rfc5764<\/a>). \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0434\u043b\u044f \u043c\u0435\u0434\u0438\u0430-\u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e! \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0432\u0430\u0448\u0438\u043c\u0438 WebRTC-\u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438, \u0442\u043e \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u0435\u043d \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u043c (\u0430\u0433\u0435\u043d\u0442\u0430\u043c) \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0436\u0438\u0437\u043d\u0438 \u0432\u0441\u0435 \u043d\u0435 \u0442\u0430\u043a \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u043a\u0430\u0436\u0435\u0442\u0441\u044f: \u043c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u043c \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u0442\u0435\u0440\u0435\u0439 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u0441\u0435\u0442\u0438, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0435\u0442\u0438. \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u043a\u0430\u043a \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438.<\/p>\n<h4>\u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u0438\u0440\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 RTP \u0438 SCTP<\/h4>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0432\u0430 WebRTC-\u0430\u0433\u0435\u043d\u0442\u0430 \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\u043c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435! \u0418 \u0441\u043d\u043e\u0432\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b: RTP (Real-time Transport Protocol), \u0438 <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc4960\" rel=\"noopener noreferrer nofollow\">SCTP<\/a> (Stream Control Transmission  Protocol).  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 RTP \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0430\u0443\u0434\u0438\u043e\/\u0432\u0438\u0434\u0435\u043e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 SRTP \u0438 SCTP \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 DataChannel-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DTLS.<\/p>\n<p>RTP \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0435\u043d, \u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412\u0430\u0436\u043d\u043e \u0442\u043e, \u0447\u0442\u043e RTP \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432,  \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430\u043c\u0438 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u043d (\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a) \u043f\u043e\u0436\u0435\u043b\u0430\u0435\u0442. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u0432 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e \u043c\u0435\u0434\u0438\u0430.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0432 \u0441\u0442\u0435\u043a\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 WebRTC &#8212; \u044d\u0442\u043e SCTP. SCTP \u0434\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,  \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u0430\u044f \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. <\/p>\n<h3>WebRTC \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432<\/h3>\n<p>WebRTC  \u0440\u0435\u0448\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0432\u0435\u0440-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u043e\u043c. \u0413\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c WebRTC &#8212; \u044d\u0442\u043e \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043a\u0440\u043e\u043c\u043d\u043e\u0441\u0442\u044c. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0446\u0435\u043b\u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u0432\u0441\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e WebRTC \u0432\u0437\u044f\u043b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435. \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 1 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 WebRTC \u0430\u0433\u0435\u043d\u0442\u0430. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0441\u0445\u0435\u043c\u044b, WebRTC-\u0430\u0433\u0435\u043d\u0442 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cff\/97d\/451\/cff97d451d75005618debf3b59bfcf33.png\" alt=\"\u0420\u0438\u0441.1. WebRTC Agent Diagram\" title=\"\u0420\u0438\u0441.1. WebRTC Agent Diagram\" width=\"784\" height=\"536\"><figcaption>\u0420\u0438\u0441.1. WebRTC Agent Diagram<\/figcaption><\/figure>\n<h3>\u041a\u0440\u0430\u0442\u043a\u043e: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 WebRTC (API)<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a JavaScript API \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u042d\u0442\u043e \u043d\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f WebRTC API, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0431\u0440\u043e\u0441\u043e\u043a \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443 \u0432\u0430\u0441 \u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u0430\u043a \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u043c\u0435\u0441\u0442\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u043e\u0432, \u043d\u0435 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0439\u0442\u0435, \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0441\u044e\u0434\u0430 \u043a\u043e\u0433\u0434\u0430 \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435!<\/p>\n<p><code>new RTCPeerConnection<\/code> <\/p>\n<p><code>RTCPeerConnection<\/code>  &#8212; \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u0430 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f WebRTC-\u0441\u0435\u0441\u0441\u0438\u0438. \u041e\u0431\u044a\u0435\u043a\u0442 RTCPeerConnection \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 &#171;\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c&#187; \u0432\u0441\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u0432\u044b\u0448\u0435. \u0417\u0434\u0435\u0441\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0438 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.<\/p>\n<p><code>addTrack<\/code> <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434<code> addTrack<\/code>  \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 RTP-\u043f\u043e\u0442\u043e\u043a. \u0414\u043b\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 Synchronization Source (SSRC). \u0421\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 RTP \u043f\u043e\u0442\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0442\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d \u0432 Session Description-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0434\u0438\u0430-\u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430  <code>createOffer<\/code> \u043c\u0435\u0442\u043e\u0434\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <code>addTrack<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 SSRC \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0434\u0438\u0430-\u0441\u0435\u043a\u0446\u0438\u044e \u0432 SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a SRTP \u0441\u0435\u0441\u0441\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0434\u0438\u0430-\u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0430\u0447\u043d\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ICE.<\/p>\n<p><code>createDataChannel<\/code> <\/p>\n<p><code>createDataChannel<\/code>  \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 SCTP-\u043f\u043e\u0442\u043e\u043a, \u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e SCTP \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d, \u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0442\u043e\u0440\u043e\u043d \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 data channel.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a DTLS \u0441\u0435\u0441\u0441\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, SCTP \u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0430\u0447\u043d\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ICE.<\/p>\n<p><code>createOffer<\/code> <\/p>\n<p><code>createOffer<\/code> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 Session Description \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0438\u0440\u0443.<\/p>\n<p>\u0412\u044b\u0437\u043e\u0432 <code>createOffer<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0438\u0440\u0435.<\/p>\n<p><code>setLocalDescription<\/code> <\/p>\n<p><code>setLocalDescription<\/code> \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c <code>RTCPeerConnection<\/code> \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0438\u0440\u0430. \u041c\u0435\u0442\u043e\u0434\u044b <code>addTrack<\/code>, <code>createDataChannel<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u044e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043c\u0435\u0442\u043e\u0434  <code>setLocalDescription <\/code>\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d. \u0412 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 session description \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u043c<code>createOffer<\/code>.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 setLocalDescription \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0438\u0440 (\u0432\u044b\u0448\u0435 \u043e\u0431\u0443\u0441\u0436\u0434\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c), \u0438 \u0434\u0430\u043b\u0435\u0435 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u043f\u0438\u0440\u0435 SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 (offer) \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434 setRemoteDescription. \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0438\u0440 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 SDP \u0432 \u043e\u0442\u0432\u0435\u0442 (answer), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432 setRemoteDescription.<\/p>\n<p><code>addIceCandidate<\/code><\/p>\n<p><code>addIceCandidate<\/code>  \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 WebRTC-\u0430\u0433\u0435\u043d\u0442\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 ICE-\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432. <\/p>\n<p><code>ontrack<\/code> <\/p>\n<p><code>ontrack<\/code>  &#8212; \u044d\u0442\u043e \u043a\u043e\u043b\u0431\u0435\u043a (\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e RTP-\u043f\u0430\u043a\u0435\u0442 \u0431\u044b\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u043e\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0438\u0440\u0430.<\/p>\n<p><code>oniceconnectionstatechange<\/code><\/p>\n<p><code>oniceconnectionstatechange<\/code>  &#8212; \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043b\u0431\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 ICE \u0430\u0433\u0435\u043d\u0442\u0430.  \u041b\u044e\u0431\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0441\u0435\u0442\u044c\u044e \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 \u043a\u043e\u043b\u0431\u0435\u043a.<\/p>\n<p><code>onstatechange<\/code> <\/p>\n<p><code>onstatechange<\/code>  &#8212; \u044d\u0442\u043e\u0442 \u043a\u043e\u043b\u0431\u0435\u043a \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0441\u0431\u043e\u0440\u0430 \u0432\u0441\u0435\u0445 ICE-\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 null, \u0432\u0441\u0435 ICE-\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u044b \u0441\u043e\u0431\u0440\u0430\u043d\u044b.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c Signaling \u0438 SDP.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/559772\/\"> https:\/\/habr.com\/ru\/post\/559772\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b &#8212; \u044d\u0442\u043e \u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u043d\u0438\u0433\u0438 <a href=\"https:\/\/webrtcforthecurious.com\" rel=\"noopener noreferrer nofollow\">webrtcforthecurious.com<\/a>. \u0412\u0441\u044f \u043a\u043d\u0438\u0433\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0431\u0438\u0442\u0430 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0447\u0442\u0438 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u043d\u043e WebRTC. <\/p>\n<p>\u041a\u043d\u0438\u0433\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 WebRTC &#171;\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c&#187;, \u0434\u043b\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0430\u0434\u043e \u0447\u0438\u0442\u0430\u0442\u044c RFC. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 RFC \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c. \u0421\u0442\u043e\u0438\u0442 \u043e\u0441\u043e\u0431\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0433\u043b\u0430\u0432\u0443 &#171;\u041e\u0442\u043b\u0430\u0434\u043a\u0430&#187;, \u0433\u0434\u0435 \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0434\u0435\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0441\u0435\u0442\u044c\u044e, \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u043c.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0430\u0441\u0442\u044c 1 &#8212; \u0432\u0432\u043e\u0434\u043d\u0430\u044f.<\/p>\n<hr>\n<p><strong>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Webrtc?<\/strong><\/p>\n<p>Web Real-Time Communication \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e WebRTC, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c \u0438 API \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. WebRTC \u043a\u0430\u043a \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b &#8212; \u044d\u0442\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u043c\u0435\u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 (\u043e\u0431\u044b\u0447\u043d\u043e \u043c\u0435\u0434\u0438\u0430) \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0434\u0443\u043f\u043b\u0435\u043a\u0441 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u0441\u0435\u0442\u0438. WebRTC \u043a\u0430\u043a API \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c. API \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f JavaScript.<\/p>\n<p>\u0422\u0430\u043a\u043e\u0435 \u0436\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 HTTP \u0438 Fetch API: WebRTC-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b &#8212; \u044d\u0442\u043e \u043a\u0430\u043a HTTP, \u0430 WebRTC API &#8212; \u044d\u0442\u043e \u043a\u0430\u043a Fetch API \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e JavaScript \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b WebRTC \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0442\u0430\u043a\u0436\u0435 \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 go<a href=\"https:\/\/github.com\/pion\/webrt\" rel=\"noopener noreferrer nofollow\"> pion\/webrtc<\/a>. \u041f\u0438\u0448\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043d\u0430 rust: <a href=\"https:\/\/github.com\/webrtc-rs\/webrtc\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/webrtc-rs\/webrtc<\/a> (\u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043d\u0438\u0435 pion\/webrtc \u043d\u0430 rust).<\/p>\n<p>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b WebRTC \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 IETF \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 <a href=\"https:\/\/datatracker.ietf.org\/wg\/rtcweb\/documents\/\" rel=\"noopener noreferrer nofollow\">rtcweb<\/a>. API WebRTC \u0437\u0430\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 W3C \u043a\u0430\u043a <a href=\"https:\/\/w3c.github.io\/webrtc-pc\/\" rel=\"noopener noreferrer nofollow\">webrtc-pc<\/a>.<\/p>\n<p><strong>\u041f\u0440\u0438\u0435\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 WebRTC<\/strong><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u0430\u0441\u0442 \u0432\u0430\u043c WebRTC. \u0421\u043f\u0438\u0441\u043e\u043a \u043d\u0435 \u043f\u043e\u043b\u043d\u044b\u0439, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041d\u0435 \u0432\u043e\u043b\u043d\u0443\u0439\u0442\u0435\u0441\u044c, \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u043b\u043e\u0432\u0430 \u0432\u0430\u043c \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0438\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0435\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 WebRTC:<\/p>\n<ul>\n<li>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442<\/p>\n<\/li>\n<li>\n<p>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>NAT Traversal<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u043b\u0438 \u043a\u043e\u043b\u0435\u0441, \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u043b\u0430\u043b\u0438 WebRTC<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430 (latency, \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0430\u0443\u0434\u0438\u043e \u0438\/\u0438\u043b\u0438 \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a\u0430) \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 1 \u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/p>\n<\/li>\n<\/ul>\n<p><strong>WebRTC \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439<\/strong><\/p>\n<p>\u042d\u0442\u043e \u0442\u0435\u043c\u0430, \u0434\u043b\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u0430\u044f \u043a\u043d\u0438\u0433\u0430. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u043e\u0431\u044a\u0435\u043c \u0435\u0435 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>\u0421\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u0438\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0438\u0440\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u0447\u0435\u0442\u044b\u0440\u0435 \u0448\u0430\u0433\u0430 \u0438\u0434\u0443\u0442 \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c, \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0448\u0430\u0433 \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0444\u0430\u043a\u0442 \u0432 WebRTC \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432! <\/p>\n<p>WebRTC  \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439. \u0412 \u044d\u0442\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 WebRTC &#8212; \u044d\u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u0445 \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 2000-\u0445 \u0433\u043e\u0434\u043e\u0432. <\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0448\u0430\u0433\u043e\u0432 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u043d\u043e \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 &#171;\u0441 \u0432\u044b\u0441\u043e\u0442\u044b \u043f\u0442\u0438\u0447\u044c\u0435\u0433\u043e \u043f\u043e\u043b\u0435\u0442\u0430&#187;. <\/p>\n<h4>\u0421\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433 \u0438\u043b\u0438 \u043a\u0430\u043a \u0430\u0433\u0435\u043d\u0442\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430 \u0432 \u0441\u0435\u0442\u0438<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f WebRTC-\u0430\u0433\u0435\u043d\u0442, \u043e\u043d \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u0441 \u043a\u0435\u043c \u0435\u043c\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f, \u0438 \u043a\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u0421\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433 (Signaling) \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443! \u0421\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0432\u0430 \u0430\u0433\u0435\u043d\u0442\u0430 \u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0439\u0442\u0438 \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430 \u0432 \u0441\u0435\u0442\u0438 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u043e\u0431\u043c\u0435\u043d \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0421\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b SDP (Session Description Protocol). SDP \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u041a\u0430\u0436\u0434\u043e\u0435 SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043f\u0430\u0440 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 (<a href=\"https:\/\/tools.ietf.org\/html\/rfc4566\" rel=\"noopener noreferrer nofollow\">rfc4566<\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0430\u0431\u043e\u0440 \u043c\u0435\u0434\u0438\u0430-\u0441\u0435\u043a\u0446\u0438\u0439. SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f WebRTC-\u0430\u0433\u0435\u043d\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0430\u043a\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\n<p>\u0430\u0434\u0440\u0435\u0441\u0430 IP \u0438 \u043f\u043e\u0440\u0442\u044b \u0430\u0433\u0435\u043d\u0442\u043e\u0432, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u0430\u0433\u0435\u043d\u0442\u043e\u043c (\u044d\u0442\u043e \u0442.\u043d. ICE-\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u044b)<\/p>\n<\/li>\n<li>\n<p>\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0443\u0434\u0438\u043e \u0438 \u0432\u0438\u0434\u0435\u043e \u0442\u0440\u0435\u043a\u043e\u0432 \u0430\u0433\u0435\u043d\u0442 \u0436\u0435\u043b\u0430\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 \u0430\u0443\u0434\u0438\u043e \u0438 \u0432\u0438\u0434\u0435\u043e \u043a\u043e\u0434\u0435\u043a\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0430\u0433\u0435\u043d\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f (<code>uFrag<\/code>\/<code>uPwd<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 (\u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430)<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433 \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0431\u044b \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u043a\u0435; \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 WebRTC \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 SDP \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438. \u0422\u0443\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u044e\u0431\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u043c\u0435\u043d\u0430 \u044d\u0442\u0438\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438: REST, Websocket, \u0434\u0430 \u0445\u043e\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u043e\u043c \u043f\u043e \u043f\u043e\u0447\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u0438\u0440\u0443 SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0430 \u0442\u043e\u0442 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0441\u0432\u043e\u0435. \u0412 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b firebase \u0434\u043b\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433\u0430.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 NAT Traversal \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e STUN\/TURN<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043e\u0431\u043e\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d WebRTC \u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u0414\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u0443\u0441\u0442\u043e\u044f\u0432\u0448\u0430\u044f\u0441\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c ICE.<\/p>\n<p>ICE  (Interactive Connectivity Establishment) &#8212; \u044d\u0442\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u044f\u044e\u0449\u0438\u0439 WebRTC. ICE \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438. \u042d\u0442\u0438 \u0430\u0433\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442\u044c \u0431\u044b\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0435\u0442\u0438, \u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438 \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043d\u0446\u0430\u0445 \u0441\u0432\u0435\u0442\u0430.  ICE \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043c\u0430\u0433\u0438\u044f \u0437\u0434\u0435\u0441\u044c \u044d\u0442\u043e \u0442.\u043d. NAT Traversal \u0438 STUN\/TURN \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041e\u0431\u0435 \u044d\u0442\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 ICE \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0442\u043a\u0438. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0433\u043b\u0443\u0431\u0436\u0435.<\/p>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, WebRTC \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u044e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438. \u0414\u0430\u043b\u0435\u0435 \u044d\u0442\u043e\u0442 \u043a\u0430\u043d\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0430\u0443\u0434\u0438\u043e\/\u0432\u0438\u0434\u0435\u043e \u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u0428\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DTLS \u0438 SRTP<\/h4>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0434\u0443\u043f\u043b\u0435\u043a\u0441\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043f\u0438\u0440\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 ICE, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u044f\u044e\u0442 WebRTC: <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc6347\" rel=\"noopener noreferrer nofollow\">DTLS<\/a> (Datagram Transport Layer  Security), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0439 TLS \u043d\u0430\u0434 UPD. (TLS &#8212; \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u043c\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 https). \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b &#8212; \u044d\u0442\u043e <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc3711\" rel=\"noopener noreferrer nofollow\">SRTP<\/a> (Secure Real-time Transport Protocol).<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 WebRTC \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 DTLS-&#171;\u0440\u0443\u043a\u043e\u043f\u043e\u0436\u0430\u0442\u0438\u0435&#187; \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u043d\u0435\u0435 \u0447\u0435\u0440\u0435\u0437 ICE. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 HTTPS WebRTC \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 CA \u0434\u043b\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0432\u0435\u0440\u044f\u0435\u0442 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0432 \u0445\u043e\u0434\u0435 \u043e\u0431\u043c\u0435\u043d\u0430 SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433\u0430. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0435 DTLS \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f DataChannel, \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 &#8212; \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0447\u0430\u0442\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0432\u0438\u0434\u0435\u043e\/\u0430\u0443\u0434\u0438\u043e \u0432 WebRTC \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b: RTP. \u0414\u043b\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f RTP-\u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b SRTP. SRTP \u0441\u0435\u0441\u0441\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0439 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0432 \u0445\u043e\u0434\u0435 DTLS \u0441\u0435\u0441\u0441\u0438\u0438 (<a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc5764\" rel=\"noopener noreferrer nofollow\">rfc5764<\/a>). \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0434\u043b\u044f \u043c\u0435\u0434\u0438\u0430-\u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e! \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0432\u0430\u0448\u0438\u043c\u0438 WebRTC-\u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438, \u0442\u043e \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u0435\u043d \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u043c (\u0430\u0433\u0435\u043d\u0442\u0430\u043c) \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0436\u0438\u0437\u043d\u0438 \u0432\u0441\u0435 \u043d\u0435 \u0442\u0430\u043a \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u043a\u0430\u0436\u0435\u0442\u0441\u044f: \u043c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u043c \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u0442\u0435\u0440\u0435\u0439 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u0441\u0435\u0442\u0438, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0435\u0442\u0438. \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u043a\u0430\u043a \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438.<\/p>\n<h4>\u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u0438\u0440\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 RTP \u0438 SCTP<\/h4>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0432\u0430 WebRTC-\u0430\u0433\u0435\u043d\u0442\u0430 \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\u043c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435! \u0418 \u0441\u043d\u043e\u0432\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b: RTP (Real-time Transport Protocol), \u0438 <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc4960\" rel=\"noopener noreferrer nofollow\">SCTP<\/a> (Stream Control Transmission  Protocol).  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 RTP \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0430\u0443\u0434\u0438\u043e\/\u0432\u0438\u0434\u0435\u043e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 SRTP \u0438 SCTP \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 DataChannel-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DTLS.<\/p>\n<p>RTP \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0435\u043d, \u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412\u0430\u0436\u043d\u043e \u0442\u043e, \u0447\u0442\u043e RTP \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432,  \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430\u043c\u0438 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u043d (\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a) \u043f\u043e\u0436\u0435\u043b\u0430\u0435\u0442. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u0432 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e \u043c\u0435\u0434\u0438\u0430.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0432 \u0441\u0442\u0435\u043a\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 WebRTC &#8212; \u044d\u0442\u043e SCTP. SCTP \u0434\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,  \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u0430\u044f \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. <\/p>\n<h3>WebRTC \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432<\/h3>\n<p>WebRTC  \u0440\u0435\u0448\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0432\u0435\u0440-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u043e\u043c. \u0413\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c WebRTC &#8212; \u044d\u0442\u043e \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043a\u0440\u043e\u043c\u043d\u043e\u0441\u0442\u044c. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0446\u0435\u043b\u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u0432\u0441\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e WebRTC \u0432\u0437\u044f\u043b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435. \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 1 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 WebRTC \u0430\u0433\u0435\u043d\u0442\u0430. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0441\u0445\u0435\u043c\u044b, WebRTC-\u0430\u0433\u0435\u043d\u0442 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432.<\/p>\n<figure class=\"full-width\"><figcaption>\u0420\u0438\u0441.1. WebRTC Agent Diagram<\/figcaption><\/figure>\n<h3>\u041a\u0440\u0430\u0442\u043a\u043e: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 WebRTC (API)<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a JavaScript API \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u042d\u0442\u043e \u043d\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f WebRTC API, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0431\u0440\u043e\u0441\u043e\u043a \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443 \u0432\u0430\u0441 \u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u0430\u043a \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u043c\u0435\u0441\u0442\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u043e\u0432, \u043d\u0435 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0439\u0442\u0435, \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0441\u044e\u0434\u0430 \u043a\u043e\u0433\u0434\u0430 \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435!<\/p>\n<p><code>new RTCPeerConnection<\/code> <\/p>\n<p><code>RTCPeerConnection<\/code>  &#8212; \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u0430 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f WebRTC-\u0441\u0435\u0441\u0441\u0438\u0438. \u041e\u0431\u044a\u0435\u043a\u0442 RTCPeerConnection \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 &#171;\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c&#187; \u0432\u0441\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u0432\u044b\u0448\u0435. \u0417\u0434\u0435\u0441\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0438 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.<\/p>\n<p><code>addTrack<\/code> <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434<code> addTrack<\/code>  \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 RTP-\u043f\u043e\u0442\u043e\u043a. \u0414\u043b\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 Synchronization Source (SSRC). \u0421\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 RTP \u043f\u043e\u0442\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0442\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d \u0432 Session Description-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0434\u0438\u0430-\u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430  <code>createOffer<\/code> \u043c\u0435\u0442\u043e\u0434\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <code>addTrack<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 SSRC \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0434\u0438\u0430-\u0441\u0435\u043a\u0446\u0438\u044e \u0432 SDP-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a SRTP \u0441\u0435\u0441\u0441\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0434\u0438\u0430-\u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0430\u0447\u043d\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ICE.<\/p>\n<p><code>createDataChannel<\/code> <\/p>\n<p><code>createDataChannel<\/code>  \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 SCTP-\u043f\u043e\u0442\u043e\u043a, \u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e SCTP \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d, \u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0442\u043e\u0440\u043e\u043d \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 data channel.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a DTLS \u0441\u0435\u0441\u0441\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, SCTP \u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0430\u0447\u043d\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ICE.<\/p>\n<p><code>createOffer<\/code> <\/p>\n<p><code>createOffer<\/code> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 Session Description \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0438\u0440\u0443.<\/p>\n<p>\u0412\u044b\u0437\u043e\u0432 <code>createOffer<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0438\u0440\u0435.<\/p>\n<p><code>setLocalDescription<\/code> <\/p>\n<p><code>setLocalDescription<\/code> \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c <code>RTCPeerConnection<\/code> \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0438\u0440\u0430. \u041c\u0435\u0442\u043e\u0434\u044b <code>addTrack<\/code>, <code>createDataChannel<\/code> \u0438<\/p>\n<\/hr>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-324190","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/324190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=324190"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/324190\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=324190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=324190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=324190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}