Build Your Own Collaboration Solution

The goal of education is not to increase the amount of knowledge but to create the possibilities for a child to invent and discover, to create men (and women) who are capable of doing new things.

Jean Piaget

Note:  I continually update and enhance the software for the Basic Spaces application and the screenshots in this article may not reflect its current state.  I will, however, keep the GitHub repository up-to-date.

Who says that you can’t be in two places at the same time?  Although the physical me couldn’t attend Avaya Engage this year, remote me was in Orlando from early Saturday morning until the conference wound down Wednesday afternoon.  In fact, as a mentor for the Engage TADHack, I spent virtual time with developers all around the world.

The central message of Engage was composability and that was apparent everywhere you looked.  Cloud was king and connecting disparate services together to create new and powerful solutions was the name of the game.  You not only saw that on the main stage, it was all over the tradeshow floor from both Avaya and our partners.

If you were there in person, I hope you stopped by the Avaya booth to see some of the fruits of my composability labor.  My software was at the heart of the Beyond Realty, HR, and Spaces/Salesforce integration demonstrations.  Additionally, last year I worked closely with the ToolWire folks and wouldn’t be surprised if some of my handiwork was still part of Spaces Learning.   Not being there to help with customer demonstrations was a difficult burden to bear, but from all that I heard, everything ran flawlessly.

IMG_9892

IMG_9900

Avaya Engage photos courtesy of Kristine Konrad

TADHack

As soon as I was informed that I would be a mentor for the TADHack hackathon, I searched for ways to make the hackers as productive as possible.  I had already created a slew of training videos, I but wanted to provide an even bigger leg up.  This led me to develop nine Spaces integrations applications that demonstrated everything from direct messages between two Spaces users to a nearly full-blown imitation of the actual Spaces web application.  I placed them all in a GitHub repository and started evangelizing the heck out of it.

All that work paid off and I was pleased to see my code reflected in many of the winning entries.  In fact, in one application, I actually saw pieces of one of my user interfaces.  I felt like a proud father witnessing the birth of his new child.  Or in this case, children.

Build Your Own Spaces Solution

The GitHub repository for all my applications can be found here.  The README file gives you the gist of the contents and I whipped up a few videos to explain some of the solutions.

You will notice quite a few commits that occurred throughout the TADHack and continue through to today.  That’s because I am treating this as a living document and plan on updating software as I come up with new ideas.  Of course, there were (and most likely still are) several bugs and I tried to fix them as quickly as possible.

Today, I would like to focus on the biggest and most useful application in the repository – an imitation of the Spaces web application.  While it’s nowhere as pretty as Spaces proper, the goal was not to impress people with my HTML design skills (or lack thereof).  The user interface is bare boned and more instructional than attractive.  Still, it gets the job done.

The web application is found in index.html.  It uses files found in the directories /images, /css, and /js.  Within /js is /lib.  The files in /lib constitute the Avaya Client SDK which is used to create and tear down collaboration calls.

The bulk of the interesting code is found in js/conf.js.  There you will find JavaScript to create an anonymous Spaces user, join a room, launch and teardown video collaboration, start and stop screenshare, start and stop recording, send and receive chats, switch media devices, and mute/unmute audio and video.   The software uses the Spaces REST API, the Spaces websocket interface, and the Avaya Client SDK.  Spaces is built on the Avaya MPaaS, but other than passing an MPaaS token to the Client SDK, MPaaS hidden from the programmer.

With a few exceptions, you can exercise all this functionality by simply downloading the files to your PC and double clicking on index.html.  Some of the more complicated functionality requires that the application be run inside an https container.  One of the hackers found success running the application from Visual Studio.

As I said, the user interface is very simple and when launched looks like this:

spaces1To connect to a space, enter a room number (you can find that in a room’s URL while using the Spaces web application — I explain that in one or more of the GitHub videos), a name, and click on the telephone receiver icon.  Enter a password if the room is password protected.

spaces2

This brings you into the room with audio and video.  In this example, I also entered the same room with my iPhone Spaces app.

spaces5Once inside a room, you can play with mute, unmute, chat, screenshare, device selection, and meeting recording.  Note that screenshare and device selection are only available if the application is running in an https container.  Personally, I run the application on my Linux Server using an Apache web server.

Click on the floating button in the lower right corner to bring up device selection. This allows you to change to any microphone, speaker, or camera on your PC.

spaces5

The application supports starting and stopping a screenshare.  If you launch a screenshare, the contents overwrite the top video window.  When you accept a screen share, it appears below and to the left of the video windows.  Here, I am accepting a screenshare from my iPhone.

spaces4You can enhance the application by borrowing code from the other solutions in the GitHub repository.  For example, in other applications I show how to monitor presence and retrieve previous chat messages.  Several of the TADHack developers used them without any issues.  In addition to JavaScript code, I provide two examples written in node.js.

This application uses an anonymous JavaScript Web Token (JWT) to authenticate with Spaces.  A tighter and more powerful integration would use OAuth2, but that’s a blog (and code) for another day.

Mischief Managed

There you go – your very own Spaces application framework that can be used to collaboration enhance any web experience.  I am giving you software very similar to what I handed to ToolWire when they started developing Spaces Learning.  It’s also at the heart of my Realty, HR, and salesforce applications.  Enjoy!

P.S.

If you do not have an Avaya Spaces account, sign up for a free one here: https://www.avaya.com/en/products/ucaas/spaces/

P.P.S.  The applications use the Space development APIs as they exist today.  A new, comprehensive API is being developed, but everything shown here and in the GitHub repository will continue to work for quite some time.

Advertisement

One comment

  1. […] explanations aid a reader’s understanding and comprehension of these complex topics. In one post, Prokop breaks down he uses Avaya Spaces APIs to build a collaboration app. In another post as part […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: