Cordova Plugin to add WebRTC Audio and Video

Over thcordova_bote past weeks I have been working on an open sourced, community driven, Cordova Plugin for OpenTok SDK that will give you the ability to add webrtc live audio/video chat to your Android and iOS applications. In this blog post I hope to let the OpenTok community know that this project is available and if you are a web developer with limited Android or iOS experience, you can now build OpenTok mobile apps with ease using the technology you are familiar with.

Jump right into your own project or watch a demo of the Cordova plugin in action! Since this project is open source, please file issues/concerns on the GitHub issue tracker and feel free to send pull requests!

What is Cordova?

Cordova in a nutshell lets developers build mobile applications using HTML, CSS, and JavaScript. At a very basic level you are building a website and your application is a simple browser (known as WebView) that renders your files. However, webview is limited and it often cannot give developers and access to native hardware like camera, accelerometer, and other native capabilities. Cordova’s strength is its ability to let you leverage native hardware of your mobile device through Cordova Plugins.

Cordova Plugins

Cordova Plugins usually consist of a JavaScript file and all the necessary native code files for each mobile platform ( Objective C files for iOS, Java for Android, C# for Windows Phone, etc ). Methods defined in the JavaScript file will call the methods defined in the native code, thus giving developers to access native functionality of mobile devices after installing the Cordova Plugin and adding the provided JavaScript file. In the Cordova Plugin for OpenTok for example, calling Session.publish() method will invoke the plugin’s native Android and iOS code. The native code will create a video view on top of the Cordova WebView using native OpenTok SDKs, display the camera’s video stream in the view, and stream the video to OpenTok’s servers.