Support the 0.1.x plugin SDK and move the option to the media area (BigBlueButton 4.0) - #21
Open
imdt-claudiop wants to merge 2 commits into
Open
Support the 0.1.x plugin SDK and move the option to the media area (BigBlueButton 4.0)#21imdt-claudiop wants to merge 2 commits into
imdt-claudiop wants to merge 2 commits into
Conversation
…ton 4.0) Pin the build to the SDK that BigBlueButton 4.0 currently ships (0.1.26) and widen requiredSdkVersion to ^0.1.5, so the plugin also loads on 4.0 servers running an earlier 0.1.x SDK instead of being rejected at load time. Co-Authored-By: Guilherme Leme <leme.guilherme.p@gmail.com>
The action button dropdown extensible area was removed in the 0.1.x plugin SDK,
so 'setActionButtonDropdownItems' and 'ActionButtonDropdownOption' no longer
exist and the plugin does not build against 0.1.24. Register the option through
'setMediaAreaItems' with 'MediaAreaOption' instead, which is where this kind of
content sharing option lives in BigBlueButton 4.0.
The icon is now passed as an object ('{ iconName: 'copy' }'): in 0.1.x the icon
accepts either a built in icon name or raw svg content, and a bare string is
treated as svg, which renders an empty icon.
The separator was dropped rather than ported: the 4.0 client only renders media
area items of type OPTION, so a separator would never be displayed.
Co-Authored-By: Guilherme Leme <leme.guilherme.p@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
BigBlueButton 4.0 ships version 0.1.26 of the plugin SDK. The server compares that
version against the
requiredSdkVersiondeclared in the plugin manifest and refuses toload anything that does not match, so on a 4.0 server this plugin is rejected before its
bundle is ever fetched:
This is the
v0.1.xline, which is the one that targets the 0.1.x SDK, so this makes the plugin load and work on BigBlueButton 4.0.On top of the version gate, this plugin does not even compile against 0.1.26: the action button dropdown extensible area was removed from the SDK, so
ActionButtonDropdownOption,ActionButtonDropdownSeparatorandsetActionButtonDropdownItemsno longer exist.What changed
manifest.json:requiredSdkVersionfrom~0.0.84to^0.1.5package.jsonandpackage-lock.json:bigbluebutton-html-plugin-sdkfrom0.0.93to0.1.26setMediaAreaItemswithMediaAreaOption, which is where this kind of content sharing option lives in 4.0{ iconName: 'copy' }). In 0.1.x the icon accepts either a built in icon name or raw svg content, and a bare string is treated as svg, which renders an empty icon.OPTION, so a separator would never be displayed. This is a deliberate choice and easy to revisit if you would rather keep it.The plugin version itself was deliberately left alone. It is cut by the
publish-tagworkflow, which also updatespackage.jsonandpackage-lock.json, so it belongs to the release process rather than to this change.How to test
manifest.jsonanddist/BbbPluginH5p.jsfrom a URL the BigBlueButton server can reach. They have to sit next to each other, sincejavascriptEntrypointUrlis relative.Play H5Pon the presentation toolbar. TheRemove H5P from presentation areaoption is then listed in theMEDIA SHARINGpanel.bbb_graphqldatabase:loadFailureReasonmust be empty for this plugin.Validation
Checked against a BigBlueButton 4.0 server built from source on
v4.0.x-developat commit 93bc4864ab, shipping plugin SDK 0.1.24, with the plugin attached per meeting:npx tscandnpm run lintboth run clean locally, matching what the pull request workflows runloadFailureReasonand the client reports no page errorRe-verified after moving to SDK 0.1.26, on the pushed head:
npm ci,npx tsc,npm run lintandnpm run build-bundleall run clean, and the lock resolves the SDK to exactly 0.1.26.Notes
requiredSdkVersionis set to^0.1.5, so any 0.1.x SDK from 0.1.5 up is accepted. The build pins 0.1.26, the SDK that 4.0 currently ships, while the wider floor also lets the plugin load on 4.0 servers that are still on an earlier 0.1.x SDK. Caret rather than tilde because on a0.xfloor the two operators accept exactly the same versions, and caret is the one that still expresses the intended range once the SDK reaches 1.0.0; note that^0.1.5by itself does not admit a 1.0.0 SDK.Co-authored with Guilherme Leme, who created the
v0.1.xbranches for these plugins.