0

Triggering UDP events with javascript from a HTML app

I'm having problems triggering the UDP event from Javascript.

I have enabled the local server and setup the presentation so it handles an UDP event (<any> value).

 

When I send a UDP packet manually (via Packet Sender) everything works, but when I try to trigger it by a POST request to http://localhost:8080/SendUDP with a object {key: 'SendUDP', value: 'click'} it gets a 200 response but nothing happens.

I have tried triggering it from a laptop on a local network (via Postman), and the same thing happens. I get 200, but nothing happens on the device.

 

Where's the catch?

5 comments

  • 0
    Avatar
    Bright Scripters

    This is what I've been using to trigger UDP message from HTML via JS:

    function sendUDPString(s)
    {
    $.post("/SendUDP", { key: "SendUDP", value: s } );
    }

  • 0
    Avatar
    Bright Scripters

    Were you able to move forward?

  • 0
    Avatar
    Yatin Baluja

    Hi,

     

    I have a quick question to control the content for example if I want to trigger one presentation at a particular time and the other one presentation in between or right after that. So, what's the methodology should I follow, is it related to API or UDP?

  • 0
    Avatar
    ^UD\_$

    You could use BrightAuthor Pause command, or a Timeout event, to add a delay.

    https://docs.brightsign.biz/display/DOC/Timeout

    https://docs.brightsign.biz/display/DOC/Commands#Commands-Otherother

  • 0
    Avatar
    Yatin Baluja

    Our idea is to just do a simple looped playlist but also cache one separate piece media and trigger that file to play from our server (not on the LAN).  I can see how this might be accomplished by using the Media Properties > Advanced > Other commands > Show/Hide zone, but is there a tried and true way of doing this? also what is the method to send these commands?... custom plugin? UDP?

    We are just getting familiar with brightauthor but I would have to believe that the engineers at BS would have built a method for this already.

     

     

Please sign in to leave a comment.