The Wayback Machine - https://web.archive.org/web/20201002122528/https://github.com/tinode/tinode-js
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
umd
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Javascript bindings for Tinode

See it used at https://web.tinode.co/ and https://sandbox.tinode.co/ (full source).

Regularly released NPM packages are at https://www.npmjs.com/package/tinode-sdk

You may include the latest standalone minified SDK into your html file as

<script crossorigin="anonymous"
  src="https://cdn.jsdelivr.net/npm/tinode-sdk/umd/tinode.prod.js">
</script>

or while developing as

<script crossorigin="anonymous"
  src="https://cdn.jsdelivr.net/npm/tinode-sdk/umd/tinode.dev.js">
</script>

Getting support

Node JS compatibility

This SDK is intended to be used in a browser. To use tinode-sdk in Node JS environment (such as on a server), you have to polyfill network providers, for example with ws and xmlhttprequest or xhr.

  Tinode.setNetworkProviders(require('ws'), require('xmlhttprequest'));
  this.tinode  = new Tinode(...);

or (before instantiating Tinode):

  window.WebSocket = require('ws');
  window.XMLHttpRequest = require('xmlhttprequest');

Keep in mind that the SDK also references URL.createObjectURL() which is not currently polyfilled. It will throw an exception when the user attempts to download a file attachment. See discussion: https://github.com/tinode/tinode-js/issues/28

You can’t perform that action at this time.