@mottosports/motto-video-player 1.0.1-rc.66 → 1.0.1-rc.67

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/dist/index.mjs CHANGED
@@ -1185,7 +1185,7 @@ var supportsWidevinePersistentLicenses = () => {
1185
1185
  import initShakaPlayerMux from "@mux/mux-data-shakaplayer";
1186
1186
 
1187
1187
  // package.json
1188
- var version = "1.0.1-rc.66";
1188
+ var version = "1.0.1-rc.67";
1189
1189
 
1190
1190
  // src/utils/licenseCache.ts
1191
1191
  var PERSISTENT_LICENSE_PREFIX = "motto_lic_";
@@ -1511,13 +1511,19 @@ var useShakaPlayer = ({
1511
1511
  const netEngine = player.getNetworkingEngine();
1512
1512
  if (netEngine) {
1513
1513
  netEngine.registerRequestFilter((type, request) => {
1514
- if (type === shaka.net.NetworkingEngine.RequestType.LICENSE) {
1515
- if (publicKey) {
1516
- request.headers["authorization"] = `Bearer ${publicKey}`;
1517
- }
1518
- if (mottoToken) {
1519
- request.headers["x-motto-token"] = mottoToken;
1520
- }
1514
+ switch (type) {
1515
+ case shaka.net.NetworkingEngine.RequestType.LICENSE:
1516
+ if (publicKey) {
1517
+ request.headers["authorization"] = `Bearer ${publicKey}`;
1518
+ }
1519
+ if (mottoToken) {
1520
+ request.headers["x-motto-token"] = mottoToken;
1521
+ }
1522
+ break;
1523
+ case shaka.net.NetworkingEngine.RequestType.MANIFEST:
1524
+ case shaka.net.NetworkingEngine.RequestType.SEGMENT:
1525
+ request.allowCrossSiteCredentials = true;
1526
+ break;
1521
1527
  }
1522
1528
  });
1523
1529
  netEngine.registerResponseFilter((type, response) => {