Giter Club home page Giter Club logo

commonland's Introduction

commonland

The idea of this package: It provides a socket.io layer that allows synchronized group interaction on a given website (events, chat, but also text input) By this means one can think of collaborative writing / programming / website demonstrations.

Using it conventionally

If you want to use it by embedding the files, you have to add the following files from the lib and css folder. You should alco incorporate the img folder.

<link rel="stylesheet" type="text/css" href="css/commonplace.css">
<script src="https://cdn.socket.io/socket.io-1.2.1.js"></script>

<script src="lib/SocketClient.js"></script>
<script src="lib/commonplace.js">

Creating an instance looks like this, explained below.

    var params = {};
    params.url      = 'http://127.0.0.1:3333';
    params.room     = "admin";
    var c = new common.Layer("logo", params);

To make us you have to start the socket.io server, that you find in the sever foilder (see below)

Installation via npm

	npm install common-land

Server

To require the library, you write:

var common = require("node_modules/common-land/server/commonland_server.js");

To start an instance, you may pass an http server as an argument or leave the parameter empty. Then the socket.io Server will be started on port 3333

 var socket = new common.Server();   

Client

Client side, you create an index.js file that might look like this:

var $           = require("jquery");
var common      = require("common-land");



$(document).ready(function(){
    "use strict";
    var params = {};
    params.url      = 'http://127.0.0.1:3333';
    params.room     = "admin";
    var c = new common.Layer("logo", params);

 });
  • the params.url takes the url and port information where the server is running

  • the params.room create the room that holds your users

  • the first parameter of the object holds the dom element on which contains the elements that shall be shared, the second the server parameters

icons

  • Daouna Jong, collaboration
  • Stefano Vetere, chat
  • Hrag Chanchanian, exit
  • Rohit M. S., record
  • BaveBros, play

commonland's People

Contributors

phalanstere avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

planeshifter

commonland's Issues

clicking - stop proppagation

when clicking a nested element it's parents element gets clicked to.
It works when you click top-down, but when you click the child first, there is a problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.