This tutorial will show you how to create a simple, yet functional video chatroom using the OpenTok API and Flask. Flask is a python based micro-framework to create web apps.
The app we’ll be creating will be a simple website which will allow you to instantly create a video chatroom.
So, let’s get started! First of all, you’ll need to install Flask. Then, create a new folder and inside, make a new file called main.py.
What happens when you take an API evangelist for OpenTok and introduce him to a bunch of developers in a place he’s never been to, for example Tel Aviv? Yeah, I had no idea either. It turns out that in a place like Tel Aviv, where there are some brilliant startups springing up, there’s no shortage of awesome developers with endless creativity.
TDHack, the first Telefonica Digital Israel hackathon, took place this past weekend. I saw it not only as an opportunity to go meet some our extended family, but to jump out of the American startup scene that I know so well and see how things are different (or the same) in Israel.
Here’s our dirty little secret: for the longest time, our little team here at TokBox never used TokBox to talk to each other. There was no need. We all worked together in our Wes Anderson-esque office in SOMA, ate lunch together around our big table, and went for coffee breaks together at Epicenter on Harrison Street.
Then last summer I moved to NYC. I learned quickly that it’s tough to get a team that doesn’t have a remote co-working culture to pick it up right away — not even a team that works on video chat. Desk drive-bys for quick questions became long IM threads. Impromptu meetings with the whiteboard became “oops we forgot to call you” or “dammit, I can’t see the whiteboard” fails. Casual lunch conversation became…nothing.
We got better at this, but the turning point was when Double Robotics loaned us a Double to beta test (Disclosure! TokBox powers the video component for Double). We affectionately named it J9000.
J9000 and I are about the same height.
We just launched Mantis yesterday, and saw a rush of activity as partners hopped onto the WebRTC cloud. The new things people will be able to build – a real-time, online dungeons and dragons web app, seminar applications, education applications, and more – are now going to see a whole new level of quality and experience. We’re really excited to be the face-to-face video platform that helps make this happen. But to make it happen more quickly, we’ve decided to write a quick Mantis checklist. To make your Mantis application work, you will need to:
- Make sure that you are using the OpenTok on WebRTC JS library. You can find the library here, and find the reference documentation here. If you are using the v1.1 JS library, you will need to update your application to the v2.0 library.
- Use a browser with WebRTC support – Chrome 26, FireFox Beta, or IE9 with the Google Chrome Frame plugin.
- When you generate a session, make sure that the p2p.preference flag is set to disabled. If you’re generating your sessions from the Developer Dashboard, then you will need to download one of our server-side SDKs and generate sessions yourself.
If you haven’t already asked to participate in the Mantis beta, please contact us. Then make sure that you are using the correct API key for the Mantis beta. If you are not sure which API key you sent us, then please email us, and we will let you know. Mantis requires that your API key be enabled to access the infrastructure.
- [UPDATE] Good news! As of 10/1/13 Mantis is available in production. That means you no longer have to email the TokBox team to request access. Mantis is subject to the new OpenTok platform pricing which you can review here. Free access to Mantis is available through our new 30-day free trial.
It really is that quick, and if you’re finding that you need some more help, then let us know. To make sure that your question gets answered as quickly as possible, please send an email to firstname.lastname@example.org using the following template:
Today we’re proud to announce our latest WebRTC innovation: Mantis, a cloud-scaling infrastructure for our OpenTok on WebRTC platform.
This is another big step forward for the TokBox team as we continue to pursue our goal of providing application developers with simple yet powerful APIs. APIs that not only leverage the latest standards to deliver the best possible experience, but that are backed by a scalable, smart cloud which supports interoperability across a variety of end-points.
Yesterday Firebase launched Firepad, a Firebase-powered open source collaborative text editor. Here’s the product pitch, Michael Lehenbauer says it best:
Firepad provides true collaborative editing, complete with intelligent OT-based merging and conflict resolution. It’s full-featured and has support for both rich text and code editing. Some of its features include cursor position synchronization, undo / redo, text highlighting, user attribution, presence detection, and version checkpointing.
A new version of Chrome is out, and with it changes in the WebRTC stack. We dug through the commit logs for Chrome 26, and found the following list of WebRTC bug fixes, enhancements, and updates that we thought were relevant to the OpenTok community:
- A lot of audio bugs in WebRTC were fixed dealing with crashes and non-standard audio bitrates
- Chrome on Android can now be WebRTC-enabled by enabling a flag
- Improvements to the connectivity stack in WebRTC
- Ability to set media constraints for audio
A few weeks ago at SXSW I had the opportunity to meet Ari Fuchs, developer evangelist at Aviary. After a few rounds of birthday drinks (I had just turned 24), I slurred a promise to him that I would play around with Aviary’s API.
SXSW is here again and we are ready!
This year we are giving out TokBox WristBands. They are motion activated and light up with a brilliant flare whenever you shake hands or fist bump someone. Make a visual connection! Here’s how it works:
Ankur Oberoi and Song Zheng will be roaming the city. To get your TokBox wristband simply find us and ask for one!
On February 4th Mozilla and Google announced that their respective browsers could now talk to each other via WebRTC. This is another big milestone in WebRTC’s path towards becoming available in all modern web browsers, albeit, today only in an early development build of Firefox, version 21+ (currently Nightly and soon to be Aurora).
We’ve also been working hard on making OpenTok on WebRTC work with both Firefox and Chrome so you too can enjoy all this cross-browser goodness!
Off to the races
The first thing that you need is version 21 or higher of Firefox, currently available through the Aurora FTP site and Nightly site.