Holla

// Sending a call
var rtc = holla.connect();
rtc.register("tom", function(worked) {
  holla.createFullStream(function(err, stream) {

    var call = rtc.call("bob");
    call.addStream(stream);
    holla.pipe(stream, $("#myVideo"));

    call.on("answered", function() {
      console.log("Remote user answered the call");
    });

    console.log("Calling ", call.user);
  });
});
// Receiving a call
var rtc = holla.connect();
rtc.register("bob", function(worked) {
  rtc.on("call", function(call) {
    console.log("Inbound call from ", call.user);

    holla.createFullStream(function(err, stream) {

      call.addStream(stream);
      call.answer();
      holla.pipe(stream, $("#myVideo"));

      call.ready(function(stream) {
        holla.pipe(stream, $("#theirVideo"));
      });

    });

  });
});

An abstraction over P2P video/voice/data connections using WebRTC

Holla – P2P video/voice/data →

Published by Bramus!

Bramus is a Freelance Web Developer from Belgium. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.