@srgssr/pillarbox-web 1.23.1 → 1.23.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,13 +19,14 @@ npm install --save @srgssr/pillarbox-web video.js@8.21.0
19
19
  > [!NOTE]
20
20
  > `video.js` is now a peer dependency and must be installed by the project that bundles Pillarbox.
21
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
22
+ >
23
+ > This approach is more flexible and consistent with the fact that integrators are responsible for
24
24
  > providing their own UI components.
25
25
 
26
26
  In your HTML file, add the following code to initialize Pillarbox:
27
27
 
28
28
  ```html
29
+
29
30
  <video-js id="my-player" class="pillarbox-js" controls></video-js>
30
31
  ```
31
32
 
@@ -44,6 +45,9 @@ const player = pillarbox('my-player', {/* options... */ });
44
45
  player.src({ src: 'urn:swi:video:48115940', type: 'srgssr/urn' });
45
46
  ```
46
47
 
48
+ For examples of integrating Pillarbox with popular frameworks, check out this collection of
49
+ [samples][pillarbox-samples].
50
+
47
51
  ## CDN Integration
48
52
 
49
53
  Pillarbox is an open-source project published as a public NPM package. You can easily include it in
@@ -67,6 +71,8 @@ To integrate Pillarbox Web via CDN, you can include it in your HTML like this:
67
71
  </script>
68
72
  ```
69
73
 
74
+ Try the sample live on StackBlitz: [Open in StackBlitz][stackblitz-umd]
75
+
70
76
  You can also use a different CDN or host the file yourself.
71
77
 
72
78
  > [!NOTE]
@@ -75,6 +81,11 @@ You can also use a different CDN or host the file yourself.
75
81
  > The UMD bundle also exposes `video.js` as a global variable, allowing you to use both and internal
76
82
  > extensions as needed.
77
83
 
84
+ ### ESM integration from a CDN
85
+
86
+ If you’d like to load Pillarbox from a CDN while taking advantage of modern ES module packages,
87
+ check out this tutorial: [ESM and import maps][esm-tutorial]
88
+
78
89
  ## Documentation
79
90
 
80
91
  For detailed information on how to use the Pillarbox Web Player, checkout
@@ -150,8 +161,7 @@ To contribute to the theme editor go to: https://github.com/SRGSSR/pillarbox-web
150
161
 
151
162
  See the [LICENSE](LICENSE) file for more information.
152
163
 
153
- [token-settings]: https://github.com/settings/tokens
154
-
155
- [token-guide]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-with-a-personal-access-token
156
-
157
164
  [js-deliver]: https://www.jsdelivr.com/package/npm/@srgssr/pillarbox-web
165
+ [stackblitz-umd]: https://stackblitz.com/github/srgssr/pillarbox-web-demo/tree/main/samples/umd
166
+ [esm-tutorial]: https://web.pillarbox.ch/api/tutorial-ESM%20and%20import%20maps.html
167
+ [pillarbox-samples]: https://github.com/SRGSSR/pillarbox-web-demo/tree/main/samples
@@ -3,7 +3,7 @@
3
3
  const videojs = require('video.js');
4
4
  require('videojs-contrib-eme');
5
5
 
6
- const version = "1.23.0";
6
+ const version = "1.23.2";
7
7
 
8
8
  /** @import VJSPlayer from 'video.js/dist/types/player' */
9
9
  /** @import AudioTrack from 'video.js/dist/types/tracks/audio-track' */
@@ -1,7 +1,7 @@
1
1
  import videojs from 'video.js';
2
2
  import 'videojs-contrib-eme';
3
3
 
4
- const version = "1.23.0";
4
+ const version = "1.23.2";
5
5
 
6
6
  /** @import VJSPlayer from 'video.js/dist/types/player' */
7
7
  /** @import AudioTrack from 'video.js/dist/types/tracks/audio-track' */
@@ -94,7 +94,7 @@ function _toPropertyKey(t) {
94
94
  return "symbol" == typeof i ? i : i + "";
95
95
  }
96
96
 
97
- const version = "1.23.0";
97
+ const version = "1.23.2";
98
98
 
99
99
  /** @import VJSPlayer from 'video.js/dist/types/player' */
100
100
  /** @import AudioTrack from 'video.js/dist/types/tracks/audio-track' */
@@ -90,7 +90,7 @@ function _toPropertyKey(t) {
90
90
  return "symbol" == typeof i ? i : i + "";
91
91
  }
92
92
 
93
- const version = "1.23.0";
93
+ const version = "1.23.2";
94
94
 
95
95
  /** @import VJSPlayer from 'video.js/dist/types/player' */
96
96
  /** @import AudioTrack from 'video.js/dist/types/tracks/audio-track' */
@@ -93,7 +93,7 @@
93
93
  return "symbol" == typeof i ? i : i + "";
94
94
  }
95
95
 
96
- const version$8 = "1.23.0";
96
+ const version$8 = "1.23.2";
97
97
 
98
98
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
99
99
 
@@ -68964,7 +68964,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
68964
68964
  videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError);
68965
68965
  }
68966
68966
 
68967
- /*! @name videojs-contrib-eme @version 5.5.1 @license Apache-2.0 */
68967
+ /*! @name videojs-contrib-eme @version 5.5.2 @license Apache-2.0 */
68968
68968
 
68969
68969
  const stringToUint16Array = string => {
68970
68970
  // 2 bytes for each char
@@ -70172,7 +70172,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
70172
70172
  });
70173
70173
  };
70174
70174
 
70175
- var version = "5.5.1";
70175
+ var version = "5.5.2";
70176
70176
 
70177
70177
  const hasSession = (sessions, initData) => {
70178
70178
  for (let i = 0; i < sessions.length; i++) {
@@ -70218,7 +70218,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
70218
70218
  // This can be initialized manually with initLegacyFairplay().
70219
70219
 
70220
70220
 
70221
- if (options.keySystems[LEGACY_FAIRPLAY_KEY_SYSTEM]) {
70221
+ if (options.keySystems[LEGACY_FAIRPLAY_KEY_SYSTEM] && window$4.WebKitMediaKeys && player.eme.legacyFairplayIsUsed) {
70222
70222
  videojs.log.debug('eme', `Ignoring \'encrypted\' event, using legacy fairplay keySystem ${LEGACY_FAIRPLAY_KEY_SYSTEM}`);
70223
70223
  return Promise.resolve();
70224
70224
  }
@@ -70618,6 +70618,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
70618
70618
  }
70619
70619
  };
70620
70620
 
70621
+ player.eme.legacyFairplayIsUsed = true;
70621
70622
  let videoElement = player.tech_.el_; // Support Safari EME with FairPlay
70622
70623
  // (also used in early Chrome or Chrome with EME disabled flag)
70623
70624
 
@@ -70631,6 +70632,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
70631
70632
  videoElement.removeEventListener('webkitneedkey', webkitNeedKeyEventHandler);
70632
70633
  }
70633
70634
 
70635
+ player.eme.legacyFairplayIsUsed = false;
70634
70636
  videoElement = null;
70635
70637
  }; // auto-cleanup:
70636
70638
 
@@ -70641,6 +70643,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
70641
70643
  },
70642
70644
 
70643
70645
  detectSupportedCDMs,
70646
+ legacyFairplayIsUsed: false,
70644
70647
  options
70645
70648
  };
70646
70649
  }; // Register the plugin with video.js.