Skip to content

Commit 7e8547d

Browse files
ref: Update plugin to match manifest structure (#4)
* [manifest-structure] - Update plugin to match new manifest structure and update libraries accordingly. * Apply suggestions from code review Co-authored-by: João Victor Nunes <62393923+JoVictorNunes@users.noreply.github.com> * [manifest-structure] - changes in review --------- Co-authored-by: João Victor Nunes <62393923+JoVictorNunes@users.noreply.github.com>
1 parent f157dc7 commit 7e8547d

File tree

7 files changed

+527
-434
lines changed

7 files changed

+527
-434
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
dist
3+
dist-tsc
34
debian/.debhelper/
45
debian/debhelper-build-stamp
56
debian/files

README.md

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,30 @@
44

55
This plugin is one of the official bbb plugins. It basically decreases the external video's volume when a user is speaking in the meeting.
66

7-
## Running the Plugin from Source
8-
9-
1. Start the development server:
10-
11-
```bash
12-
cd src/plugin-decrease-volume-on-speak
13-
npm install
14-
npm start
15-
```
16-
17-
2. Add reference to it on BigBlueButton's `settings.yml` or `/etc/bigbluebutton/bbb-html5.yml`:
18-
19-
```yaml
20-
plugins:
21-
- name: DecreaseVolumeOnSpeak
22-
url: http://127.0.0.1:4701/static/DecreaseVolumeOnSpeak.js
23-
```
247

258
## Building the Plugin
269

2710
To build the plugin for production use, follow these steps:
2811

2912
```bash
30-
cd src/plugin-decrease-volume-on-speak
13+
cd $HOME/src/plugin-decrease-volume-on-speak
3114
npm ci
3215
npm run build-bundle
3316
```
3417

35-
The above command will generate the `dist` folder, containing the bundled JavaScript file named `DecreaseVolumeOnSpeak.js`. This file can be hosted on any HTTPS server.
18+
The above commands will generate the `dist` folder, containing the bundled JavaScript file named `DecreaseVolumeOnSpeak.js`. This file can be hosted on any HTTPS server along with its `manifest.json`.
19+
20+
If you install the plugin separated from the manifest, remember to change the `javascriptEntrypointUrl` in the `manifest.json` to the correct endpoint.
3621

37-
To use the plugin with BigBlueButton, add the plugin's URL to `settings.yml` as shown below:
22+
To use the plugin in BigBlueButton, send this parameter along in create call:
3823

39-
```yaml
40-
public:
41-
app:
42-
... // All app configurations
43-
plugins:
44-
- name: DecreaseVolumeOnSpeak
45-
url: <<PLUGIN_URL>>
46-
... // All other configurations
4724
```
25+
pluginManifests=[{"url":"<your-domain>/path/to/manifest.json"}]
26+
```
27+
28+
Or additionally, you can add this same configuration in the `.properties` file from `bbb-web` in `/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties`
29+
30+
31+
## Development mode
4832

49-
Alternatively, you can host the bundled file on the BigBlueButton server by copying `dist/DecreaseVolumeOnSpeak.js` to the folder `/var/www/bigbluebutton-default/assets/plugins`. In this case, the `<<PLUGIN_URL>>` will be `https://<your-host>/plugins/DecreaseVolumeOnSpeak.js`.
33+
As for development mode (running this plugin from source), please, refer back to https://github.com/bigbluebutton/bigbluebutton-html-plugin-sdk section `Running the Plugin from Source`

manifest.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"requiredSdkVersion": "~0.0.59",
3+
"name": "DecreaseVolumeOnSpeak",
4+
"javascriptEntrypointUrl": "DecreaseVolumeOnSpeak.js",
5+
"localesBaseUrl": "https://cdn.domain.com/pluginabc/"
6+
}

0 commit comments

Comments
 (0)