Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run the code on Brightsign #1

Open
pew-x2 opened this issue May 16, 2017 · 5 comments
Open

How to run the code on Brightsign #1

pew-x2 opened this issue May 16, 2017 · 5 comments

Comments

@pew-x2
Copy link

pew-x2 commented May 16, 2017

Would be great to have some kind of instructions on how to actually run the code on a Brightsign. To me at least, it is not as easy to run nodejs apps on a Brightsign player compared to a RasperryPi. Some step by steps instructions would be really great to have.

@PGambrill
Copy link

Please take a look at this page on the BrightSign Docs site: http://docs.brightsign.biz/display/DOC/Node.js

If you can't find the information you need there, let me know and I can work with our developers to add the needed info.

@pew-x2
Copy link
Author

pew-x2 commented May 16, 2017

Hi! I have actually been trying to run the example given in http://docs.brightsign.biz/display/DOC/Node.js without any success. The example is not very clear on how to start a nodejs application and communicate with the browser in the Brightsign player.

  • Is the two first parts supposed to go into the same autorun.brs?
  • How do I do if I don't want to mix the html code and the javascript code, but separate it like in a normal nodejs application like the one in this repo or does Brightsign not support that (what I mean is to have a nodejs service running and the browser connecting to it).
  • I'm guessing that I also need to add something more to the autorun.brs in order for the Brightsign player to acutally displaying the html page on the connected monitor.

@PGambrill
Copy link

Hi Perkka,

  • The two BrightScript code snippets can be part of the same autorun.brs script or they can be separate. Probably the easiest route would be to have a function at the beginning of the script to check if multi-process mode in chromium is enabled ("if mp <> '1' then) and to write to the registry and reboot if it isn't. The autorun.brs script can then create an roHtmlWidget instance with NodeJS enabled.
  • On BrightSign players, Node.js must be launched through HTML (i.e. an roHtmlWidget).
  • The two code snippets on the doc page should be everything you need to run/display an HTML page. It might be best to post what you have so far (autorun.brs, index.js, etc.) to your support ticket, and support can work with you to get the app working.

@pew-x2
Copy link
Author

pew-x2 commented May 17, 2017

I have now received answers on the forums about how to start the exmple in the docs.

Hm, about launching Node.js through HTML makes me think that I maybe shouldn't use nodejs. I was hoping to be able to use NodeJs as a backend running on localhost for the bs player browser to query for certain states. If not it is possible to hide a roHtmlWidget that is only used for running the NodeJs and having another roHtmlWidget that is displaying the page?

@jsinai
Copy link
Contributor

jsinai commented May 17, 2017

Yes, you can create multiple roHtmlWidgets as you describe. It should work fine to use one as a node server, and the other as a renderer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants