@mottosports/motto-video-player 1.0.1-rc.40 → 1.0.1-rc.41
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.js +9 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1159,7 +1159,7 @@ var isChrome64PlusOnMacOrWindows = () => {
|
|
|
1159
1159
|
import initShakaPlayerMux from "@mux/mux-data-shakaplayer";
|
|
1160
1160
|
|
|
1161
1161
|
// package.json
|
|
1162
|
-
var version = "1.0.1-rc.
|
|
1162
|
+
var version = "1.0.1-rc.41";
|
|
1163
1163
|
|
|
1164
1164
|
// src/utils/licenseCache.ts
|
|
1165
1165
|
var PERSISTENT_LICENSE_PREFIX = "motto_lic_";
|
|
@@ -1384,26 +1384,17 @@ var useShakaPlayer = ({
|
|
|
1384
1384
|
"com.widevine.alpha": {
|
|
1385
1385
|
...drmConfig2.advanced?.["com.widevine.alpha"],
|
|
1386
1386
|
// set to `persistent-license` only on Chrome 64+ on MacOS/Windows: https://shaka-player-demo.appspot.com/docs/api/tutorial-faq.html
|
|
1387
|
-
sessionType: isChrome64PlusOnMacOrWindows() ? "persistent-license" : "temporary"
|
|
1388
|
-
"headers": {
|
|
1389
|
-
"x-dt-auth-token": src.drm.token || ""
|
|
1390
|
-
}
|
|
1387
|
+
sessionType: isChrome64PlusOnMacOrWindows() ? "persistent-license" : "temporary"
|
|
1391
1388
|
},
|
|
1392
1389
|
"com.microsoft.playready": {
|
|
1393
1390
|
...drmConfig2.advanced?.["com.microsoft.playready"],
|
|
1394
|
-
sessionType: "temporary"
|
|
1391
|
+
sessionType: "temporary"
|
|
1395
1392
|
// PlayReady always uses temporary sessions
|
|
1396
|
-
"headers": {
|
|
1397
|
-
"x-dt-auth-token": src.drm.token || ""
|
|
1398
|
-
}
|
|
1399
1393
|
},
|
|
1400
1394
|
"com.apple.fps": {
|
|
1401
1395
|
...drmConfig2.advanced?.["com.apple.fps"],
|
|
1402
|
-
sessionType: "temporary"
|
|
1396
|
+
sessionType: "temporary"
|
|
1403
1397
|
// FairPlay always uses temporary sessions - Safari won't play with persistent-license
|
|
1404
|
-
"headers": {
|
|
1405
|
-
"x-dt-auth-token": src.drm.token || ""
|
|
1406
|
-
}
|
|
1407
1398
|
}
|
|
1408
1399
|
};
|
|
1409
1400
|
if (storedSessionsMetadata.length > 0) {
|
|
@@ -1417,6 +1408,11 @@ var useShakaPlayer = ({
|
|
|
1417
1408
|
player.configure({ drm: drmConfig2 });
|
|
1418
1409
|
const netEngine = player.getNetworkingEngine();
|
|
1419
1410
|
if (netEngine) {
|
|
1411
|
+
netEngine.registerRequestFilter((type, request) => {
|
|
1412
|
+
if (type === shaka.net.NetworkingEngine.RequestType.LICENSE) {
|
|
1413
|
+
request.headers["x-dt-auth-token"] = src.drm.token;
|
|
1414
|
+
}
|
|
1415
|
+
});
|
|
1420
1416
|
netEngine.registerResponseFilter((type, response) => {
|
|
1421
1417
|
if (type === shaka.net.NetworkingEngine.RequestType.LICENSE) {
|
|
1422
1418
|
const ks = player.keySystem && player.keySystem();
|