diff --git a/manifest.json b/manifest.json index 58c00fd..3a8e704 100644 --- a/manifest.json +++ b/manifest.json @@ -2,5 +2,5 @@ "requiredSdkVersion": "~0.0.73", "name": "", "javascriptEntrypointUrl": ".js", - "localesBaseUrl": "https://cdn.dominio.com/pluginabc/" + "localesBaseUrl": "locales" } diff --git a/src/index.tsx b/src/index.tsx index e69de29..b4a4925 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -0,0 +1,16 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom/client'; +import MainComponent from './main/component'; + +const uuid = document.currentScript?.getAttribute('uuid') || 'root'; + +const pluginName = document.currentScript?.getAttribute('pluginName') || 'plugin'; + +const root = ReactDOM.createRoot(document.getElementById(uuid)); +root.render( + , +); diff --git a/src/main/component.tsx b/src/main/component.tsx new file mode 100644 index 0000000..8b20d39 --- /dev/null +++ b/src/main/component.tsx @@ -0,0 +1,20 @@ +import * as React from 'react'; + +import { BbbPluginSdk, PluginApi } from 'bigbluebutton-html-plugin-sdk'; + +interface MainComponentProps { + pluginUuid: string; +} + +function MainComponent( + { pluginUuid: uuid }: MainComponentProps, +): React.ReactElement { + BbbPluginSdk.initialize(uuid); + const pluginApi: PluginApi = BbbPluginSdk.getPluginApi(uuid); + + console.log('hello world', pluginApi); + + return null; +} + +export default MainComponent;