- Public Google Group (mailing list) for questions and discussions about cordova-plugin-iosrtc.
- Bug Tracker for reporting issues and requesting new features (please don't use the bug tracker for questions or problems, use the mailing list instead).
- NPM package.
Yet another WebRTC SDK for iOS?
Absolutely not. This plugin exposes the WebRTC W3C API for Cordova iOS apps (you know there is no WebRTC in iOS, right?), which means no need to learn "yet another WebRTC API" and no need to use a specific service/product/provider.
In order to make this Cordova plugin run into a iOS application some requirements must be satisfied in both development computer and target devices:
- Xcode >= 7.2.1
- iOS >= 9 (run on lower versions at your own risk, but don't report issues)
Within your Cordova project:
$ cordova plugin add cordova-plugin-iosrtc
(or add it into a
<plugin> entry in the
config.xml of your app).
- Building: Guidelines for building a Cordova iOS application including the cordova-plugin-iosrtc plugin.
libwebrtc: Guidelines for building Google's libwebrtc with modifications needed by the cordova-plugin-iosrtc plugin (just in case you want to use a different version of libwebrtc or apply your own changes to it).
The plugin exposes the
var pc =iceServers:;cordovapluginsiosrtc;
In case you'd like to expose the API in the global namespace like regular browsers you can do the following:
// Just for Cordova apps.document;
And that's all. Now you have
See the FAQ.
Read the full documentation in the docs folder.
Who Uses It
People and companies using cordova-plugin-iosrtc.
If you are using the plugin we would love to hear back from you!
iOS Safari and crash on WebSocket events
Don't call plugin methods within WebSocket events (
onmessage, etc). There is an issue in iOS Safari (see issue #12). Instead run a
setTimeout() within the WebSocket event if you need to call plugin methods on it.
Or better yet, include the provided ios-websocket-hack.js in your app and load into your
index.html as follows:
<script src="cordova.js"></script> <script src="ios-websocket-hack.min.js"></script>
HTML5 video API
There is no real media source attached to the
<video> element so some HTML5 video events and properties are artificially emitted/set by the plugin on behalf of the video element.
Methods such as
pause() are not implemented. In order to pause a video just set
enabled = false on the associated