GithubHelp home page GithubHelp logo

mobaudio's Introduction

mob-audio

A repo for AngelHack S14 #uWaterlooMasterRace

socket.io api

s→c heartbeat

Every 5 seconds: { timestamp: Date.now() } (milliseconds)

c→s list

{ id: (anything, even undefined), lat: (latitude float), lon: (latitude float), radius: (search radius in meters) } Requests a s→c list reply

s→c list

{
	id: (same as in c→s),
	mobs: [
		{
			name: (name string),
			time: (time string),
			mobId: (mobId integer),
			url: (media url),
			dist: (distance in m),
			lat: (gps latitude),
			lon: (gps longitude),
			count: (number of subscribers),
		},
		...
	],
}

c→s subscribe

Subscribe and trigger a s→c reply. You will get s→c play events. { mobId: (integer mob id), id: (anything) }

s→c subscribe

{ mobId: (integer mob id), id: (same as in c→s) } If mobId is -1, subscribe failed.

c→s unsubscribe

{ mobId: (integer mob id), id: (anything) }

s→c unsubscribe

{ mobId: (integer mob id), id: (same as in c→s) }

c→s create

Create a new mob. Trigger a s→c create. { url: (media url), name: (name string), time: (time string), lat: (latitude float), lon: (longitude float) }

s→c create

{ url: (media url), name: (name string), time: (time string), lat: (latitude float), lon: (longitude float), mobId: (mob id integer) }

c→s destroy

Destroy a mob. Trigger a s→c destroy. { mobId: (mob id integer) }

s→c destroy

{ mobId: (mob id integer) }

s→c count

Someone joined/left a subscribed mob. { mobId: (mob id integer), count: (new count integer) }

c→s play

Trigger a s→c play for all subscribers. { mobId: (mob id integer) } Mobs stay in existence.

s→c play

{ id: (same as in c→s), mobId: (mob id integer), timestamp: (server timestamp in millis, as in heartbeat, integer) } Mobs stay in existence.

mobaudio's People

Contributors

yingted avatar gabrielwong avatar xcharleslin avatar shamwow avatar

Watchers

James Cloos avatar Andy Zhang avatar  avatar  avatar  avatar

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.