{"id":13623412,"url":"https://github.com/TomasHubelbauer/webrtc-data-channel-demo","last_synced_at":"2025-04-15T14:32:55.385Z","repository":{"id":53177327,"uuid":"98450573","full_name":"TomasHubelbauer/webrtc-data-channel-demo","owner":"TomasHubelbauer","description":"WebRTC Data Channel demo","archived":false,"fork":false,"pushed_at":"2022-04-28T17:52:58.000Z","size":251,"stargazers_count":125,"open_issues_count":0,"forks_count":6,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-06T02:07:06.753Z","etag":null,"topics":["data-channel","data-channels","ice","webrtc","webrtc-demos"],"latest_commit_sha":null,"homepage":"https://tomashubelbauer.github.io/webrtc-data-channel-demo","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomasHubelbauer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-26T17:50:56.000Z","updated_at":"2024-05-09T13:19:41.000Z","dependencies_parsed_at":"2022-09-08T21:11:36.120Z","dependency_job_id":null,"html_url":"https://github.com/TomasHubelbauer/webrtc-data-channel-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fwebrtc-data-channel-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fwebrtc-data-channel-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fwebrtc-data-channel-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fwebrtc-data-channel-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomasHubelbauer","download_url":"https://codeload.github.com/TomasHubelbauer/webrtc-data-channel-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249089063,"owners_count":21210911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-channel","data-channels","ice","webrtc","webrtc-demos"],"created_at":"2024-08-01T21:01:31.523Z","updated_at":"2025-04-15T14:32:55.109Z","avatar_url":"https://github.com/TomasHubelbauer.png","language":"JavaScript","funding_links":[],"categories":["Samples","JavaScript"],"sub_categories":[],"readme":"# WebRTC Data Channel Demo ![](https://github.com/TomasHubelbauer/webrtc-data-channel-demo/actions/workflows/pages/pages-build-deployment/badge.svg)\r\n\r\n[`postMessage`]: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage\r\n\r\nA demo of WebRTC Data Channel using [`postMessage`] for a signalling channel.\r\n\r\nI made this because I was frustrated with the lack of good WebRTC data channel\r\nexamples and tutorials online. Most use the JavaScript context of the browser\r\ntab as a signalling channel which I did not like.\r\n\r\nI have implemented two modes of work explained below.\r\n\r\n## [Offerer-Answerer](https://tomashubelbauer.github.io/webrtc-data-channel-demo/offerer-answerer)\r\n\r\n![](offerer-answerer/screenshot.png)\r\n\r\nIn this demo, the offerer and answerer roles and implemented in separate files.\r\nThis means the implementation is not versatile, but it is much easier to follow.\r\n\r\n## [Peer](https://tomashubelbauer.github.io/webrtc-data-channel-demo/peer)\r\n\r\n![](peer/screenshot.png)\r\n\r\nIn this demo, each peer is capable of being either an offerer or an answerer.\r\nThe flows for both are intertwined. Less clear but more real-life.\r\n\r\n## To-Do\r\n\r\n### Contribute a demo where peer connections are keyed by peer name\r\n\r\nThis will enable one peer can hold multiple connections in a group chat.\r\n\r\n### Make another demo a service worker signaling channel between two tabs\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomasHubelbauer%2Fwebrtc-data-channel-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTomasHubelbauer%2Fwebrtc-data-channel-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomasHubelbauer%2Fwebrtc-data-channel-demo/lists"}