Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add new manifest structure to h5p-plugin #10

Merged
merged 6 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading