Skip to content

Commit

Permalink
Revert "feat(plugin): asset persistence" (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
TiagoJacobs authored Feb 6, 2025
1 parent 4dfbc6c commit 210ae32
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 81 deletions.
6 changes: 1 addition & 5 deletions samples/sample-action-button-dropdown-plugin/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@
"name": "SampleActionButtonDropdownPlugin",
"javascriptEntrypointUrl": "SampleActionButtonDropdownPlugin.js",
"localesBaseUrl": "https://cdn.dominio.com/pluginabc/",
"assetPersistence": {
"enabled": true,
"maxFileSize": 10000000,
"maxUploadSizePerUser": 100000000
}
"enabledForBreakoutRooms": true
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import { useState, useEffect } from 'react';
import { AssetType } from 'bigbluebutton-html-plugin-sdk/dist/cjs/asset-persistence/enums';
import * as ReactModal from 'react-modal';
import './style.css';

Expand Down Expand Up @@ -50,22 +49,13 @@ function SampleActionButtonDropdownPlugin(
IsMeetingBreakoutGraphqlResponse>(IS_MEETING_BREAKOUT);

useEffect(() => {
// This line is commented once it will upload a
// PDF everytime you enter a meeting
// (if you have presenter role).
// Uncomment them to test this feature!
pluginApi.persistAsset(
'https://pdfobject.com/pdf/sample.pdf',
AssetType.PRESENTATION,
'my-presentation.pdf',
);
pluginApi.uiCommands.notification.send({
message: 'Notification message',
icon: 'presentation',
type: NotificationTypeUiCommand.INFO,
options: {
// helpLabel: 'test help label', // this is not necessary
// helpLink: 'test help link',
// helpLabel: 'teste help label', // this is not necessary
// helpLink: 'teste help link',
autoClose: 20000,
},
content: 'Content of my notification',
Expand Down
7 changes: 0 additions & 7 deletions src/asset-persistence/enums.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/asset-persistence/hook.ts

This file was deleted.

14 changes: 0 additions & 14 deletions src/asset-persistence/types.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/core/api/BbbPluginSdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ import { sendGenericDataForLearningAnalyticsDashboard } from '../../learning-ana
import { GenericDataForLearningAnalyticsDashboard } from '../../learning-analytics-dashboard/types';
import { getRemoteData } from '../../remote-data/utils';
import { persistEventFunctionWrapper } from '../../event-persistence/hooks';
import { persistAssetFunctionWrapper } from '../../asset-persistence/hook';
import { AssetType } from '../../asset-persistence/enums';

declare const window: PluginBrowserWindow;

Expand Down Expand Up @@ -125,16 +123,6 @@ export abstract class BbbPluginSdk {
eventName,
payload,
);
pluginApi.persistAsset = (
assetUrl: string,
typeOfAsset: AssetType,
assetName?: string,
) => persistAssetFunctionWrapper(
pluginName,
assetUrl,
typeOfAsset,
assetName,
);
} else {
throw new Error('Plugin name not set');
}
Expand Down
8 changes: 0 additions & 8 deletions src/core/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { UseUserCameraDomElementsFunction } from '../../dom-element-manipulation
import { ScreenshareHelperInterface, UserCameraHelperInterface } from '../../extensible-areas';
import { GetDataSource } from '../../remote-data/types';
import { PersistEventFunction } from '../../event-persistence/types';
import { PersistAssetFunction } from '../../asset-persistence/types';

// Setter Functions for the API
export type SetPresentationToolbarItems = (presentationToolbarItem:
Expand Down Expand Up @@ -260,13 +259,6 @@ export interface PluginApi {
*
*/
persistEvent?: PersistEventFunction;
/**
* Persists assets to the current meeting, e.g.: presentation.
*
* @param payload - payload to be persisted in `events.xml`
*
*/
persistAsset?: PersistAssetFunction;
}

export interface PluginBrowserWindow extends Window {
Expand Down

0 comments on commit 210ae32

Please sign in to comment.