Skip to content

Commit

Permalink
feat: Add new manifest structure to h5p-plugin (#10)
Browse files Browse the repository at this point in the history
* [manifest-structure] - added new manifest structure

* [manifest-structure] - updated structure

* [manifest-structure] - updated SDK

* [manifest-structure] - changes in review
  • Loading branch information
GuiLeme authored Nov 8, 2024
1 parent 4995291 commit c5aa17e
Show file tree
Hide file tree
Showing 8 changed files with 2,306 additions and 684 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules/
dist/
lib/h5p-standalone/
dist-tsc/
lib/h5p-standalone*
libraries.h5p
debian/.debhelper/
debian/debhelper-build-stamp
Expand Down
40 changes: 9 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,10 @@ npm install
npm start
```

3. Add reference to it on BigBlueButton's `settings.yml`:

```yaml
plugins:
- name: H5pPlugin
url: http://127.0.0.1:4701/static/H5pPlugin.js
dataChannels:
- name: jsonContent
pushPermission: ['moderator','presenter']
replaceOrDeletePermission: ['moderator', 'crerator', 'presenter']
- name: testResult
pushPermission: ['all']
replaceOrDeletePermission: ['moderator', 'creator']
3. Send create call with the following parameter:

```
pluginManifests=[{"url":"http://172.17.0.1:4701/manifest.json"}]
```

## Building and installing the Plugin
Expand All @@ -97,7 +88,7 @@ npm install
npm run build-bundle
```

The above command will generate the `dist` folder containing the bundled JavaScript file named `H5pPlugin.js`. This file can be hosted on any HTTPS server.
The above commands will generate the `dist` folder containing the bundled JavaScript file named `H5pPlugin.js`. This file can be hosted on any HTTPS server.

Preferebly, that bundled js file is placed into the Bigbluebutton's assets portion of the server, so for that, do the following:

Expand All @@ -108,23 +99,10 @@ cp H5pPlugin.js /var/www/bigbluebutton-default/assets/plugins/plugin-h5p/

This will make this plugin available on `https://<your-host>/plugins/plugin-h5p/H5pPlugin.js`

To use the plugin with BigBlueButton, add the plugin's URL to `settings.yml` as shown below:

```yaml
public:
app:
... // All app configurations
plugins:
- name: H5pPlugin
url: <<PLUGIN_URL>>
dataChannels:
- name: jsonContent
pushPermission: ['moderator','presenter']
replaceOrDeletePermission: ['moderator', 'creator', 'presenter']
- name: testResult
pushPermission: ['all']
replaceOrDeletePermission: ['moderator', 'creator']
... // All other configurations
To use the plugin with BigBlueButton, add the plugin's manifest URL to the parameter as shown below:

```
pluginManifests=[{"url":"http://<yourdomain>/path/to/manifest.json"}]
```

## How to use it?
Expand Down
17 changes: 17 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"requiredSdkVersion": "~0.0.59",
"name": "H5pPlugin",
"javascriptEntrypointUrl": "H5pPlugin.js",
"dataChannels": [
{
"name": "jsonContent",
"pushPermission": ["moderator", "presenter"],
"replaceOrDeletePermission": ["creator", "moderator"]
},
{
"name": "testResult",
"pushPermission": ["all"],
"replaceOrDeletePermission": ["creator", "moderator"]
}
]
}
Loading

0 comments on commit c5aa17e

Please sign in to comment.