Abre un chat entre dos usuarios




Javascript:

  
      
        <script>
                (function () {
                    var jrw = document.createElement('script');
                    jrw.type = 'text/javascript';
                    jrw.async = true;
                    jrw.id = 'nwRtcMaker';
                    jrw.src = 'https://videoconf.gruponw.com/nwlib6/nwproject/modules/webrtc/testing/two/js/apinwrct.js?terminal=2&key=6223784632597&callback=myFunction';
                    var srw = document.getElementsByTagName('script')[0];
                    srw.parentNode.insertBefore(jrw, srw);
                })();
                function openChatOne() {
                    nwrctin.startConversation('id_user_one', 'id_user_two', 'chat', 'bottom');
                }
                function openChatTwo() {
                    nwrctin.startConversation('id_user_two', 'id_user_one', 'chat', 'bottom');
                }
                function myFunction() {
                    console.log("Init someone");
                }
        </script>
    
  


HTML:

  

    <input type='button' value='Open chat User one' onclick='openChatOne()' />
    <br />
    <input type='button' value='Open chat User two' onclick='openChatTwo()' />