Expand | ||
---|---|---|
| ||
|
...
JQuery® requires a workaround to operate correctly with Node.js . See (see this page for an example.
...
). This workaround requires modifying the content, so if you don't have control over the webpage enabling node in your HTML widget, this can cause an intractable problem. You should only enable Node.js if you are planning to use it (for example with our JavaScript APIs).
See also HTML Best Practices.
Node SerialPort
The BrightSign player provides JavaScript serial port bindings for the Node SerialPort package. These bindings can be used using with the @brightsign/serialport API:
Code Block |
---|
const SerialPort = require('@serialport/stream');
const BrightSignBinding = require('@brightsign/serialport');
SerialPort.Binding = BrightSignBinding; |
Also see our reference implementation on GitHub.
Reloading Node.js Enabled Web Applications
Any customer application that uses @brightsign objects, and some of the "BS" objects, will throw a JavaScript exception when reloaded in BrightSign OS BrightSignOS 8.0 to 8.4 (even though it may have worked in OS 7.x and earlier) due to limitations with native modules in Node 10. This problem will be fixed in OS 8.5 and above, which ships with Node 14.x. You can also disable Node.js (and @brightsign objects) if you don’t need it..
...
Code Block | ||
---|---|---|
| ||
module.paths.push("/storage/sd/") module.paths.push("/storage/ssd/") module.paths.push("/storage/usb1/") |
Debugging Applications
When Node.js modules are enabled, they become visible from the Chromium remote inspector, allowing you to debug applications. The console.log works like a normal web application: Output is redirected to both stderr and the remote inspector.
...