@kkcompany/player 2.25.0-canary.3 → 2.25.0-canary.4
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/CHANGELOG.md +7 -0
- package/dist/core.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/modules.mjs +22 -7
- package/dist/react.mjs +22 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.25.0-canary.4](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.3...v2.25.0-canary.4) (2025-11-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* playback api response handling ([a159ff7](https://gitlab.kkinternal.com/playback/web-playcraft/commit/a159ff7a936f27dd06112c753d0454d053cbe047))
|
|
11
|
+
|
|
5
12
|
## [2.25.0-canary.3](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.2...v2.25.0-canary.3) (2025-11-21)
|
|
6
13
|
|
|
7
14
|
|
package/dist/core.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -7242,7 +7242,7 @@ $$2({ target: 'Array', proto: true, forced: FORCED }, {
|
|
|
7242
7242
|
function getVersion() {
|
|
7243
7243
|
try {
|
|
7244
7244
|
// eslint-disable-next-line no-undef
|
|
7245
|
-
return "2.25.0-canary.
|
|
7245
|
+
return "2.25.0-canary.4";
|
|
7246
7246
|
} catch (e) {
|
|
7247
7247
|
return undefined;
|
|
7248
7248
|
}
|
package/dist/index.mjs
CHANGED
package/dist/modules.mjs
CHANGED
|
@@ -21,7 +21,7 @@ const ignoreMinorError = async (event, {
|
|
|
21
21
|
retry,
|
|
22
22
|
retryTimes
|
|
23
23
|
} = {}) => {
|
|
24
|
-
var _event$response, _event$response2, _event$
|
|
24
|
+
var _event$response, _event$response2, _event$response3, _event$config;
|
|
25
25
|
|
|
26
26
|
console.warn(event);
|
|
27
27
|
|
|
@@ -30,17 +30,32 @@ const ignoreMinorError = async (event, {
|
|
|
30
30
|
return retry();
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
if (/start$|info$|heartbeat$/.test((_event$
|
|
33
|
+
if (/start$|info$|heartbeat$/.test((_event$response3 = event.response) === null || _event$response3 === void 0 ? void 0 : _event$response3.url)) {
|
|
34
34
|
return Promise.reject(event);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
if (/end$/.test((_event$
|
|
37
|
+
if (/end$/.test((_event$config = event.config) === null || _event$config === void 0 ? void 0 : _event$config.url)) {
|
|
38
38
|
return Promise.resolve();
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
console.log('Ignore non-critical playback API fail', event);
|
|
42
42
|
return new Promise(() => {});
|
|
43
43
|
};
|
|
44
|
+
/** @param {Response} response */
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
const handleFetchResponse = response => {
|
|
48
|
+
if (response.ok) {
|
|
49
|
+
return response.status === 200 ? response.json() : '';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return response.json().then(errorData => {
|
|
53
|
+
const error = new Error(`HTTP error status: ${response.status} ${errorData.message}`);
|
|
54
|
+
error.data = errorData;
|
|
55
|
+
error.response = response;
|
|
56
|
+
return Promise.reject(error);
|
|
57
|
+
});
|
|
58
|
+
};
|
|
44
59
|
|
|
45
60
|
const createApi = (config, {
|
|
46
61
|
onError = ignoreMinorError
|
|
@@ -68,7 +83,7 @@ const createApi = (config, {
|
|
|
68
83
|
} = {}) => handleRequestError(() => fetch(`${url}?${new URLSearchParams(params).toString()}`, {
|
|
69
84
|
method,
|
|
70
85
|
headers: getHeaders()
|
|
71
|
-
}).then(
|
|
86
|
+
}).then(handleFetchResponse), {
|
|
72
87
|
onError
|
|
73
88
|
});
|
|
74
89
|
|
|
@@ -82,7 +97,7 @@ const createApi = (config, {
|
|
|
82
97
|
}).toString()}`, {
|
|
83
98
|
method,
|
|
84
99
|
headers: getHeaders()
|
|
85
|
-
}).then(
|
|
100
|
+
}).then(handleFetchResponse), {
|
|
86
101
|
onError
|
|
87
102
|
});
|
|
88
103
|
|
|
@@ -505,7 +520,7 @@ const getSource = (sourceOptions, {
|
|
|
505
520
|
function getVersion() {
|
|
506
521
|
try {
|
|
507
522
|
// eslint-disable-next-line no-undef
|
|
508
|
-
return "2.25.0-canary.
|
|
523
|
+
return "2.25.0-canary.4";
|
|
509
524
|
} catch (e) {
|
|
510
525
|
return undefined;
|
|
511
526
|
}
|
|
@@ -1503,7 +1518,7 @@ const createAnalytics = ({
|
|
|
1503
1518
|
const logTarget = mapLogEvents({
|
|
1504
1519
|
video,
|
|
1505
1520
|
playerName: 'shaka',
|
|
1506
|
-
version: "2.25.0-canary.
|
|
1521
|
+
version: "2.25.0-canary.4"
|
|
1507
1522
|
});
|
|
1508
1523
|
logTarget.all((type, data) => {
|
|
1509
1524
|
const payload = {
|
package/dist/react.mjs
CHANGED
|
@@ -296,7 +296,7 @@ function convertToSeconds(timeString) {
|
|
|
296
296
|
function getVersion() {
|
|
297
297
|
try {
|
|
298
298
|
// eslint-disable-next-line no-undef
|
|
299
|
-
return "2.25.0-canary.
|
|
299
|
+
return "2.25.0-canary.4";
|
|
300
300
|
} catch (e) {
|
|
301
301
|
return undefined;
|
|
302
302
|
}
|
|
@@ -10486,7 +10486,7 @@ const ignoreMinorError = async (event, {
|
|
|
10486
10486
|
retry,
|
|
10487
10487
|
retryTimes
|
|
10488
10488
|
} = {}) => {
|
|
10489
|
-
var _event$response, _event$response2, _event$
|
|
10489
|
+
var _event$response, _event$response2, _event$response3, _event$config;
|
|
10490
10490
|
|
|
10491
10491
|
console.warn(event);
|
|
10492
10492
|
|
|
@@ -10495,17 +10495,32 @@ const ignoreMinorError = async (event, {
|
|
|
10495
10495
|
return retry();
|
|
10496
10496
|
}
|
|
10497
10497
|
|
|
10498
|
-
if (/start$|info$|heartbeat$/.test((_event$
|
|
10498
|
+
if (/start$|info$|heartbeat$/.test((_event$response3 = event.response) === null || _event$response3 === void 0 ? void 0 : _event$response3.url)) {
|
|
10499
10499
|
return Promise.reject(event);
|
|
10500
10500
|
}
|
|
10501
10501
|
|
|
10502
|
-
if (/end$/.test((_event$
|
|
10502
|
+
if (/end$/.test((_event$config = event.config) === null || _event$config === void 0 ? void 0 : _event$config.url)) {
|
|
10503
10503
|
return Promise.resolve();
|
|
10504
10504
|
}
|
|
10505
10505
|
|
|
10506
10506
|
console.log('Ignore non-critical playback API fail', event);
|
|
10507
10507
|
return new Promise(() => {});
|
|
10508
10508
|
};
|
|
10509
|
+
/** @param {Response} response */
|
|
10510
|
+
|
|
10511
|
+
|
|
10512
|
+
const handleFetchResponse = response => {
|
|
10513
|
+
if (response.ok) {
|
|
10514
|
+
return response.status === 200 ? response.json() : '';
|
|
10515
|
+
}
|
|
10516
|
+
|
|
10517
|
+
return response.json().then(errorData => {
|
|
10518
|
+
const error = new Error(`HTTP error status: ${response.status} ${errorData.message}`);
|
|
10519
|
+
error.data = errorData;
|
|
10520
|
+
error.response = response;
|
|
10521
|
+
return Promise.reject(error);
|
|
10522
|
+
});
|
|
10523
|
+
};
|
|
10509
10524
|
|
|
10510
10525
|
const createApi = (config, {
|
|
10511
10526
|
onError = ignoreMinorError
|
|
@@ -10533,7 +10548,7 @@ const createApi = (config, {
|
|
|
10533
10548
|
} = {}) => handleRequestError(() => fetch(`${url}?${new URLSearchParams(params).toString()}`, {
|
|
10534
10549
|
method,
|
|
10535
10550
|
headers: getHeaders()
|
|
10536
|
-
}).then(
|
|
10551
|
+
}).then(handleFetchResponse), {
|
|
10537
10552
|
onError
|
|
10538
10553
|
});
|
|
10539
10554
|
|
|
@@ -10547,7 +10562,7 @@ const createApi = (config, {
|
|
|
10547
10562
|
}).toString()}`, {
|
|
10548
10563
|
method,
|
|
10549
10564
|
headers: getHeaders()
|
|
10550
|
-
}).then(
|
|
10565
|
+
}).then(handleFetchResponse), {
|
|
10551
10566
|
onError
|
|
10552
10567
|
});
|
|
10553
10568
|
|
|
@@ -11157,7 +11172,7 @@ const PremiumPlusPlayer = ({
|
|
|
11157
11172
|
const restPlayerName = ['shaka', 'bitmovin'].find(name => name in rest);
|
|
11158
11173
|
logTarget.current = mapLogEvents({
|
|
11159
11174
|
playerName: restPlayerName || 'shaka',
|
|
11160
|
-
version: "2.25.0-canary.
|
|
11175
|
+
version: "2.25.0-canary.4",
|
|
11161
11176
|
video: videoRef.current,
|
|
11162
11177
|
getPlaybackStatus: () => getMediaTime(videoRef.current, {
|
|
11163
11178
|
player: corePlayerRef.current,
|