zombese

WebRTC browser extension for Zombie.js.

Usage no npm install needed!

<script type="module">
  import zombese from 'https://cdn.skypack.dev/zombese';
</script>

README

zombese Build Status

A WebRTC extension for Zombie.js.

Zombese is only intended to cover the happy path for setting up a WebRTC connection between two clients running in Zombie.js. Because of this, only orchestration-related parts of the WebRTC API are implemented. Things like the MediaStream API are not implemented.

Zombese Dialects

Zombese can be spoken in different dialects. The currently supported dialects of zombese are:

  • Firefox (Firefox WebRTC API)

The dialects are exposed in the zombese.dialects object:

{
  default : FirefoxZombeseDialect,
  firefox : FirefoxZombeseDialect
}

Extending the Browser API

zombie provides an extension API that allows all new Browser objects to be augmented with additional functionality. Using this approach, zombese will create a mocked WebRTC API in all new windows / tabs.

Without a dialect:

    var Browser = require("zombie");
    var zombese = require("zombese");
    var browser;
    
    Browser.extend(zombese());  // uses the default dialect
    browser = new Browser();

With a dialect:

    var Browser = require("zombie");
    var zombese = require("zombese");
    var browser;
    
    Browser.extend(zombese(zombese.dialects.firefox));  // uses the firefox dialect
    browser = new Browser();

The zombese function has the following parameters:

  • dialect: The dialect to use when teaching a Browser zombese
    • optional
    • default: zombese.dialects.default

License

MIT License