bigbluebutton / bigbluebutton-html-plugin-sdk

BigBlueButton Plugin SDK
GNU Lesser General Public License v3.0
6 stars 5 forks source link

feature: fetch plugin settings #59

Closed GuiLeme closed 8 months ago

GuiLeme commented 8 months ago

What does this PR do?

It basically adds this new hook usePluginSettings, which is completely reactive, as future iterations of BBB will give us the possibility to change the client settings on the run.

The structure is pretty much the same as the other hooks as it will come within a specific structure like so:

{
  loading,
  data,
  error,
}

The data will contain the configurations for the specific plugin inside which the usePluginSettings was used. (i.e.: plugin with pluginName specified in the pluginApi).

Now, make sure you add the following directives inside /etc/bigbluebutton/bbb-html5.yml

  plugins:
    - name: PluginName
      url: http://127.0.0.1:4701/static/PluginName.js
      settings:
        serverUrl: https://some-server.com
        otherConfig: 1234

The only part this plugin will return is the object inside the settings directive.

Closes

Closes #55

More

As these settings are saved inside graphql via Akka for now, one must restart at least akka and html5 so that those settings are stored properly.