{"id":281991,"date":"2016-12-05T12:25:04","date_gmt":"2016-12-05T09:25:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=281991"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=281991","title":{"rendered":"\u041a\u0430\u043a \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0437\u0430\u043b\u0435\u0437\u0442\u044c \u0432 \u043a\u0438\u0448\u043a\u0438 WebRTC \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0433\u043e\u043b\u043e\u0441\u0430 \u0438 \u0432\u0438\u0434\u0435\u043e"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f34\/001\/18f\/f3400118fa0d426e8fb64c7107307248.png\" width=\"256\" align=\"left\"\/>WebRTC \u2014 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f, \u043d\u043e \u0447\u0443\u0442\u043e\u043a \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u0430\u044f. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0434\u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u0430 \u043a\u043e\u043c\u0431\u0430\u0439\u043d. \u0417\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0441 \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u0437\u0432\u0443\u043a\u0430 \u0441 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 peer-to-peer \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438 \u0441 \u043f\u0440\u043e\u0442\u044b\u043a\u0430\u043d\u0438\u0435\u043c NAT \u043f\u043e \u043c\u0435\u0440\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0437\u0432\u0443\u043a\u0430 \u0438 \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e, \u0441 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f realtime \u0434\u0430\u043d\u043d\u044b\u0435: \u043a\u043e\u0434\u0435\u043a\u0438, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0442\u0435\u0440\u044f \u043a\u0430\u0434\u0440\u043e\u0432, \u0432\u043e\u0442 \u044d\u0442\u043e \u0432\u0441\u0451. \u041d\u0443 \u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043e\u043a\u043d\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0418\u043b\u0438 \u043d\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u044d\u0442\u043e \u0443\u0436\u0435 \u043a\u0430\u043a \u0437\u0430\u0439\u0434\u0435\u0442. \u0410\u0445 \u0434\u0430, \u0435\u0449\u0435 \u2014 realtime \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0442\u043e\u0439 \u0436\u0435 \u0441\u0445\u0435\u043c\u0435 \u0434\u043b\u044f \u0438\u0433\u0440, \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432 \u0438 \u0432\u0441\u0435\u0433\u043e \u0442\u043e\u0433\u043e, \u0433\u0434\u0435 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b \u043b\u0430\u0433\u0438 tcp websocket. \u041c\u044b \u0432 Voximplant \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043a\u043e\u043f\u0430\u0435\u043c\u0441\u044f \u0432 \u043a\u0438\u0448\u043a\u0430\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0431\u044b\u043b\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u0432\u0443\u043a \u0438 \u0432\u0438\u0434\u0435\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 100-\u043c\u0435\u0433\u0430\u0431\u0438\u0442\u043a\u0435. \u0418 \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0432 \u044d\u0442\u0438\u0445 \u043a\u0438\u0448\u043a\u0430\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0432\u0430\u043c \u0442\u043e\u0436\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0425\u0430\u0431\u0440\u0430!<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  WebRTC 1.0 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Session_Description_Protocol\">SDP<\/a>, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u0432\u0443\u0445 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d. \u041c\u043d\u043e\u0433\u0438\u043c \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0438\u0437 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u0438 90-\u0445, \u043d\u043e \u0436\u0435\u0441\u0442\u043e\u043a\u0430\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0432\u0430, \u0447\u0442\u043e SDP <a href=\"https:\/\/webrtchacks.com\/tag\/ortc\/\">\u0431\u0443\u0434\u0435\u0442 \u0441 \u043d\u0430\u043c\u0438 \u0435\u0449\u0451 \u0434\u043e\u043b\u0433\u043e<\/a>. \u0418 \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043b\u0435\u0437\u0442\u044c \u0432 \u043a\u0438\u0448\u043a\u0438 WebRTC \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u043e: \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043a\u043e\u0434\u0435\u043a\u0438, \u043c\u0435\u043d\u044f\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0443 \u043a\u0430\u043d\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u0430\u0447\u043a\u0430\u0442\u044c \u0440\u0443\u043a\u0438 \u0432 SDP.<\/p>\n<p>  \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0432 \u0411\u043e\u0441\u0442\u043e\u043d\u0435 \u043f\u0440\u043e\u0448\u043b\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044f \u043e WebRTC. Nick Gauthier \u0438\u0437 <a href=\"https:\/\/meetspaceapp.com\/\">MeetSpace<\/a> \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u043e\u043d \u043c\u0435\u043d\u044f\u043b SDP \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0440\u044e\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044e \u043d\u0430 10 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u0411\u0435\u0437 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a 9 \u0434\u0440\u0443\u0433\u0438\u043c. \u0422\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043d\u0435\u0447\u0430\u0441\u0442\u043e, \u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0437\u0430 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u043a\u0430\u043d\u0430\u043b\u0430 WebRTC \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430. \u0412\u0438\u0434\u0435\u043e\u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/www.youtube.com\/watch?v=X2gLy4QRK9k&amp;feature=youtu.be&amp;list=PLJulS80le865-N8aE3LOTPp84BMUGIuUf\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0410 \u043d\u0438\u0436\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043e\u043d \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b.<\/p>\n<p>  \u0411\u0435\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 <b>PeerConnection<\/b> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0441\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0448\u0438\u0440\u0438\u043d\u0443 \u043a\u0430\u043d\u0430\u043b\u0430 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0438\u0434\u0435\u043e. \u0418\u043b\u0438 \u0437\u0432\u0443\u043a\u0430. \u0427\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u0442\u043e, \u0435\u0441\u043b\u0438 \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044f \u2013 \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0430\u0448 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440. \u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c GMail? \u0418\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441 \u00ab\u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439\u00bb \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u043a\u0430\u043d\u0430\u043b\u0430? \u0418\u043b\u0438, \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0432 MeetSpace, \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0435 10-\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 <b>PeerConnection<\/b>&#8216;\u044b \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c?<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c SDP \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JavaScript \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430.<\/p>\n<h2>\u0413\u0434\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c SDP<\/h2>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 SDP. \u0421\u0430\u043c\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 SDP \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 <b>PeerConnection<\/b> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 <b>Offer<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u0435:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">peerConnection.createOffer(   function(offer) {     console.debug(&quot;The offer SDP:&quot;, offer.sdp);     peerConnection.setLocalDescription(offer);     \/\/ your signaling code to communicate the offer goes here   } );  peerConnection.createOffer(   function(offer) {     console.debug(&quot;The offer SDP:&quot;, offer.sdp);     peerConnection.setLocalDescription(offer);     \/\/ your signaling code to communicate the offer goes here   } ); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c SDP \u043f\u0430\u043a\u0435\u0442 \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435. \u0423\u0434\u0430\u0447\u043d\u043e, \u0447\u0442\u043e WebRTC \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u00absignaling\u00bb \u0438 \u043d\u0430 \u043f\u043b\u0435\u0447\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 Offer&#8217;\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0449\u0438\u043c\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c\u0438:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">peerConnection.createOffer(   function(offer) {         peerConnection.setLocalDescription(offer);     \/\/ modify the SDP after calling setLocalDescription     offer.sdp = setMediaBitrates(offer.sdp);     \/\/ your signaling code to communicate the offer goes here   } );  peerConnection.createOffer(   function(offer) {         peerConnection.setLocalDescription(offer);     \/\/ modify the SDP after calling setLocalDescription     offer.sdp = setMediaBitrates(offer.sdp);     \/\/ your signaling code to communicate the offer goes here   } ); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <b>setMediaBitrates<\/b>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0432\u0435\u0440\u043d\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 SDP (\u0434\u0435\u0442\u0430\u043b\u0438 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435). \u041b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441: \u043d\u0435\u043b\u044c\u0437\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 <b>createOffer<\/b>\/<b>createAnswer<\/b> \u0438 <b>setLocalDescription<\/b>. \u0422\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0432\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0435. \u041a\u043e\u0433\u0434\u0430 \u043f\u0430\u043a\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 SDP \u043f\u0430\u043a\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 WebRTC \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043a\u0430\u043a \u00abAnswer\u00bb. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u00abOffer\u00bb \u0437\u0432\u0443\u0447\u0438\u0442 \u00ab\u042d\u0442\u043e \u0442\u0430 \u0448\u0438\u0440\u0438\u043d\u0430 \u043a\u0430\u043d\u0430\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043c\u043e\u0433\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00bb, \u043d\u043e \u0438 \u00abAnswer\u00bb \u0442\u043e\u0436\u0435 \u0437\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u00ab\u0410 \u044d\u0442\u043e \u0442\u0430 \u0448\u0438\u0440\u0438\u043d\u0430 \u043a\u0430\u043d\u0430\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0433\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044f\u00bb. \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0434\u043e \u0441 \u043e\u0431\u043e\u0438\u0445 \u043a\u043e\u043d\u0446\u043e\u0432 \u0442\u0440\u0443\u0431\u044b:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">peerConnection.setRemoteDescription(new RTCSessionDescription(offer)).then(function() {   peerConnection.createAnswer().then(function(answer) {         peerConnection.setLocalDescription(answer);         \/\/ modify the SDP after calling setLocalDescription         answer.sdp = setMediaBitrates(answer.sdp);     \/\/ your signaling code to communicate the answer goes here   }; };  peerConnection.setRemoteDescription(new RTCSessionDescription(offer)).then(function() {   peerConnection.createAnswer().then(function(answer) {         peerConnection.setLocalDescription(answer);         \/\/ modify the SDP after calling setLocalDescription         answer.sdp = setMediaBitrates(answer.sdp);     \/\/ your signaling code to communicate the answer goes here   }; }; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043c\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 SDP, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441\u0430\u043c\u0443 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e!<\/p>\n<h2>\u041a\u0430\u043a \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c SDP<\/h2>\n<p>  \u041e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0441\u0442 \u043e\u0442 Ant\u00f3n Rom\u00e1n <a href=\"https:\/\/webrtchacks.com\/update-anatomy-webrtc-sdp-anton-roman\/\">\u00ab\u0410\u043d\u0430\u0442\u043e\u043c\u0438\u044f WebRTC SDP\u00bb<\/a>, \u043e\u043d \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 SDP \u0438 \u043a\u0430\u043a \u043e\u043d \u0443\u0441\u0442\u0440\u043e\u0435\u043d. \u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u043c\u043e\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0415\u0449\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e:<a href=\"https:\/\/tools.ietf.org\/html\/rfc4566#page-7\"> RFC 4566 SDP: Session Description Protocol<\/a>. \u0421\u0441\u044b\u043b\u043a\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u0432\u0430\u0441 \u043d\u0430 5-\u044e \u0441\u0435\u043a\u0446\u0438\u044e 7-\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0433\u0434\u0435 \u043a\u0430\u043a \u0440\u0430\u0437 \u043e\u043f\u0438\u0441\u0430\u043d \u0444\u043e\u0440\u043c\u0430\u0442. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u043b\u044e\u0431\u0438\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0441\u043f\u0435\u0446\u0438, \u043a\u0440\u0430\u0442\u043a\u0430\u044f \u0432\u044b\u0436\u0438\u043c\u0430\u043a\u0430: SDP \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 UTF-8 \u0442\u0435\u043a\u0441\u0442, \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u0439 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0438\u0434\u0430 &quot; = &quot;.<\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0430\u0436\u043d\u0443\u044e \u0448\u0442\u0443\u043a\u0443, \u0441\u043f\u0440\u044f\u0442\u0430\u043d\u043d\u0443\u044e \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0435 5-\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438: \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f types. \u041d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043a\u0443\u0441\u043e\u043a \u0442\u0435\u043a\u0441\u0442\u0430, \u0438 \u0441\u043d\u043e\u0432\u0430 \u0434\u0430\u043c \u0432\u044b\u0436\u0438\u043c\u043a\u0443. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 SDP \u0435\u0441\u0442\u044c \u0441\u0435\u043a\u0446\u0438\u044f, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u00abmedia descriptions\u00bb. \u0418\u0445 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435: \u00abm\u00bb, \u00abi\u00bb, \u00abc\u00bb, \u00abb\u00bb, \u00abk\u00bb, \u00aba\u00bb.<\/p>\n<p>  \u042d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 FC 3556 <a href=\"https:\/\/tools.ietf.org\/html\/rfc3556\">Session Description Protocol (SDP) Bandwidth Modifiers for RTP Control Protocol (RTCP) Bandwidth<\/a>. \u0412 \u044d\u0442\u043e\u0439 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0443 \u043a\u0430\u043d\u0430\u043b\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u00abtype\u00bb \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u00abb\u00bb. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 SDP \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434 \u00abb=AS:XXX\u00bb, \u0433\u0434\u0435 XXX \u2014 \u0448\u0438\u0440\u0438\u043d\u0430 \u043a\u0430\u043d\u0430\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c. \u0410\u043a\u0440\u043e\u043d\u0438\u043c \u00abAS\u00bb \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u00abApplication Specific Maximum\u00bb, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f \u0448\u0438\u0440\u0438\u043d\u0430 \u043a\u0430\u043d\u0430\u043b\u0430. \u0422\u0430\u043a\u0436\u0435 \u0438\u0437 RFC \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u0438\u043b\u043e<b>\u0431\u0438\u0442\u0430\u0445<\/b> \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, kbps. \u0418\u0442\u043e\u0433\u043e, \u043d\u0430\u0448 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e \u0442\u0430\u043a\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443:<\/p>\n<pre> \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043c &quot;m=audio&quot; \u0438\u043b\u0438 &quot;m=video&quot; \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 type &quot;i&quot; \u0438 &quot;c&quot; \u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 type &quot;b&quot;, \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0435 \u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 type &quot;b&quot; <\/pre>\n<h2>\u041a\u0430\u043a \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c SDP<\/h2>\n<p>  \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u043e\u0432 WebRTC \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 media description \u0434\u043b\u044f \u0432\u0438\u0434\u0435\u043e \u0438 media description \u0434\u043b\u044f \u0437\u0432\u0443\u043a\u0430. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a 500kb\/s \u0438 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u043f\u043e\u0442\u043e\u043a 50kb\/s:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">function setMediaBitrates(sdp) {   return setMediaBitrate(setMediaBitrate(sdp, &quot;video&quot;, 500), &quot;audio&quot;, 50); }  function setMediaBitrate(sdp, media, bitrate) {   var lines = sdp.split(&quot;\\n&quot;);   var line = -1;   for (var i = 0; i &lt; lines.length; i++) {     if (lines[i].indexOf(&quot;m=&quot;+media) === 0) {       line = i;       break;     }   }   if (line === -1) {     console.debug(&quot;Could not find the m line for&quot;, media);     return sdp;   }   console.debug(&quot;Found the m line for&quot;, media, &quot;at line&quot;, line);    \/\/ Pass the m line   line++;    \/\/ Skip i and c lines   while(lines[line].indexOf(&quot;i=&quot;) === 0 || lines[line].indexOf(&quot;c=&quot;) === 0) {     line++;   }    \/\/ If we're on a b line, replace it   if (lines[line].indexOf(&quot;b&quot;) === 0 {     console.debug(&quot;Replaced b line at line&quot;, line);     lines[line] = &quot;b=AS:&quot;+bitrate;     return lines.join(&quot;\\n&quot;);   }      \/\/ Add a new b line   console.debug(&quot;Adding new b line before line&quot;, line);   var newLines = lines.slice(0, line)   newLines.push(&quot;b=AS:&quot;+bitrate)   newLines = newLines.concat(lines.slice(line, lines.length))   return newLines.join(&quot;\\n&quot;) }  function setMediaBitrates(sdp) {   return setMediaBitrate(setMediaBitrate(sdp, &quot;video&quot;, 500), &quot;audio&quot;, 50); }   function setMediaBitrate(sdp, media, bitrate) {   var lines = sdp.split(&quot;\\n&quot;);   var line = -1;   for (var i = 0; i &lt; lines.length; i++) {     if (lines[i].indexOf(&quot;m=&quot;+media) === 0) {       line = i;       break;     }   }   if (line === -1) {     console.debug(&quot;Could not find the m line for&quot;, media);     return sdp;   }   console.debug(&quot;Found the m line for&quot;, media, &quot;at line&quot;, line);     \/\/ Pass the m line   line++;     \/\/ Skip i and c lines   while(lines[line].indexOf(&quot;i=&quot;) === 0 || lines[line].indexOf(&quot;c=&quot;) === 0) {     line++;   }     \/\/ If we're on a b line, replace it   if (lines[line].indexOf(&quot;b&quot;) === 0 {     console.debug(&quot;Replaced b line at line&quot;, line);     lines[line] = &quot;b=AS:&quot;+bitrate;     return lines.join(&quot;\\n&quot;);   }      \/\/ Add a new b line   console.debug(&quot;Adding new b line before line&quot;, line);   var newLines = lines.slice(0, line)   newLines.push(&quot;b=AS:&quot;+bitrate)   newLines = newLines.concat(lines.slice(line, lines.length))   return newLines.join(&quot;\\n&quot;) } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u042d\u0442\u043e \u0432\u0441\u0451! \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u0433\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 SDP. \u041f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u043b\u043a\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435 \u043d\u0430\u0434\u043e \u043f\u043e\u043d\u044f\u0442\u044c. \u041d\u043e \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u043c\u0443 \u0441\u0447\u0435\u0442\u0443 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043d\u0430\u0431\u043e\u0440 \u0441\u0442\u0440\u043e\u043a, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u041d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u0440\u0435\u0433\u044d\u043a\u0441\u043f\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0435\u043a\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043f\u043e\u0440\u044f\u0434\u043e\u043a. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 type \u00abb\u00bb, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 WebRTC \u0438 \u043a\u0430\u043a \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<br \/> \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:\/\/habrahabr.ru\/post\/316840\/\"> https:\/\/habrahabr.ru\/post\/316840\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f34\/001\/18f\/f3400118fa0d426e8fb64c7107307248.png\" width=\"256\" align=\"left\"\/>WebRTC \u2014 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f, \u043d\u043e \u0447\u0443\u0442\u043e\u043a \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u0430\u044f. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0434\u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u0430 \u043a\u043e\u043c\u0431\u0430\u0439\u043d. \u0417\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0441 \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u0437\u0432\u0443\u043a\u0430 \u0441 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 peer-to-peer \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438 \u0441 \u043f\u0440\u043e\u0442\u044b\u043a\u0430\u043d\u0438\u0435\u043c NAT \u043f\u043e \u043c\u0435\u0440\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0437\u0432\u0443\u043a\u0430 \u0438 \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e, \u0441 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f realtime \u0434\u0430\u043d\u043d\u044b\u0435: \u043a\u043e\u0434\u0435\u043a\u0438, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0442\u0435\u0440\u044f \u043a\u0430\u0434\u0440\u043e\u0432, \u0432\u043e\u0442 \u044d\u0442\u043e \u0432\u0441\u0451. \u041d\u0443 \u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043e\u043a\u043d\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0418\u043b\u0438 \u043d\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u044d\u0442\u043e \u0443\u0436\u0435 \u043a\u0430\u043a \u0437\u0430\u0439\u0434\u0435\u0442. \u0410\u0445 \u0434\u0430, \u0435\u0449\u0435 \u2014 realtime \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0442\u043e\u0439 \u0436\u0435 \u0441\u0445\u0435\u043c\u0435 \u0434\u043b\u044f \u0438\u0433\u0440, \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432 \u0438 \u0432\u0441\u0435\u0433\u043e \u0442\u043e\u0433\u043e, \u0433\u0434\u0435 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b \u043b\u0430\u0433\u0438 tcp websocket. \u041c\u044b \u0432 Voximplant \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043a\u043e\u043f\u0430\u0435\u043c\u0441\u044f \u0432 \u043a\u0438\u0448\u043a\u0430\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0431\u044b\u043b\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u0432\u0443\u043a \u0438 \u0432\u0438\u0434\u0435\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 100-\u043c\u0435\u0433\u0430\u0431\u0438\u0442\u043a\u0435. \u0418 \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0432 \u044d\u0442\u0438\u0445 \u043a\u0438\u0448\u043a\u0430\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0432\u0430\u043c \u0442\u043e\u0436\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0425\u0430\u0431\u0440\u0430!<\/p>\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-281991","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/281991","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=281991"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/281991\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=281991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=281991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=281991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}