0

XD1230 - Node/JS support

Do the XD1230s support Node/Javascript API? I have been unable to publish a autorun.brs that loads an htmlwidget with the following:

 

rect=CreateObject("roRectangle", 0, 0, width, height)

    'new node 5-16-17
    is = {
        port: 2999
    }
    config = {
            nodejs_enabled: true
            inspector_server: is
            brightsign_js_objects_enabled: true
        focus_enabled: true
        javascript_enabled: true
        url: url$
        mouse_enabled: false
        storage_path: "SD:"
        storage_quota: 1073741824
    }
    'end new

    gaa.htmlWidget = CreateObject("roHtmlWidget", rect, config) 
 
 
I receive a too many parameters error on the CreateObject("roHtmlWidget",rect,config). Any guidance would be greatly appreciated.

5 comments

  • 0
    Avatar
    Bright Scripters info[at]brightscripters.com

    Please forgive me if that is a silly question, but Is that all of the autorun code?

    The two variables width, and height are not defined, but are used in the roRectangle creation

    rect=CreateObject("roRectangle", 0, 0, width, height)

     

     

     

     

  • 0
    Avatar
    James Kohler

    Yes, it is. I should note that height and width are defined as:

     

    gaa =  GetGlobalAA()
    width=gaa.vm.GetResX()
    height=gaa.vm.GetResY()
     
    I neglected to copy the entire snippet. This code successfully runs on the LS232, LS432 and XD232 devices that we have deployed, but will not work unaltered on the xd1230s. I can attach a link to the full code if needed.
  • 0
    Avatar
    Bright Scripters info[at]brightscripters.com

    The firmware version on the players is important.

    What are the firmware versions that you have on the xd1230s?

    GetGlobalAA() might not be available on the firmware version you are working with.

     

  • 0
    Avatar
    James Kohler

    The firmware version is 6.1.76. I have not found anything newer.

     

     

  • 0
    Avatar
    Bright Scripters info[at]brightscripters.com

    Regardless of whether GlobalAA is available or not, you can create your own roVideoMode object, and get width and height from it.

    https://docs.brightsign.biz/display/DOC/roVideoMode#roVideoMode-GetOutputResX()AsInteger

    VideoMode = CreateObject("roVideoMode")

    width = VideoMode.GetOutputResX()
    height = VideoMode.GetOutputResY()

     

    If you are not using the debugger through serial port or ssh, I highly recommend doing so.

    https://brightsign.zendesk.com/hc/en-us/articles/218066947-How-do-I-enable-script-debug-mode-on-the-player-

    It removes a lot of the guess-work, and replaces it with information that can be used to complete a task.

Please sign in to leave a comment.