Skip to content

Commit

Permalink
allPlugins export added
Browse files Browse the repository at this point in the history
  • Loading branch information
ferserc1 committed Mar 21, 2024
1 parent bfe1b98 commit 7bcd61f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ let paella = new Paella('player-container', {
...
```

From version 1.44.7, you can also use the generic plugin array name to import all the plugins:

```js
import { allPlugins: basicPlugins } from 'paella-basic-plugins'
...
```

All the plugin libraries exports the `allPlugins` array. This is done in order to have a method to import all plugins using always the same name for all libraries.


**Step 2:** Configure the plugins you want to use in the paella player configuration.

```json
Expand Down
2 changes: 1 addition & 1 deletion dist/paella-basic-plugins.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/paella-basic-plugins.js.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paella-basic-plugins",
"version": "1.44.6",
"version": "1.44.7",
"description": "Basic plugins for Paella Player",
"main": "src/index.js",
"module": "dist/paella-basic-plugins.js",
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ export const basicPlugins = [
}
];

export const allPlugins = basicPlugins;

export const AudioSelectorButtonPlugin = AudioSelectorButton;
export const BackwardButtonPlugin = BackwardButton;
export const CaptionsSelectorButtonPlugin = CaptionsSelectorButton;
Expand Down

0 comments on commit 7bcd61f

Please sign in to comment.