The Symple video chat demo is an example of how to use the Symple protocol and libraries for instant messaging and WebRTC signaling. External projects used are AngularJS, Bootstrap, Node.js and Express. You're welcome to fork this repository and hack it to your hearts content.
Symple is a unrestrictive real-time messaging and presence protocol.
The protocol itself is semantically similar to XMPP, except that it is much more flexible and economical due to the use of JSON instead of XML for encoding messages.
Symple currently has client implementations in JavaScript, Ruby and C++, which make it ideal for a wide range of messaging requirements, such as building real-time games and applications which run in the web browser, desktop, and mobile phone.
- Clone the
symple-server
repository and fire up the Node.js servernode server
. The server should be running on port 4500 and anonymous logins should be enabled since authentication is not implemented in our demo. Seeconfig.json
in the server foot folder for config options. - Clone the
symple-client-webrtc-demo
repository, and run the express servernode app
. - Open
http://localhost:4500
in your browser and play!
Some key options are specified in the main HTML file located at views/index.ejs
CLIENT_OPTIONS This is the options hash for the Symple client and Socket.IO. This is where you specify the server URL and Peer object. Note that we have disabled 'websocket' transport by default, but you will probably want to re-enable it in production.
WEBRTC_CONFIG This is the PeerConnection options hash. In production you will want to specify some TURN servers so as to ensure the p2p connection succeeds in all network topologies.
Other than that all relevant JavaScript is located in public/js/app.js
and public/js/helpers.js
. Enjoy!
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Store last 50 messages via json - store via server using a group cache options or flat file?. 2 Gruntfile for compressing scripts.
- Sync with twitter API to get user info and profile photo for handles.
There is a blog post about this demo here: http://sourcey.com/symple-webrtc-video-chat-demo
For more information please check out the Symple homepage: http://sourcey.com/symple/
If you have a bug or an issue then please use our new Github issue tracker: https://github.com/sourcey/symple-client-webrtc-demo/issues