title: Connecting Ionic 4 app to a WebSocket on the same network
body: <p>Like the title says, I can't seem to be able to connect my Ionic 4 app to my LG TV which runs on the same network through a WebSocket.</p>
  
  <p>I've tried a lot of methods, using cordova-advanced-websocket, SocketIO, WS, native WebSocket etc..</p>
  
  <p>I've gone so far as to managing to connect to my TV but all I get in response is "invalid origin" . I know what this means but what I don't understand is, how to bypass that and also, how come I get it when my app runs on the same network? They're not the same IP's though 192.168.0.17:8100 ( device ) and 192.168.0.27:3000 ( TV )</p>
  
  <p>I've been struggling over this for a couple of days and I'm almost ready to give up, however, I know it's possible, somehow, since some of the apps on the AppStore are able to connect to my TV and control it.</p>
  
  <p>I don't have any code, it's literally just your standard <code>new WebSocket(ip)</code>
  I have a script which works and I'm able to connect to the TV and send commands, however, this runs by starting a Node.JS server, thus why it's working.</p>
  
  <p>I'm not looking to make it work in the browser or whatever, even if Ionic runs in the browser.</p>
  
  <p>Any ideas?</p>