making PeerJS work with cordova-plugin-iosrtc for IOS Dataconnection

315 views
Skip to first unread message

broadthink

unread,
Mar 2, 2016, 3:26:18 PM3/2/16
to PeerJS
I am using iosrtc plugin with PeerJS for Dataconnection in cordova.
I have loaded cordova device plugin and called the registerglobalvariables()..

I am getting errors with PeerJS

If I user peer.js in the cordova directory I get the error
          
         ReferenceError: window is not definedt Object../adapter
          (cordova/peer.js:279:1)  
           
          window.Socket = require('./socket');
          window.MediaConnection = require('./mediaconnection');
          window.DataConnection = require('./dataconnection');
          window.Peer = require('./peer'); window.RTCPeerConnection =
          require('./adapter').RTCPeerConnection;
          window.RTCSessionDescription =
          require('./adapter').RTCSessionDescription;
          window.RTCIceCandidate = require('./adapter').RTCIceCandidate;
          window.Negotiator = require('./negotiator'); window.util =
          require('./util'); window.BinaryPack =
          require('js-binarypack');  What is the method to make peer.js
          work with cordova iosrtc plugin.

Should window be replaced by something like webview for cordova?

Thanks for any help to make PeerJS work with iosrtc for dataconnection.
Reply all
Reply to author
Forward
0 new messages