{"id":363,"date":"2018-07-02T22:41:20","date_gmt":"2018-07-02T22:41:20","guid":{"rendered":"https:\/\/blog.mozilla.org\/webrtc\/?p=363"},"modified":"2019-01-31T19:47:47","modified_gmt":"2019-01-31T19:47:47","slug":"how-to-avoid-data-channel-breaking","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/","title":{"rendered":"How to avoid Data Channel breaking"},"content":{"rendered":"<p>All the browser with support for negotiating data channels via SDP are using the same format. But the format is based on a specification from 2013. Since the specification has changed a lot since then it&#8217;s time to update the implementations to meet the latest spec.<\/p>\n<h4>Current status<\/h4>\n<p>If you are negotiating a data channel today in Firefox 61 (or current Chrome release) the SDP will looks something this:<\/p>\n<p><!--more--><\/p>\n<p><code>m=application 63743 DTLS\/SCTP 5000<br \/>\na=sctpmap:5000 webrtc-datachannel 256<\/code><\/p>\n<p>This is based on <a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-mmusic-sctp-sdp-05\">version 05 of the SCTP SDP draft<\/a> which is from 2013.<\/p>\n<h4>How to update this without breaking the Web<\/h4>\n<p>In Firefox 53 we implemented support to handle the then current format from <a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-mmusic-sctp-sdp-21\">version 21 of the SCTP SDP draft<\/a>. The new format looks like this:<\/p>\n<p><code>m=application 54111 UDP\/DTLS\/SCTP webrtc-datachannel<br \/>\na=sctp-port:5000<\/code><\/p>\n<p>But the problem was that the new format is incompatible with the old format. As you can see the old parser expected to find a number, <code>5000<\/code> in the example, where the new parser expects text, <code>webrtc-datachannel<\/code> in the second example.<\/p>\n<p>If Firefox 53 had started to put the new format into it&#8217;s SDP offers, older versions of Firefox and other browsers would have rejected the SDP offer as invalid. So we contacted the Google Chrome folks, and they added support for parsing the new format into Chrome as well. Then the long waiting for Firefox ESR to be able to handle the new format started.<\/p>\n<h4>The change is coming<\/h4>\n<p>As Firefox ESR 60 now supports the new format we finally flipped the switch in Firefox 63 to start using the new data channel format in SDP offers. The SDP answer is always in the format of the offer, so old offer results in old answer, and new offer results in new answer.<\/p>\n<p>And while the SCTP SDP draft has evolved to version number 26, the SDP format in there hasn&#8217;t changed any more in the recent versions. As <a href=\"https:\/\/datatracker.ietf.org\/doc\/draft-ietf-mmusic-sctp-sdp\/\">the draft is now in the RFC editors queue<\/a> we can be pretty sure the new format is going to be final format used in WebRTC 1.0.<\/p>\n","protected":false},"excerpt":{"rendered":"All the browser with support for negotiating data channels via SDP are using the same format. But the format is based on a specification from 2013. Since the specification has changed a lot since then it&#8217;s time to update the implementations to meet the latest spec. Current status If you are negotiating a data channel [&hellip;]","protected":false},"author":1151,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[301110,301116,301115],"coauthors":[264764],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to avoid Data Channel breaking - Advancing WebRTC<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to avoid Data Channel breaking - Advancing WebRTC\" \/>\n<meta property=\"og:description\" content=\"All the browser with support for negotiating data channels via SDP are using the same format. But the format is based on a specification from 2013. Since the specification has changed a lot since then it&#8217;s time to update the implementations to meet the latest spec. Current status If you are negotiating a data channel [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/\" \/>\n<meta property=\"og:site_name\" content=\"Advancing WebRTC\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-02T22:41:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-01-31T19:47:47+00:00\" \/>\n<meta name=\"author\" content=\"Nils Ohlmeier\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@nilsohlmeier\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nils Ohlmeier\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/\",\"url\":\"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/\",\"name\":\"How to avoid Data Channel breaking - Advancing WebRTC\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#website\"},\"datePublished\":\"2018-07-02T22:41:20+00:00\",\"dateModified\":\"2019-01-31T19:47:47+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/76bbd261b8442faecc23b88127c82a9a\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/webrtc\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to avoid Data Channel breaking\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/webrtc\/\",\"name\":\"Advancing WebRTC\",\"description\":\"Committed to moving Firefox and WebRTC forward\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/webrtc\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/76bbd261b8442faecc23b88127c82a9a\",\"name\":\"Nils Ohlmeier\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/image\/bdf2a94f7762f770fb4d270f302e48ac\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/24cf57862ae4c7665f706d12c19b98e7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/24cf57862ae4c7665f706d12c19b98e7?s=96&d=mm&r=g\",\"caption\":\"Nils Ohlmeier\"},\"description\":\"Hacking on real time communications since 2002\",\"sameAs\":[\"https:\/\/x.com\/nilsohlmeier\"],\"url\":\"https:\/\/blog.mozilla.org\/webrtc\/author\/nohlmeiermozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to avoid Data Channel breaking - Advancing WebRTC","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/","og_locale":"en_US","og_type":"article","og_title":"How to avoid Data Channel breaking - Advancing WebRTC","og_description":"All the browser with support for negotiating data channels via SDP are using the same format. But the format is based on a specification from 2013. Since the specification has changed a lot since then it&#8217;s time to update the implementations to meet the latest spec. Current status If you are negotiating a data channel [&hellip;]","og_url":"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/","og_site_name":"Advancing WebRTC","article_published_time":"2018-07-02T22:41:20+00:00","article_modified_time":"2019-01-31T19:47:47+00:00","author":"Nils Ohlmeier","twitter_card":"summary_large_image","twitter_creator":"@nilsohlmeier","twitter_misc":{"Written by":"Nils Ohlmeier","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/","url":"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/","name":"How to avoid Data Channel breaking - Advancing WebRTC","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/#website"},"datePublished":"2018-07-02T22:41:20+00:00","dateModified":"2019-01-31T19:47:47+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/76bbd261b8442faecc23b88127c82a9a"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/webrtc\/how-to-avoid-data-channel-breaking\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/webrtc\/"},{"@type":"ListItem","position":2,"name":"How to avoid Data Channel breaking"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/webrtc\/#website","url":"https:\/\/blog.mozilla.org\/webrtc\/","name":"Advancing WebRTC","description":"Committed to moving Firefox and WebRTC forward","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/webrtc\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/76bbd261b8442faecc23b88127c82a9a","name":"Nils Ohlmeier","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/image\/bdf2a94f7762f770fb4d270f302e48ac","url":"https:\/\/secure.gravatar.com\/avatar\/24cf57862ae4c7665f706d12c19b98e7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/24cf57862ae4c7665f706d12c19b98e7?s=96&d=mm&r=g","caption":"Nils Ohlmeier"},"description":"Hacking on real time communications since 2002","sameAs":["https:\/\/x.com\/nilsohlmeier"],"url":"https:\/\/blog.mozilla.org\/webrtc\/author\/nohlmeiermozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/posts\/363"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/users\/1151"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/comments?post=363"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/posts\/363\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/media?parent=363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/categories?post=363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/tags?post=363"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/coauthors?post=363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}