@kkcompany/player 2.9.22 → 2.9.24

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 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.9.24](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.9.22...v2.9.24) (2025-10-29)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * update HLS support detection for various browsers and platforms ([be92a16](https://gitlab.kkinternal.com/playback/web-playcraft/commit/be92a163cc36b8e257ba816d209a5f78837bee49))
11
+
5
12
  ### [2.9.22](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.9.20...v2.9.22) (2025-10-14)
6
13
 
7
14
 
package/dist/core.mjs CHANGED
@@ -14,12 +14,24 @@ function getDevice() {
14
14
  function needNativeHls() {
15
15
  // Don't let Android phones play HLS, even if some of them report supported
16
16
  // This covers Samsung & OPPO special cases
17
- const isAndroid = /android/i.test(navigator.userAgent); // canPlayType isn't reliable across all iOS verion / device combinations, so also check user agent
17
+ const isAndroid = /android|X11|Linux/i.test(navigator.userAgent); // canPlayType isn't reliable across all iOS verion / device combinations, so also check user agent
18
18
 
19
- const isSafari = /^((?!linux|chrome|android).)*(safari|iPad|iPhone)/i.test(navigator.userAgent); // ref: https://stackoverflow.com/a/12905122/4578017
19
+ const isSafari = /^((?!chrome|android|X11|Linux).)*(safari|iPad|iPhone|Version)/i.test(navigator.userAgent);
20
+ const isFirefox = /firefox/i.test(navigator.userAgent);
21
+ const isEdge = /edg/i.test(navigator.userAgent);
22
+ const isChrome = /chrome/i.test(navigator.userAgent) && !isEdge;
23
+
24
+ if (isAndroid || isFirefox || isEdge || isChrome) {
25
+ return '';
26
+ }
27
+
28
+ if (isSafari) {
29
+ return 'maybe';
30
+ } // ref: https://stackoverflow.com/a/12905122/4578017
20
31
  // none of our supported browsers other than Safari response to this
21
32
 
22
- return isAndroid || /firefox/i.test(navigator.userAgent) ? '' : isSafari ? 'maybe' : document.createElement('video').canPlayType('application/vnd.apple.mpegURL');
33
+
34
+ return document.createElement('video').canPlayType('application/vnd.apple.mpegURL');
23
35
  }
24
36
 
25
37
  const isDesktop = () => !getDevice().type; // TODO solve lint error:
@@ -56,7 +68,7 @@ const waitFor = (check, handler) => {
56
68
  function getVersion() {
57
69
  try {
58
70
  // eslint-disable-next-line no-undef
59
- return "2.9.22";
71
+ return "2.9.24";
60
72
  } catch (e) {
61
73
  return undefined;
62
74
  }
package/dist/index.js CHANGED
@@ -3097,12 +3097,24 @@ function getBrowser() {
3097
3097
  function needNativeHls() {
3098
3098
  // Don't let Android phones play HLS, even if some of them report supported
3099
3099
  // This covers Samsung & OPPO special cases
3100
- const isAndroid = /android/i.test(navigator.userAgent); // canPlayType isn't reliable across all iOS verion / device combinations, so also check user agent
3100
+ const isAndroid = /android|X11|Linux/i.test(navigator.userAgent); // canPlayType isn't reliable across all iOS verion / device combinations, so also check user agent
3101
3101
 
3102
- const isSafari = /^((?!linux|chrome|android).)*(safari|iPad|iPhone)/i.test(navigator.userAgent); // ref: https://stackoverflow.com/a/12905122/4578017
3102
+ const isSafari = /^((?!chrome|android|X11|Linux).)*(safari|iPad|iPhone|Version)/i.test(navigator.userAgent);
3103
+ const isFirefox = /firefox/i.test(navigator.userAgent);
3104
+ const isEdge = /edg/i.test(navigator.userAgent);
3105
+ const isChrome = /chrome/i.test(navigator.userAgent) && !isEdge;
3106
+
3107
+ if (isAndroid || isFirefox || isEdge || isChrome) {
3108
+ return '';
3109
+ }
3110
+
3111
+ if (isSafari) {
3112
+ return 'maybe';
3113
+ } // ref: https://stackoverflow.com/a/12905122/4578017
3103
3114
  // none of our supported browsers other than Safari response to this
3104
3115
 
3105
- return isAndroid || /firefox/i.test(navigator.userAgent) ? '' : isSafari ? 'maybe' : document.createElement('video').canPlayType('application/vnd.apple.mpegURL');
3116
+
3117
+ return document.createElement('video').canPlayType('application/vnd.apple.mpegURL');
3106
3118
  }
3107
3119
 
3108
3120
  const isDesktop = () => !getDevice().type; // TODO solve lint error:
@@ -7207,7 +7219,7 @@ $$3({ target: 'Array', proto: true, forced: FORCED }, {
7207
7219
  function getVersion() {
7208
7220
  try {
7209
7221
  // eslint-disable-next-line no-undef
7210
- return "2.9.22";
7222
+ return "2.9.24";
7211
7223
  } catch (e) {
7212
7224
  return undefined;
7213
7225
  }
@@ -25257,7 +25269,7 @@ const createAnalytics = _ref => {
25257
25269
  const logTarget = mapLogEvents({
25258
25270
  video,
25259
25271
  playerName: 'shaka',
25260
- version: "2.9.22"
25272
+ version: "2.9.24"
25261
25273
  });
25262
25274
  logTarget.all((type, data) => {
25263
25275
  const payload = {
package/dist/index.mjs CHANGED
@@ -87,12 +87,24 @@ function getBrowser() {
87
87
  function needNativeHls() {
88
88
  // Don't let Android phones play HLS, even if some of them report supported
89
89
  // This covers Samsung & OPPO special cases
90
- const isAndroid = /android/i.test(navigator.userAgent); // canPlayType isn't reliable across all iOS verion / device combinations, so also check user agent
90
+ const isAndroid = /android|X11|Linux/i.test(navigator.userAgent); // canPlayType isn't reliable across all iOS verion / device combinations, so also check user agent
91
91
 
92
- const isSafari = /^((?!linux|chrome|android).)*(safari|iPad|iPhone)/i.test(navigator.userAgent); // ref: https://stackoverflow.com/a/12905122/4578017
92
+ const isSafari = /^((?!chrome|android|X11|Linux).)*(safari|iPad|iPhone|Version)/i.test(navigator.userAgent);
93
+ const isFirefox = /firefox/i.test(navigator.userAgent);
94
+ const isEdge = /edg/i.test(navigator.userAgent);
95
+ const isChrome = /chrome/i.test(navigator.userAgent) && !isEdge;
96
+
97
+ if (isAndroid || isFirefox || isEdge || isChrome) {
98
+ return '';
99
+ }
100
+
101
+ if (isSafari) {
102
+ return 'maybe';
103
+ } // ref: https://stackoverflow.com/a/12905122/4578017
93
104
  // none of our supported browsers other than Safari response to this
94
105
 
95
- return isAndroid || /firefox/i.test(navigator.userAgent) ? '' : isSafari ? 'maybe' : document.createElement('video').canPlayType('application/vnd.apple.mpegURL');
106
+
107
+ return document.createElement('video').canPlayType('application/vnd.apple.mpegURL');
96
108
  }
97
109
 
98
110
  const isDesktop = () => !getDevice().type; // TODO solve lint error:
@@ -316,7 +328,7 @@ function convertToSeconds(timeString) {
316
328
  function getVersion() {
317
329
  try {
318
330
  // eslint-disable-next-line no-undef
319
- return "2.9.22";
331
+ return "2.9.24";
320
332
  } catch (e) {
321
333
  return undefined;
322
334
  }
@@ -13809,7 +13821,7 @@ const createAnalytics = ({
13809
13821
  const logTarget = mapLogEvents({
13810
13822
  video,
13811
13823
  playerName: 'shaka',
13812
- version: "2.9.22"
13824
+ version: "2.9.24"
13813
13825
  });
13814
13826
  logTarget.all((type, data) => {
13815
13827
  const payload = {
package/dist/modules.mjs CHANGED
@@ -272,12 +272,24 @@ function getBrowser() {
272
272
  function needNativeHls() {
273
273
  // Don't let Android phones play HLS, even if some of them report supported
274
274
  // This covers Samsung & OPPO special cases
275
- const isAndroid = /android/i.test(navigator.userAgent); // canPlayType isn't reliable across all iOS verion / device combinations, so also check user agent
275
+ const isAndroid = /android|X11|Linux/i.test(navigator.userAgent); // canPlayType isn't reliable across all iOS verion / device combinations, so also check user agent
276
276
 
277
- const isSafari = /^((?!linux|chrome|android).)*(safari|iPad|iPhone)/i.test(navigator.userAgent); // ref: https://stackoverflow.com/a/12905122/4578017
277
+ const isSafari = /^((?!chrome|android|X11|Linux).)*(safari|iPad|iPhone|Version)/i.test(navigator.userAgent);
278
+ const isFirefox = /firefox/i.test(navigator.userAgent);
279
+ const isEdge = /edg/i.test(navigator.userAgent);
280
+ const isChrome = /chrome/i.test(navigator.userAgent) && !isEdge;
281
+
282
+ if (isAndroid || isFirefox || isEdge || isChrome) {
283
+ return '';
284
+ }
285
+
286
+ if (isSafari) {
287
+ return 'maybe';
288
+ } // ref: https://stackoverflow.com/a/12905122/4578017
278
289
  // none of our supported browsers other than Safari response to this
279
290
 
280
- return isAndroid || /firefox/i.test(navigator.userAgent) ? '' : isSafari ? 'maybe' : document.createElement('video').canPlayType('application/vnd.apple.mpegURL');
291
+
292
+ return document.createElement('video').canPlayType('application/vnd.apple.mpegURL');
281
293
  }
282
294
 
283
295
  const isDesktop = () => !getDevice().type; // TODO solve lint error:
@@ -531,7 +543,7 @@ const getSource = (sourceOptions, {
531
543
  function getVersion() {
532
544
  try {
533
545
  // eslint-disable-next-line no-undef
534
- return "2.9.22";
546
+ return "2.9.24";
535
547
  } catch (e) {
536
548
  return undefined;
537
549
  }
@@ -1510,7 +1522,7 @@ const createAnalytics = ({
1510
1522
  const logTarget = mapLogEvents({
1511
1523
  video,
1512
1524
  playerName: 'shaka',
1513
- version: "2.9.22"
1525
+ version: "2.9.24"
1514
1526
  });
1515
1527
  logTarget.all((type, data) => {
1516
1528
  const payload = {
package/dist/react.mjs CHANGED
@@ -84,12 +84,24 @@ function getBrowser() {
84
84
  function needNativeHls() {
85
85
  // Don't let Android phones play HLS, even if some of them report supported
86
86
  // This covers Samsung & OPPO special cases
87
- const isAndroid = /android/i.test(navigator.userAgent); // canPlayType isn't reliable across all iOS verion / device combinations, so also check user agent
87
+ const isAndroid = /android|X11|Linux/i.test(navigator.userAgent); // canPlayType isn't reliable across all iOS verion / device combinations, so also check user agent
88
88
 
89
- const isSafari = /^((?!linux|chrome|android).)*(safari|iPad|iPhone)/i.test(navigator.userAgent); // ref: https://stackoverflow.com/a/12905122/4578017
89
+ const isSafari = /^((?!chrome|android|X11|Linux).)*(safari|iPad|iPhone|Version)/i.test(navigator.userAgent);
90
+ const isFirefox = /firefox/i.test(navigator.userAgent);
91
+ const isEdge = /edg/i.test(navigator.userAgent);
92
+ const isChrome = /chrome/i.test(navigator.userAgent) && !isEdge;
93
+
94
+ if (isAndroid || isFirefox || isEdge || isChrome) {
95
+ return '';
96
+ }
97
+
98
+ if (isSafari) {
99
+ return 'maybe';
100
+ } // ref: https://stackoverflow.com/a/12905122/4578017
90
101
  // none of our supported browsers other than Safari response to this
91
102
 
92
- return isAndroid || /firefox/i.test(navigator.userAgent) ? '' : isSafari ? 'maybe' : document.createElement('video').canPlayType('application/vnd.apple.mpegURL');
103
+
104
+ return document.createElement('video').canPlayType('application/vnd.apple.mpegURL');
93
105
  }
94
106
 
95
107
  const isDesktop = () => !getDevice().type; // TODO solve lint error:
@@ -313,7 +325,7 @@ function convertToSeconds(timeString) {
313
325
  function getVersion() {
314
326
  try {
315
327
  // eslint-disable-next-line no-undef
316
- return "2.9.22";
328
+ return "2.9.24";
317
329
  } catch (e) {
318
330
  return undefined;
319
331
  }
@@ -14946,7 +14958,7 @@ const createAnalytics = ({
14946
14958
  const logTarget = mapLogEvents({
14947
14959
  video,
14948
14960
  playerName: 'shaka',
14949
- version: "2.9.22"
14961
+ version: "2.9.24"
14950
14962
  });
14951
14963
  logTarget.all((type, data) => {
14952
14964
  const payload = {
@@ -18235,7 +18247,7 @@ const PremiumPlusPlayer = ({
18235
18247
  const restPlayerName = ['shaka', 'bitmovin'].find(name => name in rest);
18236
18248
  logTarget.current = mapLogEvents$1({
18237
18249
  playerName: restPlayerName || 'shaka',
18238
- version: "2.9.22",
18250
+ version: "2.9.24",
18239
18251
  video: videoRef.current,
18240
18252
  getPlaybackStatus: () => getMediaTime(videoRef.current, {
18241
18253
  player: corePlayerRef.current,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kkcompany/player",
3
- "version": "2.9.22",
3
+ "version": "2.9.24",
4
4
  "module": "dist/index.mjs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",