koojv / quasar

video chatroom using meteor + webrtc + react + flux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

quasar

View the project at quasar.meteor.com

quasar is a real-time video chatroom application. The frontend is powered by React, Flux and WebRTC and the backend is powered by Meteor.

quasar has been tested on the following:

  • Chrome
  • Chrome for Android (Android 5+)
  • Firefox
  • OS X (Electron application)

Other browsers and operating systems may not support WebRTC.

Motivation

Quasar is intended to be a veritable open source solution for multi-user multi-platform video conferencing -- a product regular people can use and developers can modify and build into their own products.

It is also an example of how to create a WebRTC video chatroom and of how to integrate React and Flux in a Meteor app.

Installation

  1. Clone the project git clone https://github.com/srtucker22/quasar.git

  2. Go to the primary directory cd quasar

  3. Add a settings.json to the primary directory touch settings.json

  4. Add your personal settings for the following services included in quasar (or remove the ones you don't want)

     {
       "admins": [{
         "name": "Administrator",
         "email": "admin@example.com",
         "roles": ["admin"],
         "password": "ADMIN_PASSWORD"
       }],
       "google" : {
         "clientId" : "YOUR_CLIENT_ID",
         "clientSecret" : "YOUR_CLIENT_SECRET"
       },
       "kadira": {
         "appId": "YOUR_APP_ID",
         "appSecret": "YOUR_APP_SECRET
       },
       "public": {
         "analyticsSettings": {
           "Google Analytics": {"trackingId": "YOUR_TRACKING_ID"},
           "Segment.io" : {"apiKey": "YOUR_API_KEY"}
         },
         "google": {
           "browserKey": "YOUR_BROWSER_KEY"
         }
       }
       "electron": {
         "autoPackage": true,
         "builds": [{
           "platform": "darwin", "arch": "x64"
         },{
           "platform": "win32", "arch": "ia32"
         }],
         "downloadUrls": {
           "win32": "/public/downloads/win32/",
           "darwin": "/public/downloads/osx/quasar.zip"
         },
         "name": "quasar",
         "rootUrl": "https://quasar.meteor.com",
         "version": "0.0.1",
         "description": "Video Chatroom with Meteor + WebRTC + React + Flux",
         "height": 768,
         "width": 1024,
         "frame": true,
         "title-bar-style": "hidden",
         "resizable": true,
         "protocols": [{
           "name": "quasar",
           "schemes": ["quasar"]
         }]
       }
     }
    
  5. Run the app with the settings meteor --settings settings.json

Electron Notes:

quasar uses meteor-electron to easily transform into a downloadable desktop app and update as you develop. For settings.json configuration for this feature, please refer to the meteor-electron documentation.

meteor-electron has been modified to build a compressed version of the quasar desktop app at quasar/public/downloads/{platform}-{arch}/quasar.zip, which browser versions can reference for easy downloading. See download-button.component.jsx for how components reference this directory.

To run the Electron app pointing to localhost, exclude the rootUrl parameter from settings.json, otherwise the Electron app will point to https://quasar.meteor.com.

Application Design Overview

As mentioned previously, quasar is an example of how to create a WebRTC video chatroom and also of how to integrate React and Flux in a Meteor app.

Don't know React or Flux? No problem!

The best way to describe React is that it is a view layer only.

Flux is an architectural pattern that can be used with React to enable one-way data flows to a centralized application data store using an event system.

  • Your Views "Dispatch" "Actions"
  • Your "Store" Responds to Dispatched Events
  • Your Store Emits a "Change" Event
  • Your View Responds to the "Change" Event

Read these useful guides to get a quick overview:

The application folder structure logically reflects the flux architecture through folders such as actions and stores.

Routing is done with React Router

It's worth spending some time understanding how this router works before digging into the code. Check out routes.jsx for the main router code.

quasar uses Meteor Streams to power the WebRTC communication. [Note: Meteor Streams is now officially an inactive project]

The streams are handled by RTCStore in rtc.store.jsx on the frontend.

The streams are managed by roomStream in room.stream.jsx on the backend.

Contributing

This project welcomes code contributions, bug reports and feature requests.

Motivation

quasar is intended to be an example of how to create a WebRTC video chatroom and of how to integrate React and Flux in a Meteor app.

Resources

Upcoming

  • Create a Meteor iOS app that works with quasar on the web
  • Change the name of the project to make it more accessible for projected users (suggestions welcome)

TODO

  • local material icons
  • Enhance invite workflow
  • mobile -- you send an invite to a room to active users
    • if an invitee opens the app after a notification and the inviter is active, they will get a dialog asking to join the room and a notification in their quasar notification list for retrieval -- which shows 'join' cta until the users leave the room
    • if you invite non-users, they will go through auth flow and then directed to the room. if the room is empty, user will be directed to notifications list on mobile or homepage on desktop.
  • Implement a global namespace for appName (clarify meaning)
  • Add raix push notifications for cordova to enhance mobile support
  • Add TURN server support to make it more useful for real-world deployment
  • Package the application to make it easier to install

License

The MIT License

Copyright (c) 2016 Glipcode http://glipcode.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

video chatroom using meteor + webrtc + react + flux


Languages

Language:JavaScript 99.0%Language:HTML 0.8%Language:CSS 0.2%