{"id":9456,"date":"2020-10-06T14:48:21","date_gmt":"2020-10-06T18:48:21","guid":{"rendered":"https:\/\/g33kinfo.com\/info\/?p=9456"},"modified":"2020-10-06T14:48:21","modified_gmt":"2020-10-06T18:48:21","slug":"github-screego-server-screen-sharing-for-developers","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/","title":{"rendered":"GitHub &#8211; screego\/server: screen sharing for developers"},"content":{"rendered":"<div class=\"github-embed github-embed-repository github-logo-mark\">\n<p>        <a href=\"https:\/\/github.com\/screego\/server\" target=\"_blank\">\t\t\t<strong>\t\t\t\tscreen sharing for developers https:\/\/screego.net\/\t\t\t<\/strong>\t\t<\/a>\t\t<br \/>        <a href=\"https:\/\/github.com\/screego\/server\" target=\"_blank\">https:\/\/github.com\/screego\/server<\/a><br \/>        <a href=\"https:\/\/github.com\/screego\/server\/network\" target=\"_blank\">742<\/a> forks.<br \/>        <a href=\"https:\/\/github.com\/screego\/server\/stargazers\" target=\"_blank\">10,735<\/a> stars.<br \/>        <a href=\"https:\/\/github.com\/screego\/server\/issues\" target=\"_blank\">18<\/a> open issues.        <\/p>\n<details open>\n<summary>Recent commits:<\/summary>\n<ul class=\"github_commits\">\n<li class=\"github_commit\">                        <a href=\"https:\/\/github.com\/screego\/server\/commit\/4ae5f443190be0ffa192a950531cf0aef646162b\" target=\"_blank\">Merge pull request #254 from LandmineHQ\/fix\/room-id-url-encodingfix(ui): decode room id from URL and encode it when writing back<\/a>, GitHub                    <\/li>\n<li class=\"github_commit\">                        <a href=\"https:\/\/github.com\/screego\/server\/commit\/fc9890235d1deb409e4af914570b4f1fa2b662ad\" target=\"_blank\">fix(ui): decode room id from URL and encode it when writing backThe room id was read from the query string with a hand-rolled parser thatnever decoded it, while the id was written back into the URL without anyencoding:    getFromURL = (key, search) =&gt;        search.slice(1).split(&#039;&amp;&#039;)            .find((param) =&gt; param.startsWith(`${key}=`))?.split(&#039;=&#039;)[1];    window.history.pushState({roomId: id}, &#039;&#039;, id ? `?room=${id}` : &#039;?&#039;);Browsers percent-encode non-ASCII characters when a URL is serialized, so aroom named &quot;\u4e0d\u8f9e&quot; is shared as `?room=%E4%B8%8D%E8%BE%9E`, but the client thenjoins the literal `%E4%B8%8D%E8%BE%9E` room, which does not exist:    -&gt; {&quot;type&quot;:&quot;join&quot;,&quot;payload&quot;:{&quot;id&quot;:&quot;%E4%B8%8D%E8%BE%9E&quot;}}    &lt;- close 1000 &quot;room with id %E4%B8%8D%E8%BE%9E does not exist&quot;The same asymmetry also broke ids containing `&amp;`, `=`, `+`, `#` or `%`, andmade ids that already contain percent escapes gain another encoding level onevery write, producing broken (double encoded) share links.Use the platform URL API, which decodes on read and encodes on write exactlyonce:    new URLSearchParams(search).get(key) ?? undefined    const params = new URLSearchParams();    params.set(&#039;room&#039;, id);    window.history.pushState({roomId: id}, &#039;&#039;, `?${params.toString()}`);No server change is needed: the room id stays the raw, human-readable stringthat the ws `create`\/`join` payload and the server-side room map already use,and existing share links keep working.Verified: URL round-trip for \u4e0d\u8f9e \/ &quot;my room&quot; \/ &quot;a+b&quot; \/ &quot;a&amp;b=c&quot; \/ &quot;100%&quot;,protocol-level e2e against a live server (encoded id -&gt; &quot;does not exist&quot;,decoded id -&gt; joins, cleanup on owner leave), `yarn build` (tsc + vite) and`prettier &#8211;check src\/useRoomID.ts`.<\/a>, landmineHQ                    <\/li>\n<li class=\"github_commit\">                        <a href=\"https:\/\/github.com\/screego\/server\/commit\/7dec440304e6d2704e7732d6284d6231fc0c8f6a\" target=\"_blank\">Merge pull request #250 from swindi-dev\/fix\/transient-disconnectedfix: don&#039;t close peer connection on transient &#039;disconnected&#039; state<\/a>, GitHub                    <\/li>\n<li class=\"github_commit\">                        <a href=\"https:\/\/github.com\/screego\/server\/commit\/9f87229a8f9dc7bc91178a0e9ebd58409410ef26\" target=\"_blank\">fix: don&#039;t close peer connection on transient &#039;disconnected&#039; stateBoth connectionstatechange handlers treated &#039;disconnected&#039; the same as&#039;closed&#039; and &#039;failed&#039; and immediately called peer.close().Per the WebRTC spec, &#039;disconnected&#039; only means that ICE connectivity checksare currently failing. The connection frequently recovers on its own &#8212; briefnetwork hiccups, Wi-Fi roaming between access points, or NAT rebinding alltrigger it. Calling close() makes that recovery impossible, because a closedRTCPeerConnection cannot be reopened.The result was that a short network glitch permanently killed the stream andthe viewer had to reload the page. Leaving &#039;disconnected&#039; unhandled lets thebrowser&#039;s own ICE recovery do its job.Refs #53<\/a>, Jannis Mattheis                    <\/li>\n<li class=\"github_commit\">                        <a href=\"https:\/\/github.com\/screego\/server\/commit\/eab15068a1cddba5ca9f25ba4fdd1f46c45f0018\" target=\"_blank\">fix: remove badges<\/a>, Jannis Mattheis                    <\/li>\n<\/ul>\n<\/details>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":8835,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-9456","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>GitHub - screego\/server: screen sharing for developers - Linux Shtuff<\/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:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GitHub - screego\/server: screen sharing for developers - Linux Shtuff\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-06T18:48:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2020\/03\/Minion_Research.sm_-e1584713481775.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"35\" \/>\n\t<meta property=\"og:image:height\" content=\"44\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"GitHub &#8211; screego\\\/server: screen sharing for developers\",\"datePublished\":\"2020-10-06T18:48:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/\"},\"wordCount\":15,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"image\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Minion_Research.sm_-e1584713481775.jpg\",\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/\",\"name\":\"GitHub - screego\\\/server: screen sharing for developers - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Minion_Research.sm_-e1584713481775.jpg\",\"datePublished\":\"2020-10-06T18:48:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/#primaryimage\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Minion_Research.sm_-e1584713481775.jpg\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Minion_Research.sm_-e1584713481775.jpg\",\"width\":35,\"height\":44,\"caption\":\"Minion_Research.sm\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/github-screego-server-screen-sharing-for-developers\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GitHub &#8211; screego\\\/server: screen sharing for developers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GitHub - screego\/server: screen sharing for developers - Linux Shtuff","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:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/","og_locale":"en_US","og_type":"article","og_title":"GitHub - screego\/server: screen sharing for developers - Linux Shtuff","og_url":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2020-10-06T18:48:21+00:00","og_image":[{"width":35,"height":44,"url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2020\/03\/Minion_Research.sm_-e1584713481775.jpg","type":"image\/jpeg"}],"author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"GitHub &#8211; screego\/server: screen sharing for developers","datePublished":"2020-10-06T18:48:21+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/"},"wordCount":15,"commentCount":0,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"image":{"@id":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/#primaryimage"},"thumbnailUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2020\/03\/Minion_Research.sm_-e1584713481775.jpg","articleSection":["General Info"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/","url":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/","name":"GitHub - screego\/server: screen sharing for developers - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"primaryImageOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/#primaryimage"},"image":{"@id":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/#primaryimage"},"thumbnailUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2020\/03\/Minion_Research.sm_-e1584713481775.jpg","datePublished":"2020-10-06T18:48:21+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/#primaryimage","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2020\/03\/Minion_Research.sm_-e1584713481775.jpg","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2020\/03\/Minion_Research.sm_-e1584713481775.jpg","width":35,"height":44,"caption":"Minion_Research.sm"},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/github-screego-server-screen-sharing-for-developers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"GitHub &#8211; screego\/server: screen sharing for developers"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/9456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=9456"}],"version-history":[{"count":1,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/9456\/revisions"}],"predecessor-version":[{"id":9458,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/9456\/revisions\/9458"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media\/8835"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=9456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=9456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=9456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}