{"id":4791,"date":"2021-12-08T15:38:21","date_gmt":"2021-12-08T07:38:21","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4791"},"modified":"2022-04-08T18:34:02","modified_gmt":"2022-04-08T10:34:02","slug":"chat","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/cordova-toolkit\/chat\/","title":{"rendered":"Chat: Cordova\/Ionic SDK &#8211; Video API"},"content":{"rendered":"\n<p>This is an advance messaging feature between Session participants. You can conduct the following types of messaging in a session among participants:<\/p>\n\n\n\n<ul><li><strong>Public Messaging:&nbsp;<\/strong>To send messages to all connected users.<\/li><li><strong>Private Messaging:&nbsp;<\/strong>To send messages to a specific user.<\/li><li><strong>Group Messaging:<\/strong>&nbsp;To send messages to more than one user.<\/li><\/ul>\n\n\n\n<p>Messaging feature requires neither the sender to publish his Stream nor receivers to subscribe.<\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>sendMessage( message, isBroadcast, recipientIDs )<\/code><\/p>\n\n\n\n<p><strong>Parameters<\/strong>: <\/p>\n\n\n\n<ul><li><code>@param Strings message<\/code> \u2013 String type message. <\/li><li><code>@param bool isBroadcast <\/code>\u2013 Boolean. Use&nbsp;<em>true&nbsp;<\/em>for Public Broadcast, <em>false&nbsp;<\/em>for private messaging to one or more recipients.<\/li><li><code>@param List recipientIDs <\/code>\u2013 Array of ClientIDs whom you wish to send private messages.<\/li><\/ul>\n\n\n\n<p><strong>Event Listeners:<\/strong> <\/p>\n\n\n\n<ul><li><code>onAcknowledgedSendData<strong> <\/strong><\/code>\u2013 It notifies when the message is successfully sent to another user or group of users<\/li><li><code>onMessageReceived <\/code>\u2013 It notifies at receiver&#8217;s end that a new message arrived<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ To send message\nmessage = \u201chi\u201d;\nvar broadcast = true; \/\/ Incase of public messaging\nVar broadcast = false; \/\/ Incase of private messaging.\nvar array = []; \/\/ Incase of public messagingVar array = [clientiid_1]; \/\/ Incase of private messaging.\nwindow.EnxRtc.sendMessage( message,true,array);\n\/\/ Add Event Listeners\nwindow.EnxRtc.addEventListner(\"onAcknowledgedSendData\", function\n(data)\n{\nconsole.log(JSON.stringify(data.data));\n});\nwindow.EnxRtc.addEventListner(\"onMessageReceived\",function (data)\n{\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=\"..\/advance-stream-options\/\">Advance Stream Options<\/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-sharing\/\">File Share<\/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>This is an advance messaging feature between Session participants. You can conduct the following types of messaging in a session among participants: Public Messaging:&nbsp;To send messages to all connected users. Private Messaging:&nbsp;To send messages to a specific user. Group Messaging:&nbsp;To send messages to more than one user. Messaging feature requires neither the sender to publish his Stream nor receivers to subscribe. Method: sendMessage( message, isBroadcast, recipientIDs ) Parameters: @param Strings&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":"This is an advance messaging feature between Session participants. You can conduct the following types of messaging in a session among participants: Public Messaging:&nbsp;To send messages to all connected users. Private Messaging:&nbsp;To send messages to a specific user. Group Messaging:&nbsp;To send messages to more than one user. Messaging feature requires neither the sender to publish&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4791"}],"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=4791"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4791\/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=4791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}