Skip to content

Instantly share code, notes, and snippets.

body: InvitationMessageBody
agenda: "agenda"
hosting: Identity
offeredConnectionDescription: RTCSessionDescription
subject: "NoSubject"
__proto__: InvitationMessageBody
contextId: undefined
from: Identity
credentials: Object
idp: undefined
{
"_id" : "15db8841-7c50-4498-9e8a-db35fad42dd5",
"admin" : "sam",
"authorised_presence" : [
{ "name" : "Oxsav" },
{ "name" : "teste" },
{ "name" : "susana" },
{ "name" : "susana" },
{ "name" : "Oxsav" }
],
//well I'm doing a presence service with vert.x so I need to verify who are on my friend's list
//then I will have to list all of them in the client in a list
//to do that I will need to contact my mongodb and need to know who is on my friends list and his state presence
//ONCLIENT
//this is my request to the module on the server from the client.
eb.send(address, {
"action": "update",
"sessionId": mySession,
"username": username,
@oxsav
oxsav / gist:5813010
Created June 19, 2013 09:31
Test RTCMultiConnection-v1.3
var SIGNALING_SERVER = ':8888/';
var extra = {
openSignalingChannel: function(config) {
console.log(config);
var channel = config.channel || this.channel || 'one-to-one-video-chat';
var sender = Math.round(Math.random() * 60535) + 5000;
io.connect(SIGNALING_SERVER, {secure: true}).emit('newchannel', {
channel: channel,
@oxsav
oxsav / gist:5635084
Last active December 17, 2015 15:59
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Socket.io tests</title>
that.listStatePresences = ko.observableArray([]);
getPresenca = function(){
eb.send("get.presence", {
"action": "get",
},
function(reply) {
console.log(reply);
if(reply.status=='ok')
this.listPresences(reply.reply);
else
@oxsav
oxsav / gist:5272507
Last active December 15, 2015 14:09
import org.vertx.java.platform.Verticle;
import org.vertx.java.busmods.BusModBase;
import org.vertx.java.core.Handler;
import org.vertx.java.core.eventbus.Message;
import org.vertx.java.core.json.JsonArray;
import org.vertx.java.core.json.JsonObject;
public class Presence extends BusModBase implements Handler<Message<JsonObject>> {
protected String address;