Comments (6)
I see; I get what you are saying; thanks for the suggestion.
from osc-js.
@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.
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.
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.
I see that UDP is not possible with Javascript in a browser app.
from osc-js.
@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)
- Accept full URL in osc.open() HOT 1
- Uncaught ReferenceError: OSC is not defined HOT 1
- ModuleNotFoundError: Module not found: Error: Can't resolve 'dgram' in [...] HOT 8
- Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
- Connecting to another device on the network fails with host: localhost. need 0.0.0.0
- Browser(http) osc message to Reaper(udp) HOT 4
- Use TypeScript HOT 4
- Implement booleans HOT 5
- Integer bundle timetags ignored HOT 3
- Use another documentation generator
- Export `Message` class (and possibly other classes)
- ERR_SOCKET_DGRAM_NOT_RUNNING HOT 1
- Can we avoid using websocket and use the library in the browser? HOT 2
- From maxmsp to browser HOT 1
- TypeScript compile error because of incompatible override of Atomic.unpack by its subclasses HOT 2
- Event listener on server on client connect
- Trouble sending osc message to UDP client in LAN network HOT 1
- Handling errors in unpack in Node.js HOT 2
- Nested bundles cannot be processed
- http package is deprecated, so I cannot install osc-js. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osc-js.