{"id":4818,"date":"2021-12-08T19:57:09","date_gmt":"2021-12-08T11:57:09","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4818"},"modified":"2025-02-23T13:09:54","modified_gmt":"2025-02-23T05:09:54","slug":"custom-signalling","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/cordova-toolkit\/custom-signalling\/","title":{"rendered":"Custom Signalling: Cordova\/Ionic SDK &#8211; Video API"},"content":{"rendered":"\n<p>Your Application might need to send instructions, data to one or more recipients connected in a Session to deploy new features, business workflow. For example, you want to create a Polling mechanism among participants. Portal supports the Custom Signalling method through which you can build such a utility that requires the passing of messages among participants.<\/p>\n\n\n\n<p>Using Custom Signaling Method, you might send messages 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:&nbsp;<\/strong> <code>sendUserData( message, isBroadcast, RecipientIDs )<\/code><\/p>\n\n\n\n<p><strong>Parameters<\/strong>:<\/p>\n\n\n\n<ul><li><code>@param {JSON} <\/code>message \u2013 JSONObject containing the following custom keys. This object is passed to Recipients in its original form. Portal doesn\u2019t enforce its structure. Be advised to define keys effectively for signaling needs.<ul><li><code>sender<\/code>: Sender&#8217;s name<\/li><li><code>message<\/code>: Message body<\/li><li><code>custom_key<\/code>: Data<\/li><\/ul><\/li><li><code>@param {boolean} isBroadcast<\/code>\u2013 Boolean. Use\u00a0<em>true\u00a0<\/em>for Public Broadcast,\u00a0<em>false\u00a0<\/em>for signaling to one or more recipients.<\/li><li><code>@param {Array} RecipientIDs<\/code> \u2013 Array of Client IDs whom you wish to send private messages.<\/li><\/ul>\n\n\n\n<p><strong>Event Listener:<\/strong>&nbsp; <\/p>\n\n\n\n<ul><li><code>onReceivedChatDataRoom<\/code> \u2013 Receives signaling in JSONObject. Available up till Android Toolkit v1.5.2. Deprecated on v1.5.3<\/li><li><code>onUserDataReceived<\/code> \u2013 Receives signaling in a JSONObject. Available Android Toolkit v1.5.3 onwards.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ To send message\nmessage = \u201c\u201d; \/\/ JSON\nvar broadcast = true; \/\/ Incase of public messaging\nVar broadcast = false; \/\/ Incase of private messaging.\nvar array = []; \/\/ Incase of public messaging\nVar array = [clientiid_1]; \/\/ Incase of private messaging.\nwindow.EnxRtc.sendUserData( message,true,array);\n\n\/\/ Add Event Listeners\nwindow.EnxRtc.addEventListner(\"onAcknowledgedSendData\", function\n(data)\n{\nconsole.log(JSON.stringify(data.data));\n});\nwindow.EnxRtc.addEventListner(\"onUserDataReceived\",function (data)\nconsole.log(JSON.stringify(data.data));\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=\"..\/file-sharing\/\">File Share<\/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=\"..\/annotations\/\"><\/a><a href=\"..\/annotations\/\">Annotation<\/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 need to send instructions, data to one or more recipients connected in a Session to deploy new features, business workflow. For example, you want to create a Polling mechanism among participants. Portal supports the Custom Signalling method through which you can build such a utility that requires the passing of messages among participants. Using Custom Signaling Method, you might send messages to all or selected participants in&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3719,"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 need to send instructions, data to one or more recipients connected in a Session to deploy new features, business workflow. For example, you want to create a Polling mechanism among participants. Portal supports the Custom Signalling method through which you can build such a utility that requires the passing of messages among&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4818"}],"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=4818"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4818\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3719"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}