Latest post Fri, Oct 18 2019 6:15 PM by Vadym. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • Fri, Sep 27 2019 1:40 PM

    Using the Broadcast Notification API in a CloudUX Plug-in

    I'm looking for some advice on using the Broadcast Notification API in a plug-in to receive status updates posted from my platform service; thus avoiding the need to poll the service for the updates. I have added the functionality described in http://developer.avid.com/mcux_ui_plugin/clux-api/notifications/avid-broadcast-notification.html to my code and added the dependency in package.json.

    If I try subscribing to my platform services channel (e.g. tv2.media.status.service) then it fails with an error saying "Client not allowed to subscribe. Invalid channel name". Can you suggest how to resolve this? Posting and receiving within the platform service works fine as does posting and receiving between my different platform services.

    What is perhaps strange is that if I use the code from the API Doc verbatim and retain the example channel name "some.bridge" then the subscription succeeds, however if I try posting to that channel I don't receive any messages.

    A secondary issue concerns compiling the plug-in. The docs tell you to define avid-broadcast-notification as an external dependency, however this doesn't appear to work with the VSCode App Creator Tool as it comes up with Module Not Found errors which I can't find a way to suppress. I have resolved the issue temporarily by including a downloaded copy of avid-broadcast-notification.js and turning off the rules checking as that does not like the file.

  • Fri, Oct 18 2019 6:15 PM In reply to

    • Vadym
    • Top 500 Contributor
    • Joined on Thu, Apr 17 2014
    • Posts 226
    • Points 2,735
    • Avid Developer Moderator
      Avid Employee

    Re: Using the Broadcast Notification API in a CloudUX Plug-in

    The broadcast mechanism can only subscribe to channels that end in .bridge. When you subscribe, you subscribe with a potentially wildcarded subject filter. This must match the period separated scheme you use for your subjects in your messages.
    That is, if you post a message with subject x.y.z, you must have subscribed with *.*.* or *.*.z or whatever. If you subscribe with * or *.* or *.*.*.z, you will never receive anything
    VS Code App Creator Tool and cloudux-starter-kit do not support external dependencies. Please modify webpack config in the project according to the manual https://webpack.js.org/configuration/externals/

Page 1 of 1 (2 items)

© Copyright 2011 Avid Technology, Inc.  Terms of Use |  Privacy Policy |  Site Map |  Find a Reseller