{"id":4563,"date":"2021-11-29T18:04:18","date_gmt":"2021-11-29T10:04:18","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4563"},"modified":"2025-02-21T14:07:05","modified_gmt":"2025-02-21T06:07:05","slug":"custom-signalling","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/custom-signalling\/","title":{"rendered":"Custom Signalling: React Native SDK &#8211; Video API"},"content":{"rendered":"\n<p>Your Application might require to send instructions, data to one or more recipient connected in a Session to deploy new features, business workflow. For example, you want to create a Polling mechanism among participants. The Portal supports Custom Signaling method through which you can build such utility that requires passing of messages among participants.<\/p>\n\n\n\n<p>Using Custom Signaling Method, you might send message to all or selected participants in a Room. You can define your custom data structure to pass to meet your business requirement.<\/p>\n\n\n\n<p><strong>Method<\/strong>:&nbsp;<code>Enx.<\/code>sendUserData<code>(message, isBroadcast, clientIds)<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>message<\/code>&nbsp;\u2013 String.  type message.<\/li><li><code>IsBroadcast<\/code>&nbsp;\u2013 Boolean. Use&nbsp;<em>true&nbsp;<\/em>for Public Broadcast, Use&nbsp;<em>false&nbsp;<\/em>for private messaging to one or more recipients.<\/li><li><code>clientIDs&nbsp;<\/code>\u2013 Array of ClientIDs whom you wish to send private messages.<\/li><\/ul>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li><code>receiveChatDataAtRoom<\/code> \u2013 Receives message in JSONObject<\/li><li><code>acknowledgeSendData<\/code> &#8211; Sender is acknowledged<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">Enx.sendUserData(message, true, null); \/\/ Send to all\nEnx.sendUserData(message, false, [ClientID]); \/\/ Send to few clients\n\n \n\/\/ Users Receive  through Callback \nreceiveChatDataAtRoom: event =&gt; {\n      \/\/ event = \n      \/\/ { \"source_id\":\"XXX\", \"type\":\"chat\", \"msg\":\"hello\"} \n}  \n\n\/\/ Sender is acknowledged  \nacknowledgeSendData: event =&gt; {\n     \n}  <\/pre>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<p>\u2190 <a href=\"..\/chat\/\">Send Message<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-center\"><a href=\"..\/\">Index<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-right\"><a href=\"..\/file-share\/\"><\/a><a href=\"..\/file-share\/\">File Sharing<\/a> \u2192<a href=\"\/developer\/how-to-use\/\"><\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your Application might require to send instructions, data to one or more recipient connected in a Session to deploy new features, business workflow. For example, you want to create a Polling mechanism among participants. The Portal supports Custom Signaling method through which you can build such utility that requires passing of messages among participants. Using Custom Signaling Method, you might send message to all or selected participants in a Room.&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3747,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"Your Application might require to send instructions, data to one or more recipient connected in a Session to deploy new features, business workflow. For example, you want to create a Polling mechanism among participants. The Portal supports Custom Signaling method through which you can build such utility that requires passing of messages among participants. Using&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4563"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=4563"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4563\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3747"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}