File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "requiredSdkVersion" : " ~0.0.73" ,
33 "name" : " <plugin-name>" ,
44 "javascriptEntrypointUrl" : " <plugin-name>.js" ,
5- "localesBaseUrl" : " https://cdn.dominio.com/pluginabc/ "
5+ "localesBaseUrl" : " locales "
66}
Original file line number Diff line number Diff line change 1+ import * as React from 'react' ;
2+ import * as ReactDOM from 'react-dom/client' ;
3+ import MainComponent from './main/component' ;
4+
5+ const uuid = document . currentScript ?. getAttribute ( 'uuid' ) || 'root' ;
6+
7+ const pluginName = document . currentScript ?. getAttribute ( 'pluginName' ) || 'plugin' ;
8+
9+ const root = ReactDOM . createRoot ( document . getElementById ( uuid ) ) ;
10+ root . render (
11+ < MainComponent { ...{
12+ pluginUuid : uuid ,
13+ pluginName,
14+ } }
15+ /> ,
16+ ) ;
Original file line number Diff line number Diff line change 1+ import * as React from 'react' ;
2+
3+ import { BbbPluginSdk , PluginApi } from 'bigbluebutton-html-plugin-sdk' ;
4+
5+ interface MainComponentProps {
6+ pluginUuid : string ;
7+ }
8+
9+ function MainComponent (
10+ { pluginUuid : uuid } : MainComponentProps ,
11+ ) : React . ReactElement < MainComponentProps > {
12+ BbbPluginSdk . initialize ( uuid ) ;
13+ const pluginApi : PluginApi = BbbPluginSdk . getPluginApi ( uuid ) ;
14+
15+ console . log ( 'hello world' , pluginApi ) ;
16+
17+ return null ;
18+ }
19+
20+ export default MainComponent ;
You can’t perform that action at this time.
0 commit comments