You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

strophe.jibri.js 735B

123456789101112131415161718192021222324252627
  1. /* jshint -W117 */
  2. var jibriHandler;
  3. module.exports = function() {
  4. Strophe.addConnectionPlugin('jibri',
  5. {
  6. connection: null,
  7. init: function (conn) {
  8. this.connection = conn;
  9. this.connection.addHandler(
  10. this.onJibri.bind(this), this.JIBRI_XMLNS, 'iq', 'set',
  11. null, null);
  12. },
  13. onJibri: function (iq) {
  14. console.info("Received a Jibri IQ", iq);
  15. if (jibriHandler) {
  16. jibriHandler.onJibri(iq);
  17. }
  18. },
  19. setHandler: function (handler) {
  20. jibriHandler = handler;
  21. }
  22. }
  23. );
  24. };