Package Exports
- realtime-messaging
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (realtime-messaging) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Realtime Cloud Messaging JavaScript SDK
Part of the The Realtime® Framework, Realtime Cloud Messaging (aka ORTC) is a secure, fast and highly scalable cloud-hosted Pub/Sub real-time message broker for web and mobile apps.
If your application has data that needs to be updated in the user’s interface as it changes (e.g. real-time stock quotes or ever changing social news feed) Realtime Cloud Messaging is the reliable, easy, unbelievably fast, “works everywhere” solution.
We have included the source code and licence for the sockjs-client library.
Installation
If you're using Realtime on a web page, you can install the library via:
CDN
<script src="//messaging-public.realtime.co/js/2.1.0/ortc.js"></script>
Bower
bower install realtime
and then
<script src="bower_components/realtime/dist/ortc-min.js"></script>
More about Bower at http://bower.io/
NPM
npm install realtime-messaging --save
and then
import Realtime from 'realtime-messaging';
Realtime.loadOrtcFactory(Realtime.IbtRealTimeSJType, (factory, error) => {
if(!error) {
this.realtime = factory.createClient();
this.realtime.setClusterUrl("http://ortc-developers.realtime.co/server/2.1/");
this.realtime.connect('YOUR_APPKEY', 'token');
this.realtime.onConnected = (client) => {
console.log("realtime connected");
}
}
})
Quick Start Guide
http://messaging-public.realtime.co/documentation/starting-guide/quickstart-js.html
API Reference
http://messaging-public.realtime.co/documentation/javascript/2.1.0/OrtcClient.html
Authors
Realtime.co