You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
9 years ago | |
|---|---|---|
| css | 9 years ago | |
| img | 9 years ago | |
| js | 9 years ago | |
| media | 9 years ago | |
| nbproject | 9 years ago | |
| ws | 9 years ago | |
| .gitattributes | 9 years ago | |
| .gitignore | 9 years ago | |
| README.md | 9 years ago | |
| comm.html | 9 years ago | |
| index.html | 9 years ago | |
| ratchet_as_a_service.txt | 9 years ago | |
README.md
WebRTC and Ratchet Chat Application
A one-to-one text, audio and video chat application built with webRTC and Ratchet.
Requirements
- PHP >= 5.4
- Every other required files are included or referenced as the case may be
Getting Started
To test this app on your local server:
- The Ratchet server must be ON. This can be achived by navigating to webrtc-ratchet-chat-app/ws/bin from your cli and run php server.php
- Run the app from your browser at:
http://localhost/webrtc-ratchet-chat-app/ - Create and enter a room
- Enter the room from two different browsers (using the same link) and test by sending text chats. This can be done on the same device.
- The audio and video call is best tested on two different devices. This will require more configuration
- Open
webrtc-ratchet-chat-app/js/comm.jsand change this lineconst wsChat = new WebSocket("ws://localhost:8080/comm");toconst wsChat = new WebSocket("ws://YOUR_SERVER_IP:8080/comm"); - Open
webrtc-ratchet-chat-app/ws/bin/server.phpand add your serverip addressto$allowed_originsarray, then replace thelocalhostin$app = new Ratchet\App('localhost', 8080, '0.0.0.0');with yourip address - Blam! Good to go. Navigate to
YOUR_IP_ADDRESS/webrtc-ratchet-chat-appon your browser on two different devices to start chatting - Works best on Chrome, Firefox and the latest versions of Opera desktop browser.
#Note To host this online, you'll need to set a few things up:
- Create Ratchet as a service so it can run persistently on your server. Check the file ratchet_as_a_service.txt for the guide on how to do this on CentOS7
- If on SSL, Ratchet won't work unless you make some changes on your server. This answer on Stack Overflow should be helpful.