Search code examples
ionic-frameworkhybridopentok

Can I build openTok(tokbox) hybrid application with ionic framework?


I am building mobile app which having secure video conference. I found Ionic framework which can support corodova. Can I build openTok hybrid app in Ionic framework? If yes can I know what are the pro and cons or limitation over android and iOS?


Solution

  • The short answer is yes.

    But as always, things are slightly more complicated than that.

    WebRTC works perfectly fine on Android, so will work in Cordova or even just Chrome. However Apple's Safari (which uses WebKit) does not currently support WebRTC.

    I have had some success using https://github.com/eface2face/cordova-plugin-iosrtc which provides a shim for WebRTC and allows you to use the OpenTok.js SDK on both platforms. There are a few pain points around sizing, and overlaying controls though.

    There is also: https://github.com/songz/cordova-plugin-opentok and https://github.com/aoberoi/cordova-plugin-opentokjs which I have not tried yet, but should work perfectly well. I believe the former wraps the native SDKs provided by TokBox, whilst the latter uses iosrtc.