1 Reply Latest reply on Jan 22, 2015 9:16 AM by Laubender

    Using Peerjs with Adobe InDesign

    enricog74148433

      Hy,

       

      I'm creating my own InDesign PlugIn and I need to connect to another web application I created. I tried using socket.io, but I didn't want to have another server, so I have passed to Peer JS, in this way I have a peer to peer system that would work perfectly, but I met some unexpected problems.

       

      I'm working with Adobe InDesign CC, that uses CEP5, which has support for google chrome BROWSER (CEF (Chromium extended framework )).

       

      In the Docs it's said that CEP5 has support even for WebRTC but when I try to connect with peerjs (wich uses WebRTC) to another peer I get a :"TypeError: undefined is not a function", under further investigation I discovered that the error is thrown by Object.Negotiator._startPeerConnection, but I can't understand what I'm getting wrong...

       

      I tried using the same PEER JS code in another application(just a normal web site) and connecting to the same peer and was successfull, so I'm guessing that the problem is the in WebRTC support provided by InDesign.

       

      I am not confined to using PEER JS, I just want my adobe plugin and my site to communicate in the most intelligent way possible, so any idea is welcome, however this is the piece of code of my plugin where I try to connect to the PEERJS

       

          var peer = new Peer({key: mySecretKey});

          var conn = peer.connect('editor-vaComeVibraEEE');//the exception is     generated here

          conn.on('open', function(){

              conn.send('hi!');

          });

       

      Thank's for the help... . . .

        • 1. Re: Using Peerjs with Adobe InDesign
          Laubender Adobe Community Professional & MVP

          I do know next to nothing about CEP5.


          Just a question: Why do you try to escape "/" in the string "editor-vaCome\/ibraEEE" ?
          At least this is my guess what you want to do here…

           

          If you want to feed the argument string "editor-vaComet/ibraEEE" to peer.connect() you cannot "escape" that slash… At least not in terms of ExtendScript.

           

          Uwe