Git Product home page Git Product logo

Comments (6)

ManjitBedi avatar ManjitBedi commented on August 16, 2024 1

I see; I get what you are saying; thanks for the suggestion.

from osc-js.

adzialocha avatar adzialocha commented on August 16, 2024

@ManjitBedi How do you use the library in your code? Do you use the BridgePlugin on the client-side? Its only meant to be used on the server-side, the client would make use of the default WebsocketClientPlugin.

from osc-js.

ManjitBedi avatar ManjitBedi commented on August 16, 2024

I see. That is the mistake I am making, I am using the Bridge plugin on the client side.

I will try the WebsocketClientPlug-in.

Thanks

from osc-js.

ManjitBedi avatar ManjitBedi commented on August 16, 2024

We are using UDP with Touch Designer. I have tested sending UDP packets with other apps & it is working. I changed the code to the following based on the Wiki page.

const dgram = require('dgram')
const OSC = require('osc-js')

const options = {
  send: {
      host: '127.0.0.1',   // @param {string} Hostname of udp client for messaging
      port: 3333           // @param {number} Port of udp client for messaging
    }
}

const osc = new OSC({ plugin: new OSC.DatagramPlugin(options) })
osc.open()

// send a messsage via udp
osc.send(new OSC.Message('/test'))

I now get a different error:

TypeError: dgram.createSocket is not a function[Learn More] osc.js:973
DatagramPlugin
osc.js:973
require<[7]<
camera_osc.js:39:30
newRequire
http://localhost:1234/dist/904f316f53e694a9253efea39d6a5f51.js:42:7
require<
http://localhost:1234/dist/904f316f53e694a9253efea39d6a5f51.js:69:5
<anonymous>
http://localhost:1234/dist/904f316f53e694a9253efea39d6a5f51.js:10:12

from osc-js.

ManjitBedi avatar ManjitBedi commented on August 16, 2024

I see that UDP is not possible with Javascript in a browser app.

from osc-js.

adzialocha avatar adzialocha commented on August 16, 2024

@ManjitBedi Yes! You will need to have a middleman between the browser and your UDP server application. This could be a Node.JS server for example, here is something: https://github.com/adzialocha/osc-js/wiki/PureData-&-MaxMSP

from osc-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.