All Projects → TomasHubelbauer → Webrtc Data Channel Demo

TomasHubelbauer / Webrtc Data Channel Demo

WebRTC Data Channel demo

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Webrtc Data Channel Demo

Translator
Translator.js is a JavaScript library built top on Google Speech-Recognition & Translation API to transcript and translate voice and text. It supports many locales and brings globalization in WebRTC! https://www.webrtc-experiment.com/Translator/
Stars: ✭ 103 (-11.21%)
Mutual labels:  webrtc, webrtc-demos
Ice
A Go implementation of ICE
Stars: ✭ 114 (-1.72%)
Mutual labels:  webrtc, ice
Detectrtc
DetectRTC is a tiny JavaScript library that can be used to detect WebRTC features e.g. system having speakers, microphone or webcam, screen capturing is supported, number of audio/video devices etc. https://www.webrtc-experiment.com/DetectRTC/
Stars: ✭ 509 (+338.79%)
Mutual labels:  webrtc, webrtc-demos
Ice4j
A Java implementation of the ICE protocol
Stars: ✭ 332 (+186.21%)
Mutual labels:  webrtc, ice
Webrtc Demo
webrtc 演示示例
Stars: ✭ 74 (-36.21%)
Mutual labels:  webrtc, webrtc-demos
Re
Generic library for real-time communications with async IO support
Stars: ✭ 444 (+282.76%)
Mutual labels:  webrtc, ice
Webrtc android
webrtc VideoCall VideoConference 视频通话 视频会议
Stars: ✭ 764 (+558.62%)
Mutual labels:  webrtc, webrtc-demos
foxrtc
media sdk based on webrtc
Stars: ✭ 36 (-68.97%)
Mutual labels:  webrtc, webrtc-demos
Analysisavp
音视频学习,相关文件格式/协议分析。h264 nalu aac adts flv
Stars: ✭ 38 (-67.24%)
Mutual labels:  webrtc, webrtc-demos
Webrtc
A pure Rust implementation of WebRTC API
Stars: ✭ 922 (+694.83%)
Mutual labels:  webrtc, ice
Starrtc Web Demo
一对一voip视频聊天,直播连麦,多人视频会议,在线会议web演示:
Stars: ✭ 281 (+142.24%)
Mutual labels:  webrtc, webrtc-demos
Learning Webrtc
Codes and notes while learning webrtc
Stars: ✭ 98 (-15.52%)
Mutual labels:  webrtc, webrtc-demos
webrtc-hotwire-rails
A video chat app demonstration using Hotwire and Ruby on Rails
Stars: ✭ 38 (-67.24%)
Mutual labels:  webrtc, webrtc-demos
Sipsorcery
A WebRTC, SIP and VoIP library for C# and .NET Core. Designed for real-time communications apps.
Stars: ✭ 449 (+287.07%)
Mutual labels:  webrtc, ice
singo
Simple WebRTC Signaling Server written in Go
Stars: ✭ 57 (-50.86%)
Mutual labels:  webrtc, webrtc-demos
Webrtc
A reference gradle project that let you explore WebRTC Android in Android Studio.
Stars: ✭ 562 (+384.48%)
Mutual labels:  webrtc, webrtc-demos
Webrtcchat
🔏 Pure Browser To Browser Chat (STUN & ICE Servers optional)
Stars: ✭ 230 (+98.28%)
Mutual labels:  webrtc, webrtc-demos
WebRTC-Python-Open-Source-Application-for-1-to-1-video-chat
This Sample Python Application demonstrates the use of EnableX Platform Server APIs and JavaScript Toolkit to develop basic one to one video chat application. It allows developers to ramp up on app development by hosting on their own devices.
Stars: ✭ 12 (-89.66%)
Mutual labels:  webrtc, webrtc-demos
Webrtc Text Chat Tutorial
WebRTC Chat Tutorial for Scaledrone Realtime Messaging Service
Stars: ✭ 24 (-79.31%)
Mutual labels:  webrtc, webrtc-demos
Ice
WIP RFC 8445 ICE implementation in go
Stars: ✭ 95 (-18.1%)
Mutual labels:  webrtc, ice

WebRTC Data Channels Example

A simple example of WebRTC Data Channels. Uses postMessage() as a substitute for a real signalling channel.

I've made this because I was frustrated with the lack of good WebRTC data channel examples and tutorials online.

The code should be self-explanatory when following MDN on the side. There is only one gotcha and it is documented/commented. Following the Console messages in Developer Tools should make it clear what happens and when.

Offerer-answerer Mode

Demo on Bloggo

  • Unix: open offerer-answerer/index.html
  • Windows: start offerer-answerer/index.html
  • Chrome Test: ./cmd/chrome-screenshot/cmd.sh offerer-answerer
  • Firefox Test: ./cmd/firefox-screenshot/cmd.sh offerer-answerer

In this demo, there are two separate files for offerer and answerer so that who does what when establishing a connection is clearly separated.

Google Chrome screenshot of this demo

Google Chrome Console output from this demo

Native to Web Mode

  • Native application is offerer, web application is answerer
  • Native application is answerer, web application is offerer

See more

Peer Mode

Demo

  • Unix: open peer/index.html
  • Windows: start peer/index.html
  • Chrome Test: ./cmd/chrome-screenshot/cmd.sh peer
  • Firefox Test: ./cmd/firefox-screenshot/cmd.sh peer

In this demo, each peer is capable of being either an offerer or an answerer. The flows for both are intertwined. Less clear but more real-life.

Google Chrome screenshot of this demo

Google Chrome Console output from this demo

Support

This example is written using latest JavaScript features available in:

  • Chrome 63+
  • Firefox 58+

It does not use anything else and runs off the file protocol.

Scripts

Chrome screenshot capture:

  • ./cmd/chrome-screenshot/cmd.sh peer
  • ./cmd/chrome-screenshot/cmd.sh offerer-answerer

Firefox screenshot capture (in development):

  • ./cmd/firefox-screenshot/cmd.sh peer
  • ./cmd/firefox-screenshot/cmd.sh offerer-answerer

Contributing

Please review the codebase and do not hesitate to open an issue or a PR with questions or proposed changes. PRs in the spirit of this excercise will be merged, PRs adding fluff that has no direct impact on understanding the data channels flow (like adding alternative signalling channel mechanism which work the same way the current one does, adding bundlers etc.) will be respectfully declined.

To-Do

Fix nvm: command not found in cmd/chrome-screenshot/cmd.sh and cmd/firefox-screenshot/cmd.sh

Finalize Firefox headless automation for generating screenshots and console logs using Selenium WebDriver

Contribute a demo where peer connections are keyed by peer name and one peer can hold multiple ones or a group chat

Extend the/contribute a new example to cover media session establishment on top of the data one

Consider adding another demo where the signaling channel is a service worker connecting two tabs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].