Skip to content
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ The data-channel name must be in the `manifest.json` along with all the permissi
{
"name": "channel-name",
"pushPermission": ["moderator","presenter"],
"replaceOrDeletePermission": ["moderator", "sender"]
"replaceOrDeletePermission": ["moderator", "creator"]
}
]
}
Expand Down
37 changes: 17 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
PluginApi, UsersBasicInfoResponseFromGraphqlWrapper,
pluginLogger,
} from 'bigbluebutton-html-plugin-sdk';

import { SampleActionsBarPluginProps } from './types';

function SampleActionsBarPlugin({
Expand Down
18 changes: 15 additions & 3 deletions samples/sample-data-channel-plugin/manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
{
"requiredSdkVersion": "~0.0.59",
"name": "SampleDataChannelPlugin",
"version": "0.0.8-beta1",
"javascriptEntrypointUrl": "SampleDataChannelPlugin.js",
"localesBaseUrl": "https://cdn.dominio.com/pluginabc/",
"dataChannels":[
"loggerSettings": {
"console": {
"level": "error"
}
},
"dataChannels": [
{
"name": "public-channel",
"pushPermission": ["moderator","presenter"],
"replaceOrDeletePermission": ["moderator", "sender"]
"pushPermission": [
"moderator",
"presenter"
],
"replaceOrDeletePermission": [
"moderator",
"creator"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { useEffect } from 'react';
import {
BbbPluginSdk,
PluginApi,
pluginLogger,
PresentationDropdownInterface,
PresentationDropdownOption,
PresentationDropdownSeparator,
pluginLogger,
} from 'bigbluebutton-html-plugin-sdk';
import { SamplePresentationDropdownPluginProps } from './types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { useEffect } from 'react';
import {
BbbPluginSdk,
PluginApi,
pluginLogger,
ScreenshareHelperItemPosition,
ScreenshareHelperButton,
pluginLogger,
} from 'bigbluebutton-html-plugin-sdk';
import { SampleUserCameraDropdownPluginProps } from './types';

function SampleUserCameraDropdownPlugin({ pluginUuid: uuid }: SampleUserCameraDropdownPluginProps):
React.ReactElement<SampleUserCameraDropdownPluginProps> {
React.ReactElement<SampleUserCameraDropdownPluginProps> {
BbbPluginSdk.initialize(uuid);
const pluginApi: PluginApi = BbbPluginSdk.getPluginApi(uuid);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { SampleUiEventsPluginProps } from './types';

function SampleUiEventsPlugin({ pluginUuid: uuid }: SampleUiEventsPluginProps):
React.ReactElement<SampleUiEventsPluginProps> {
React.ReactElement<SampleUiEventsPluginProps> {
BbbPluginSdk.initialize(uuid);
const pluginApi: PluginApi = BbbPluginSdk.getPluginApi(uuid);
const userListOpened = pluginApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { SampleUseMeetingPluginProps } from './types';

function SampleUseMeetingPlugin({ pluginUuid: uuid }: SampleUseMeetingPluginProps):
React.ReactElement<SampleUseMeetingPluginProps> {
React.ReactElement<SampleUseMeetingPluginProps> {
BbbPluginSdk.initialize(uuid);
const pluginApi: PluginApi = BbbPluginSdk.getPluginApi(uuid);
const meetingInfoGraphqlResponse = pluginApi.useMeeting();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { useEffect } from 'react';
import {
BbbPluginSdk,
PluginApi,
pluginLogger,
UserCameraDropdownOption,
UserCameraDropdownSeparator,
pluginLogger,
} from 'bigbluebutton-html-plugin-sdk';
import { SampleUserCameraDropdownPluginProps, VideoStreamsSubscriptionResultType } from './types';
import { VIDEO_STREAMS_SUBSCRIPTION } from '../queries';

function SampleUserCameraDropdownPlugin({ pluginUuid: uuid }: SampleUserCameraDropdownPluginProps):
React.ReactElement<SampleUserCameraDropdownPluginProps> {
React.ReactElement<SampleUserCameraDropdownPluginProps> {
BbbPluginSdk.initialize(uuid);
const pluginApi: PluginApi = BbbPluginSdk.getPluginApi(uuid);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { useEffect } from 'react';
import {
BbbPluginSdk,
PluginApi,
pluginLogger,
UserCameraHelperButton,
UserCameraHelperItemPosition,
pluginLogger,
} from 'bigbluebutton-html-plugin-sdk';
import { SampleUserCameraHelperPluginProps, VideoStreamsSubscriptionResultType } from './types';
import { VIDEO_STREAMS_SUBSCRIPTION } from '../queries';

function SampleUserCameraHelperPlugin({ pluginUuid: uuid }: SampleUserCameraHelperPluginProps):
React.ReactElement<SampleUserCameraHelperPluginProps> {
React.ReactElement<SampleUserCameraHelperPluginProps> {
BbbPluginSdk.initialize(uuid);
const pluginApi: PluginApi = BbbPluginSdk.getPluginApi(uuid);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { useEffect } from 'react';
import {
BbbPluginSdk,
PluginApi,
pluginLogger,
UserListDropdownFixedContentInformation,
UserListDropdownInterface,
UserListDropdownOption,
UserListDropdownSeparator,
pluginLogger,
} from 'bigbluebutton-html-plugin-sdk';
import { SampleUserListDropdownPluginProps } from './types';

Expand All @@ -21,48 +21,48 @@ function SampleUserListDropdownPlugin({
useEffect(() => {
if (loadedUserList !== undefined && loadedUserList.length > 0) {
const listOfInformationToSend:
Array<UserListDropdownInterface> = loadedUserList.map(
(user) => {
const buttonToUserListItem:
UserListDropdownInterface = new UserListDropdownFixedContentInformation({
label: 'Warning test',
iconRight: 'warning',
userId: user.userId,
textColor: 'red',
allowed: true,
});
return buttonToUserListItem as UserListDropdownInterface;
},
);
Array<UserListDropdownInterface> = loadedUserList.map(
(user) => {
const buttonToUserListItem:
UserListDropdownInterface = new UserListDropdownFixedContentInformation({
label: 'Warning test',
iconRight: 'warning',
userId: user.userId,
textColor: 'red',
allowed: true,
});
return buttonToUserListItem as UserListDropdownInterface;
},
);

const listOfOptionsToSend:
Array<UserListDropdownInterface> = loadedUserList.map(
(user) => {
const buttonToUserListItem:
UserListDropdownInterface = new UserListDropdownOption({
label: 'Click to log something in the console',
icon: 'user',
userId: user.userId,
tooltip: 'This will log something in the console',
allowed: true,
onClick: () => {
pluginLogger.info('Log from sample user-list-dropdown-plugin');
},
});
return buttonToUserListItem as UserListDropdownInterface;
},
);
Array<UserListDropdownInterface> = loadedUserList.map(
(user) => {
const buttonToUserListItem:
UserListDropdownInterface = new UserListDropdownOption({
label: 'Click to log something in the console',
icon: 'user',
userId: user.userId,
tooltip: 'This will log something in the console',
allowed: true,
onClick: () => {
pluginLogger.info('Log from sample user-list-dropdown-plugin');
},
});
return buttonToUserListItem as UserListDropdownInterface;
},
);

const listOfDropdownsToSend:
Array<UserListDropdownInterface> = loadedUserList.map(
(user) => {
const dropdownToUserListItem:
UserListDropdownInterface = new UserListDropdownSeparator({
userId: user.userId,
});
return dropdownToUserListItem as UserListDropdownInterface;
},
);
Array<UserListDropdownInterface> = loadedUserList.map(
(user) => {
const dropdownToUserListItem:
UserListDropdownInterface = new UserListDropdownSeparator({
userId: user.userId,
});
return dropdownToUserListItem as UserListDropdownInterface;
},
);
pluginApi.setUserListDropdownItems(
[...listOfInformationToSend, ...listOfDropdownsToSend, ...listOfOptionsToSend],
);
Expand Down
1 change: 0 additions & 1 deletion src/core/api/BbbPluginSdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ export abstract class BbbPluginSdk {
localesBaseUrl,
};
}

return window.bbb_plugins[uuid];
}
}
26 changes: 26 additions & 0 deletions src/core/api/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Logger } from 'browser-bunyan';
import { UiCommands } from '../../ui-commands/types';
import { UseChatMessageDomElementsFunction } from '../../dom-element-manipulation/chat/message/types';
import { ActionButtonDropdownInterface } from '../../extensible-areas/action-button-dropdown-item/types';
Expand Down Expand Up @@ -308,13 +309,38 @@ export interface PluginApi {
*
*/
persistEvent?: PersistEventFunction;
/**
* Function used to log in the console.
*/
logger?: Logger;
}

export interface Console {
enabled: boolean
level: string
}

export interface External {
enabled: boolean
level: string
url: string
method: string
throttleInterval: number
flushOnClose: boolean
logTag: string
}

export interface ClientLog {
console: Console
external: External
}

export interface MeetingClientSettings {
public: {
app: {
bbbWebBase: string;
}
clientLog: ClientLog;
}
}

Expand Down
Loading