Skip to content
An experimental state machine for the Google+ Hangout API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Google+ Hangout API State Machine

This code is provided as-is with no warranty, expressed or implied. Use at your own risk. See the LICENSE file for information on the LGPL license.

This project was created to fill a gap in the Google+ Hangout API when it comes to managing shared state across multiple clients that may join or drop out of a running app in a hangout. The provided class, kungfuters.StateMachinePlus, attempts to manage local state when updates to the shared state occur.

There are a few things you'll need to do to use kungfuters.StateMachinePlus:

1) Instantiate the class with a custom setup() method that includes your transition definitions:

	var stateMachine = new kungfuters.StateMachinePlus({
		setup: function() {
			this.addTransition("phase1", "phase2");
			this.addTransition("phase2", "phase3");

2) Call the begin() method with your first phase:


3) Define your phase methods, which by default look like _phase_yourPhaseName():
	function _phase_phase1() {
	function _phase_phase2() {

4) Also, if you want to scope your methods, just pass a "scope" parameter to the kungfuters.StateMachinePlus() constructor:

	new kungfuters.StateMachinePlus({
		scope: someObject

I'll be posting updates about this on Google+, and in case you have questions, just circle me.

Find me at

(Also get your own Google+ vanity URL and RSS Feed at
You can’t perform that action at this time.