Event listen – verify that a chat was loaded fully

For developers: If you need to verify that a chat was loaded fully and ready to receive messages. You may listen to the ‘message’ event, and check if the event.origin is a valid RumbleTalk chat domain.

window.addEventListener(  ‘message’,  function (event) {    if ((/^https:\/\/\w+\.rumbletalk\.net$/).test(event.origin)) {      // chat loaded and ready
  },  false

Share Button

How to add a chat to your angular project?

Add a chat to your Angular website using NPM https://www.npmjs.com/package/ngx-rumbletalk

npm install ngx-rumbletalk

example of usage is:

<ngx-rumbletalk [hash]=”hash” [height]=”300″></ngx-rumbletalk>

where “hash” is the variable holding the chat hash

Share Button

Why my token expires?

Yes. Indeed, Tokens expire.

You can read more about JWT here, which is the type of token we use.

You can not get a non-expiring token. But if you use our SDK, there’s a function called renewalNeeded that tells you if the access token is valid or not, so that you can replace it when needed.

** If you need a long term token (for years), please contact us at support

Share Button