diff --git a/.env b/.env index 32164cc..bb783f6 100644 --- a/.env +++ b/.env @@ -1,4 +1,9 @@ - # Required for all uses +# It takes like 2 mins to get a free twilio account https://www.twilio.com/login + TWILIO_ACCOUNT_SID=ACfc9705a2b725a7a314995eb8635a9079 TWILIO_AUTH_TOKEN=9ab36b8ac190d20687aff0561749dbc1 + +# Example data of how yours should look, these are NOT real credentials +# TWILIO_ACCOUNT_SID=ACfc9705a2b725a7a314995eb8635a1234 +# TWILIO_AUTH_TOKEN=9ab36b8ac190d20687aff0561234dbc1 diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..0319726 --- /dev/null +++ b/.env.template @@ -0,0 +1,9 @@ +# Required for all uses +# It takes like 2 mins to get a free twilio account https://www.twilio.com/login + +TWILIO_ACCOUNT_SID=YourAccountSID +TWILIO_AUTH_TOKEN=YourAccountAuthToken + +# Example data of how yours should look, these are NOT real credentials +# TWILIO_ACCOUNT_SID=ACfc1205a2b725a7a314995eb8635a1234 +# TWILIO_AUTH_TOKEN=9ab12b8ac190d20687aff0561234dbc1 diff --git a/.gitignore b/.gitignore index 281707e..25dfad1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ .DS_Store -/.idea \ No newline at end of file +/.idea +.env \ No newline at end of file diff --git a/README.md b/README.md index 98c20e2..0701f80 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,36 @@ -# Video Chat -A simple video chat between two clients as an example of how to connect two browsers via WebRTC using Twilio STUN/TURN infrastructure. -Read the blog post to see how to build this: [Getting Started with WebRTC using Node.js, Socket.io and Twilio’s NAT Traversal Service](https://www.twilio.com/blog/2014/12/set-phasers-to-stunturn-getting-started-with-webrtc-using-node-js-socket-io-and-twilios-nat-traversal-service.html). + +# Decentralized Video Chat +[](https://ianramzy.com) + +[](https://paypal.me/ianramzy) + +[](https://github.com/ianramzy/decentralized-video-chat) +# → https://neonchat.io + +Decentralized video chat platform powered by WebRTC using Twilio STUN/TURN infrastructure. # Quick start * Clone this repo ``` -git clone https://github.com/philnash/video-chat.git -cd video-chat +git clone https://github.com/ianramzy/decentralized-video-chat +cd decentralized-video-chat ``` * Install dependencies ``` npm install ``` -* Create a `.env` file copying `.env.template`. Fill in your `Account SID` and `Auth Token` from your [Twilio console](https://www.twilio.com/console) +* Create a `.env` file copying `.env.template` (You copy the file using the command below). +* Fill in your `Account SID` and `Auth Token` from your [Twilio console](https://www.twilio.com/console) +It takes 2 minutes to sign up for a free account. +``` +cp .env.template .env +``` * Start the server ``` npm start ``` -* Open two browsers on your laptop and point them `localhost:3000`. If you want to use a client on another computer/mobile, make sure you publish your server on an HTTPS connection (otherwise the camera may not work). You can use a service like [ngrok](https://ngrok.com/) for that. -* Click on the "Get Video" button on both browsers -* Click on button "Call" on one of the browser, to establish the video call +* Open two browsers on your laptop and point them `localhost:3000`. +* If you want to use a client on another computer, make sure you publish your server on an HTTPS connection. + You can use a service like [ngrok](https://ngrok.com/) for that. \ No newline at end of file diff --git a/public/reference/additional.html b/public/reference/additional.html index a081b6e..425e0c5 100755 --- a/public/reference/additional.html +++ b/public/reference/additional.html @@ -5,7 +5,7 @@