Skip to content

Commit b0bded8

Browse files
committed
feat: move video.js to peer dependencies
`video.js` is no longer bundled with pillarbox-web and must be installed by the consuming project. Previously, `pillarbox-web` declared `video.js` as a regular dependency with a fixed version. This caused issues in projects that also included other `video.js` plugins or UI components, as multiple conflicting instances of `video.js` could be installed, leading to runtime errors and unexpected behavior. By making `video.js` a peer dependency, we ensure that only one instance is used in the final bundle, allowing integrators to manage the version themselves and avoid conflicts. This approach is more flexible and consistent with the fact that integrators are responsible for providing their own UI components. We continue to hardcode the `videojs-contrib-eme` plugin to ensure consistent DRM behavior across implementations. The recommended and tested version of `video.js` remains `8.21.0` at this moment, the documentation has been updated to reflect this.
1 parent 7e141a6 commit b0bded8

File tree

4 files changed

+8661
-9394
lines changed

4 files changed

+8661
-9394
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,19 @@ experience of SRGSSR content, making it more accessible and feature-rich.
1010

1111
## Quick Start
1212

13-
To get started with Pillarbox, install it through the following command:
13+
To get started with Pillarbox, install it along with `video.js` using the following command:
1414

1515
```bash
16-
npm install --save @srgssr/pillarbox-web
16+
npm install --save @srgssr/pillarbox-web video.js@8.21.0
1717
```
1818

19+
> [!NOTE]
20+
> `video.js` is now a peer dependency and must be installed by the project that bundles Pillarbox.
21+
> Version 8.21.0 is the version we use to test the player and is the one we recommend.
22+
>
23+
> This approach is more flexible and consistent with the fact that integrators are responsible for
24+
> providing their own UI components.
25+
1926
In your HTML file, add the following code to initialize Pillarbox:
2027

2128
```html

docs/api/index.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ Video.js.
55

66
## Quick Guide
77

8-
To get started with Pillarbox, install it through the following command:
8+
9+
To get started with Pillarbox, install it along with `video.js` using the following command:
910

1011
```bash
11-
npm install --save @srgssr/pillarbox-web
12+
npm install --save @srgssr/pillarbox-web video.js@8.21.0
1213
```
1314

15+
> [!NOTE]
16+
> `video.js` is now a peer dependency and must be installed by the project that bundles Pillarbox.
17+
> Version 8.21.0 is the version we use to test the player and is the one we recommend.
18+
>
19+
> This approach is more flexible and consistent with the fact that integrators are responsible for
20+
> providing their own UI components.
21+
1422
In your HTML file, add the following code to initialize Pillarbox:
1523

1624
```html

0 commit comments

Comments
 (0)