@kkcompany/player 2.25.0-canary.18 → 2.25.0-canary.19

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,100 +2,40 @@
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.18](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.17...v2.25.0-canary.18) (2025-12-18)
6
-
7
-
8
- ### Features
9
-
10
- * **text:** for VTT region support, add customized parser ([c0ead67](https://gitlab.kkinternal.com/playback/web-playcraft/commit/c0ead6777a6887f20ba9b4da7ba89921c5c14356))
11
-
12
- ## [2.25.0-canary.17](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.16...v2.25.0-canary.17) (2025-12-15)
13
-
14
-
15
- ### Features
16
-
17
- * add language menu button tooltip ([ad0d0ae](https://gitlab.kkinternal.com/playback/web-playcraft/commit/ad0d0aeaaea3a25cb63df30ffcf9d6a6864d2c97))
18
-
19
- ## [2.25.0-canary.16](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.9...v2.25.0-canary.16) (2025-12-15)
20
-
21
-
22
- ### Features
23
-
24
- * add export OverlayPanel ([f76f508](https://gitlab.kkinternal.com/playback/web-playcraft/commit/f76f50836a3a55ee23ee910c0f310a66a25f29e5))
25
- * override track display name in language menu ([338f5cc](https://gitlab.kkinternal.com/playback/web-playcraft/commit/338f5cc232d488eb36a07cdc339402cb9bd5d886))
26
-
27
- ## [2.25.0-canary.9](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.8...v2.25.0-canary.9) (2025-12-04)
28
-
29
-
30
- ### Features
31
-
32
- * **premium:** enable audio/text track control ([41d7dd3](https://gitlab.kkinternal.com/playback/web-playcraft/commit/41d7dd3776ab1b5e82b4612605394bb98e22e3b0))
33
- * subtitle off option is changed to 'none' ([029a41a](https://gitlab.kkinternal.com/playback/web-playcraft/commit/029a41a6e6f69847c01665ca4bd31f9ef77073a7))
34
-
35
- ## [2.25.0-canary.8](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.7...v2.25.0-canary.8) (2025-11-28)
36
-
37
- ## [2.25.0-canary.7](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.6...v2.25.0-canary.7) (2025-11-28)
38
-
39
- ## [2.25.0-canary.6](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.5...v2.25.0-canary.6) (2025-11-28)
40
-
41
-
42
- ### Features
43
-
44
- * add back other sections ([a4d8961](https://gitlab.kkinternal.com/playback/web-playcraft/commit/a4d8961b2985cb0811f619529c92302dde73d9ad))
45
-
46
- ## [2.25.0-canary.5](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.3...v2.25.0-canary.5) (2025-11-25)
47
-
48
-
49
- ### Bug Fixes
50
-
51
- * playback api response handling ([dfe5a5f](https://gitlab.kkinternal.com/playback/web-playcraft/commit/dfe5a5fd60ee7dc0155e63a796df6afe337c4a3d))
52
-
53
- ## [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)
54
-
55
-
56
- ### Features
57
-
58
- * display language menu only when options are available ([f02fbc7](https://gitlab.kkinternal.com/playback/web-playcraft/commit/f02fbc775f351dff406139f2e9f2c2451441de31))
59
-
60
-
61
- ### Bug Fixes
62
-
63
- * undefined audio setting options ([3e4e5ab](https://gitlab.kkinternal.com/playback/web-playcraft/commit/3e4e5ab521b56ba349d7be8416cc98f70ca404ed))
64
-
65
- ## [2.25.0-canary.2](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.25.0-canary.1...v2.25.0-canary.2) (2025-11-21)
66
-
67
-
68
- ### Features
69
-
70
- * add change setting support to new audio/subtitle menu ([97728db](https://gitlab.kkinternal.com/playback/web-playcraft/commit/97728dbdc5f223cfccc18818cb5afa3b17be36d3))
71
- * custom language menu item order ([6bba6dc](https://gitlab.kkinternal.com/playback/web-playcraft/commit/6bba6dc3c137c292eb890ebefcdc49cf1d155d21))
72
- * display audio / subtitle options even if there's only 1 ([2e23915](https://gitlab.kkinternal.com/playback/web-playcraft/commit/2e23915d7aa7d084b65c9729c8ac468690852eb3))
73
- * enable custom language menu ([fb2038d](https://gitlab.kkinternal.com/playback/web-playcraft/commit/fb2038da7fc3ea399bad3fbb4b7e1eb1c7bb49f0))
74
- * export MenuItem + styles of LanguageMenu for custom menu component ([4f37d2e](https://gitlab.kkinternal.com/playback/web-playcraft/commit/4f37d2ed793287885e69dead576ceb1cecbe3320))
75
- * **ui:** add close button to mobile language menu ([6704ce1](https://gitlab.kkinternal.com/playback/web-playcraft/commit/6704ce14b13e8e5f344615ca43220b3b8f79b5f8))
76
- * enable custom setting menu sections with slotProps ([013fb63](https://gitlab.kkinternal.com/playback/web-playcraft/commit/013fb6393d7cc17502db6ef36b8b6d9492787529))
77
- * integrate new audio/subtitle menu to player UI ([d0944cb](https://gitlab.kkinternal.com/playback/web-playcraft/commit/d0944cb469342ae5eb84cd212a17835559e25115))
78
- * **ui:** add LanguageMenu component ([3ec5456](https://gitlab.kkinternal.com/playback/web-playcraft/commit/3ec5456eb1003b9374505e53bde56d967fef0b68))
79
- * **ui:** add OverlayPanel for custom setting menu ([dede035](https://gitlab.kkinternal.com/playback/web-playcraft/commit/dede03515b414c7e4afe7b6cb9c687097d46e920))
80
- * **ui:** add subtitles icon ([e771220](https://gitlab.kkinternal.com/playback/web-playcraft/commit/e7712208a8594aaf7211d55445fb5d4519e776e3))
81
-
82
- ## [2.25.0-canary.1](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.9.20...v2.25.0-canary.1) (2025-11-21)
5
+ ## [2.25.0-canary.19](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.9.20...v2.25.0-canary.19) (2025-12-19)
83
6
 
84
7
 
85
8
  ### Features
86
9
 
10
+ * **text:** for VTT region support, add customized parser ([7b33f9d](https://gitlab.kkinternal.com/playback/web-playcraft/commit/7b33f9d0518e83041caf9d55137b321d3aee024f))
11
+ * add back other sections ([9776273](https://gitlab.kkinternal.com/playback/web-playcraft/commit/977627336de3a0d02ea14ec389ea400d90bee1dc))
12
+ * add castMedia export with error handling added ([82aa0b6](https://gitlab.kkinternal.com/playback/web-playcraft/commit/82aa0b608aad2f2e5c638b20ca3254298ec77291))
13
+ * add change setting support to new audio/subtitle menu ([ddc2219](https://gitlab.kkinternal.com/playback/web-playcraft/commit/ddc2219119087bae58aa2140cba4439b4464098a))
14
+ * add export OverlayPanel ([56c5cd6](https://gitlab.kkinternal.com/playback/web-playcraft/commit/56c5cd643b35cf3583ce674adafa3825a365a018))
15
+ * add language menu button tooltip ([004d36c](https://gitlab.kkinternal.com/playback/web-playcraft/commit/004d36c64e415e96df283a08db4b5828097c5dcf))
87
16
  * add support of external text track / subtitle ([2d2aa9f](https://gitlab.kkinternal.com/playback/web-playcraft/commit/2d2aa9f8b624749795b76f80551dbeca40359a79))
17
+ * basic HLS on MSE ([b02c6f0](https://gitlab.kkinternal.com/playback/web-playcraft/commit/b02c6f0f44a89000aed9f279c1715bb4d0d115dc))
18
+ * custom language menu item order ([a6acb81](https://gitlab.kkinternal.com/playback/web-playcraft/commit/a6acb8149536898ed467643405fcadf9194f3dc4))
19
+ * display audio / subtitle options even if there's only 1 ([8f8cb87](https://gitlab.kkinternal.com/playback/web-playcraft/commit/8f8cb87c5bbce87fde4f074d5f7c2eed0560e035))
20
+ * enable custom language menu ([730c305](https://gitlab.kkinternal.com/playback/web-playcraft/commit/730c305fbc3405ea8879f3611f2951403cf60b4e))
21
+ * enable custom setting menu sections with slotProps ([9283113](https://gitlab.kkinternal.com/playback/web-playcraft/commit/9283113be0116cc78e8eab506c1e08539fa04862))
22
+ * enable Shaka player built-in text/subtitle display ([47375d6](https://gitlab.kkinternal.com/playback/web-playcraft/commit/47375d639a94df07e0919a79560f0202540f46fa))
23
+ * export MenuItem + styles of LanguageMenu for custom menu component ([24b3df8](https://gitlab.kkinternal.com/playback/web-playcraft/commit/24b3df896ecbff2118ff506e15b4109c68be6acb))
24
+ * integrate new audio/subtitle menu to player UI ([6d0c0a2](https://gitlab.kkinternal.com/playback/web-playcraft/commit/6d0c0a2215284634ac948cf50e44a8cf4e1b42bf))
25
+ * subtitle off option is changed to 'none' ([db214a4](https://gitlab.kkinternal.com/playback/web-playcraft/commit/db214a4fd7fef5df1997a4bb9f7841155bb07da5))
26
+ * **cast:** add CastSessionControl for non-context integration ([4749ec0](https://gitlab.kkinternal.com/playback/web-playcraft/commit/4749ec0d62771bc73abcf231fc6e58672508e1b5))
27
+ * **premium:** add cast prop for non-context integration ([7a3307f](https://gitlab.kkinternal.com/playback/web-playcraft/commit/7a3307f35c691b77d83b6181670fb76f21187476))
28
+ * **premium:** enable audio/text track control ([b52a7fd](https://gitlab.kkinternal.com/playback/web-playcraft/commit/b52a7fd46663c37cdc4749dab968751b3327a571))
88
29
  * **text:** add style for shaka player text display container ([39e62ec](https://gitlab.kkinternal.com/playback/web-playcraft/commit/39e62eccf99f394d12d682cd3b4a1a5ad1a398b3))
89
30
  * **text:** patch vertical text display style ([7725796](https://gitlab.kkinternal.com/playback/web-playcraft/commit/7725796e0d5ef77a6728c88296519eb809f090c5))
90
31
  * **text:** remove extra styles from ruby/rt to display properly ([4c77c61](https://gitlab.kkinternal.com/playback/web-playcraft/commit/4c77c61436a28fbdcc69e2bde0cd670681f7fadb))
91
- * add castMedia export with error handling added ([82aa0b6](https://gitlab.kkinternal.com/playback/web-playcraft/commit/82aa0b608aad2f2e5c638b20ca3254298ec77291))
92
- * basic HLS on MSE ([b02c6f0](https://gitlab.kkinternal.com/playback/web-playcraft/commit/b02c6f0f44a89000aed9f279c1715bb4d0d115dc))
93
- * enable Shaka player built-in text/subtitle display ([47375d6](https://gitlab.kkinternal.com/playback/web-playcraft/commit/47375d639a94df07e0919a79560f0202540f46fa))
32
+ * **ui:** add close button to mobile language menu ([90b4ef4](https://gitlab.kkinternal.com/playback/web-playcraft/commit/90b4ef4f5561f17ce4786e4d9421ec9b758278a5))
33
+ * **ui:** add LanguageMenu component ([49d4e0b](https://gitlab.kkinternal.com/playback/web-playcraft/commit/49d4e0b6930b25f8d464cc1f08f14ad9a997a67f))
34
+ * **ui:** add OverlayPanel for custom setting menu ([09a0d01](https://gitlab.kkinternal.com/playback/web-playcraft/commit/09a0d015676ead39865f3144acfaed79138c268a))
35
+ * **ui:** add subtitles icon ([0e045b3](https://gitlab.kkinternal.com/playback/web-playcraft/commit/0e045b385740a4d44afaac3dbfc3c3ddb66c8a80))
94
36
  * expose audio track info ([87426d7](https://gitlab.kkinternal.com/playback/web-playcraft/commit/87426d710262baaa347e07ef7c21cd129671d834))
95
37
  * give subtitle a bottom magin while controller is hidden ([6444f6a](https://gitlab.kkinternal.com/playback/web-playcraft/commit/6444f6a5bfe9ed6a040c78e8317a67bcf136fa41))
96
38
  * select preferred text track after switching video ([e380825](https://gitlab.kkinternal.com/playback/web-playcraft/commit/e3808255ced22c7bdbe3ace169e33b1c9b9b176b))
97
- * **cast:** add CastSessionControl for non-context integration ([4749ec0](https://gitlab.kkinternal.com/playback/web-playcraft/commit/4749ec0d62771bc73abcf231fc6e58672508e1b5))
98
- * **premium:** add cast prop for non-context integration ([7a3307f](https://gitlab.kkinternal.com/playback/web-playcraft/commit/7a3307f35c691b77d83b6181670fb76f21187476))
99
39
  * upgrade shaka-player and limit version range to 4.15.x ([48c5ec8](https://gitlab.kkinternal.com/playback/web-playcraft/commit/48c5ec81bd8adec74b8415cf101e12617c1d1f07))
100
40
 
101
41
 
@@ -111,8 +51,10 @@ All notable changes to this project will be documented in this file. See [standa
111
51
  * load sender framework only while the application id exists ([0b0caa9](https://gitlab.kkinternal.com/playback/web-playcraft/commit/0b0caa9e1546af4e2bb5ad6fbed1170dcfe460bd))
112
52
  * maintain text track / subtitle setting after Safari quality switch ([74837cc](https://gitlab.kkinternal.com/playback/web-playcraft/commit/74837cc7ec3c7ec7d93f46d37e73e00810878985))
113
53
  * match subtitle value as off while subtitle is undefined ([4f8ebd2](https://gitlab.kkinternal.com/playback/web-playcraft/commit/4f8ebd2bfbde374215ec08ff4e3594c78f382799))
54
+ * playback api response handling ([8ce9553](https://gitlab.kkinternal.com/playback/web-playcraft/commit/8ce95530da3f100ea7a3d0536d3d0b226d24d338))
114
55
  * select DASH/HLS base on DRM key system availablity ([623e1e2](https://gitlab.kkinternal.com/playback/web-playcraft/commit/623e1e2ca77b7313e1ec845b391e4c92166686b8))
115
56
  * turn off subtitles when starting playback in iOS browsers ([9afbbf1](https://gitlab.kkinternal.com/playback/web-playcraft/commit/9afbbf1516b0007435153311418c1afc2bcba3df))
57
+ * undefined audio setting options ([5ad4808](https://gitlab.kkinternal.com/playback/web-playcraft/commit/5ad48080110b079699b7a5275827508dc5d157c7))
116
58
  * **core:** provide audio tracks without duplicate variantTracks ([799525d](https://gitlab.kkinternal.com/playback/web-playcraft/commit/799525d8b2e7af4417849ac6517ba194644dd720))
117
59
  * should use track.label instead of .name ([249b606](https://gitlab.kkinternal.com/playback/web-playcraft/commit/249b6064d8ed444917aaa0d0465269f7610f111d))
118
60
  * use text tracks only if have valid language ([b126b7c](https://gitlab.kkinternal.com/playback/web-playcraft/commit/b126b7c545a0782e19d91fa2a72030ab5acdb7f2))
package/dist/core.mjs CHANGED
@@ -37,7 +37,7 @@ const waitFor = (check, handler) => {
37
37
  function getVersion() {
38
38
  try {
39
39
  // eslint-disable-next-line no-undef
40
- return "2.25.0-canary.18";
40
+ return "2.25.0-canary.19";
41
41
  } catch (e) {
42
42
  return undefined;
43
43
  }
@@ -948,6 +948,16 @@ class VttTextParser {
948
948
  return null;
949
949
  }
950
950
 
951
+ const skipIndex = text.findIndex(line => /^#/.test(line.trim()));
952
+
953
+ if (skipIndex > 0) {
954
+ text = text.slice(skipIndex);
955
+ }
956
+
957
+ if (text.length < 2) {
958
+ return;
959
+ }
960
+
951
961
  let id = null;
952
962
 
953
963
  if (!text[0].includes('-->')) {
package/dist/index.js CHANGED
@@ -5746,7 +5746,7 @@ $$5({ target: 'Array', proto: true, forced: FORCED }, {
5746
5746
  function getVersion() {
5747
5747
  try {
5748
5748
  // eslint-disable-next-line no-undef
5749
- return "2.25.0-canary.18";
5749
+ return "2.25.0-canary.19";
5750
5750
  } catch (e) {
5751
5751
  return undefined;
5752
5752
  }
@@ -6052,7 +6052,22 @@ const getSettingsData = _ref8 => {
6052
6052
  const matchTracks = (tracks, sorted) => {
6053
6053
  var _tracks$;
6054
6054
 
6055
- return ((_tracks$ = tracks[0]) === null || _tracks$ === void 0 ? void 0 : _tracks$.type) === 'audio' && (sorted === null || sorted === void 0 ? void 0 : sorted.length) === 1 ? [_objectSpread$p(_objectSpread$p({}, tracks[0]), sorted[0])] : (sorted === null || sorted === void 0 ? void 0 : sorted.map(track => _objectSpread$p(_objectSpread$p({}, tracks.find(t => t.language === track.language)), track)).filter(Boolean)) || tracks;
6055
+ const lookup = {};
6056
+ tracks.forEach(track => {
6057
+ lookup["".concat(track.language, "|").concat(track.label)] = track;
6058
+ lookup["".concat(track.language, "|")] = track;
6059
+ lookup["|".concat(track.label)] = track;
6060
+ });
6061
+ const matched = sorted.map(info => {
6062
+ const track = lookup["".concat(info.language, "|").concat(info.label)] || lookup["".concat(info.language, "|")];
6063
+ return track && _objectSpread$p(_objectSpread$p({}, track), info);
6064
+ }).filter(Boolean);
6065
+
6066
+ if (((_tracks$ = tracks[0]) === null || _tracks$ === void 0 ? void 0 : _tracks$.type) === 'audio' && matched.length === 0) {
6067
+ return [_objectSpread$p(_objectSpread$p({}, tracks[0]), sorted[0])];
6068
+ }
6069
+
6070
+ return matched;
6056
6071
  };
6057
6072
 
6058
6073
  const getLanguageOptions = (player, sorted) => {
@@ -8668,7 +8683,7 @@ var PropTypes = propTypes.exports;var en = {
8668
8683
  "KKS.QUALITY": "解像度",
8669
8684
  "KKS.AUDIO": "音声",
8670
8685
  "KKS.SETTING.OFF": "オフ",
8671
- "KKS.SETTING.none": "オフ",
8686
+ "KKS.SETTING.none": "なし",
8672
8687
  "KKS.SETTING.ja": "日本語",
8673
8688
  "KKS.SETTING.en": "英語",
8674
8689
  "KKS.SUBTITLES": "字幕",
@@ -9722,13 +9737,10 @@ const TitleBarExtension = _ref4 => {
9722
9737
  };
9723
9738
  const customTextStyle = {
9724
9739
  '.shaka-text-container': {
9740
+ boxSizing: 'border-box',
9725
9741
  padding: '2cqmin',
9726
9742
  font: '3cqmin/1 sans-serif',
9727
9743
  color: '#ffffff',
9728
- fontFamily: 'system-ui-monospaced',
9729
- 'unicode-bidi': 'plaintext',
9730
- 'overflow-wrap': 'break-word',
9731
- textWrap: 'balance',
9732
9744
  textShadow: '1px 1px 0.2cqmin #000'
9733
9745
  },
9734
9746
  '.shaka-text-container > .shaka-cue-horizontal-tb': {
@@ -15826,6 +15838,16 @@ class VttTextParser {
15826
15838
  return null;
15827
15839
  }
15828
15840
 
15841
+ const skipIndex = text.findIndex(line => /^#/.test(line.trim()));
15842
+
15843
+ if (skipIndex > 0) {
15844
+ text = text.slice(skipIndex);
15845
+ }
15846
+
15847
+ if (text.length < 2) {
15848
+ return;
15849
+ }
15850
+
15829
15851
  let id = null;
15830
15852
 
15831
15853
  if (!text[0].includes('-->')) {
package/dist/index.mjs CHANGED
@@ -812,7 +812,7 @@ function convertToSeconds(timeString) {
812
812
  function getVersion() {
813
813
  try {
814
814
  // eslint-disable-next-line no-undef
815
- return "2.25.0-canary.18";
815
+ return "2.25.0-canary.19";
816
816
  } catch (e) {
817
817
  return undefined;
818
818
  }
@@ -1106,11 +1106,26 @@ const getSettingsData = ({
1106
1106
  const matchTracks = (tracks, sorted) => {
1107
1107
  var _tracks$;
1108
1108
 
1109
- return ((_tracks$ = tracks[0]) === null || _tracks$ === void 0 ? void 0 : _tracks$.type) === 'audio' && (sorted === null || sorted === void 0 ? void 0 : sorted.length) === 1 ? [{ ...tracks[0],
1110
- ...sorted[0]
1111
- }] : (sorted === null || sorted === void 0 ? void 0 : sorted.map(track => ({ ...tracks.find(t => t.language === track.language),
1112
- ...track
1113
- })).filter(Boolean)) || tracks;
1109
+ const lookup = {};
1110
+ tracks.forEach(track => {
1111
+ lookup[`${track.language}|${track.label}`] = track;
1112
+ lookup[`${track.language}|`] = track;
1113
+ lookup[`|${track.label}`] = track;
1114
+ });
1115
+ const matched = sorted.map(info => {
1116
+ const track = lookup[`${info.language}|${info.label}`] || lookup[`${info.language}|`];
1117
+ return track && { ...track,
1118
+ ...info
1119
+ };
1120
+ }).filter(Boolean);
1121
+
1122
+ if (((_tracks$ = tracks[0]) === null || _tracks$ === void 0 ? void 0 : _tracks$.type) === 'audio' && matched.length === 0) {
1123
+ return [{ ...tracks[0],
1124
+ ...sorted[0]
1125
+ }];
1126
+ }
1127
+
1128
+ return matched;
1114
1129
  };
1115
1130
 
1116
1131
  const getLanguageOptions = (player, sorted) => {
@@ -2331,7 +2346,7 @@ var ja = {
2331
2346
  "KKS.QUALITY": "解像度",
2332
2347
  "KKS.AUDIO": "音声",
2333
2348
  "KKS.SETTING.OFF": "オフ",
2334
- "KKS.SETTING.none": "オフ",
2349
+ "KKS.SETTING.none": "なし",
2335
2350
  "KKS.SETTING.ja": "日本語",
2336
2351
  "KKS.SETTING.en": "英語",
2337
2352
  "KKS.SUBTITLES": "字幕",
@@ -3132,13 +3147,10 @@ const nativeTextStyle = {
3132
3147
  };
3133
3148
  const customTextStyle = {
3134
3149
  '.shaka-text-container': {
3150
+ boxSizing: 'border-box',
3135
3151
  padding: '2cqmin',
3136
3152
  font: '3cqmin/1 sans-serif',
3137
3153
  color: '#ffffff',
3138
- fontFamily: 'system-ui-monospaced',
3139
- 'unicode-bidi': 'plaintext',
3140
- 'overflow-wrap': 'break-word',
3141
- textWrap: 'balance',
3142
3154
  textShadow: '1px 1px 0.2cqmin #000'
3143
3155
  },
3144
3156
  '.shaka-text-container > .shaka-cue-horizontal-tb': {
@@ -6825,6 +6837,16 @@ class VttTextParser {
6825
6837
  return null;
6826
6838
  }
6827
6839
 
6840
+ const skipIndex = text.findIndex(line => /^#/.test(line.trim()));
6841
+
6842
+ if (skipIndex > 0) {
6843
+ text = text.slice(skipIndex);
6844
+ }
6845
+
6846
+ if (text.length < 2) {
6847
+ return;
6848
+ }
6849
+
6828
6850
  let id = null;
6829
6851
 
6830
6852
  if (!text[0].includes('-->')) {
package/dist/modules.mjs CHANGED
@@ -991,7 +991,7 @@ const mapLogEvents$1 = ({
991
991
  function getVersion() {
992
992
  try {
993
993
  // eslint-disable-next-line no-undef
994
- return "2.25.0-canary.18";
994
+ return "2.25.0-canary.19";
995
995
  } catch (e) {
996
996
  return undefined;
997
997
  }
@@ -1413,7 +1413,7 @@ const createAnalytics = ({
1413
1413
  const logTarget = mapLogEvents({
1414
1414
  video,
1415
1415
  playerName: 'shaka',
1416
- version: "2.25.0-canary.18"
1416
+ version: "2.25.0-canary.19"
1417
1417
  });
1418
1418
  logTarget.all((type, data) => {
1419
1419
  const payload = {
package/dist/react.mjs CHANGED
@@ -1992,7 +1992,7 @@ var ja = {
1992
1992
  "KKS.QUALITY": "解像度",
1993
1993
  "KKS.AUDIO": "音声",
1994
1994
  "KKS.SETTING.OFF": "オフ",
1995
- "KKS.SETTING.none": "オフ",
1995
+ "KKS.SETTING.none": "なし",
1996
1996
  "KKS.SETTING.ja": "日本語",
1997
1997
  "KKS.SETTING.en": "英語",
1998
1998
  "KKS.SUBTITLES": "字幕",
@@ -2420,7 +2420,7 @@ function convertToSeconds(timeString) {
2420
2420
  function getVersion() {
2421
2421
  try {
2422
2422
  // eslint-disable-next-line no-undef
2423
- return "2.25.0-canary.18";
2423
+ return "2.25.0-canary.19";
2424
2424
  } catch (e) {
2425
2425
  return undefined;
2426
2426
  }
@@ -2870,13 +2870,10 @@ const nativeTextStyle = {
2870
2870
  };
2871
2871
  const customTextStyle = {
2872
2872
  '.shaka-text-container': {
2873
+ boxSizing: 'border-box',
2873
2874
  padding: '2cqmin',
2874
2875
  font: '3cqmin/1 sans-serif',
2875
2876
  color: '#ffffff',
2876
- fontFamily: 'system-ui-monospaced',
2877
- 'unicode-bidi': 'plaintext',
2878
- 'overflow-wrap': 'break-word',
2879
- textWrap: 'balance',
2880
2877
  textShadow: '1px 1px 0.2cqmin #000'
2881
2878
  },
2882
2879
  '.shaka-text-container > .shaka-cue-horizontal-tb': {
@@ -7040,6 +7037,16 @@ class VttTextParser {
7040
7037
  return null;
7041
7038
  }
7042
7039
 
7040
+ const skipIndex = text.findIndex(line => /^#/.test(line.trim()));
7041
+
7042
+ if (skipIndex > 0) {
7043
+ text = text.slice(skipIndex);
7044
+ }
7045
+
7046
+ if (text.length < 2) {
7047
+ return;
7048
+ }
7049
+
7043
7050
  let id = null;
7044
7051
 
7045
7052
  if (!text[0].includes('-->')) {
@@ -9071,11 +9078,26 @@ const getSettingsData = ({
9071
9078
  const matchTracks = (tracks, sorted) => {
9072
9079
  var _tracks$;
9073
9080
 
9074
- return ((_tracks$ = tracks[0]) === null || _tracks$ === void 0 ? void 0 : _tracks$.type) === 'audio' && (sorted === null || sorted === void 0 ? void 0 : sorted.length) === 1 ? [{ ...tracks[0],
9075
- ...sorted[0]
9076
- }] : (sorted === null || sorted === void 0 ? void 0 : sorted.map(track => ({ ...tracks.find(t => t.language === track.language),
9077
- ...track
9078
- })).filter(Boolean)) || tracks;
9081
+ const lookup = {};
9082
+ tracks.forEach(track => {
9083
+ lookup[`${track.language}|${track.label}`] = track;
9084
+ lookup[`${track.language}|`] = track;
9085
+ lookup[`|${track.label}`] = track;
9086
+ });
9087
+ const matched = sorted.map(info => {
9088
+ const track = lookup[`${info.language}|${info.label}`] || lookup[`${info.language}|`];
9089
+ return track && { ...track,
9090
+ ...info
9091
+ };
9092
+ }).filter(Boolean);
9093
+
9094
+ if (((_tracks$ = tracks[0]) === null || _tracks$ === void 0 ? void 0 : _tracks$.type) === 'audio' && matched.length === 0) {
9095
+ return [{ ...tracks[0],
9096
+ ...sorted[0]
9097
+ }];
9098
+ }
9099
+
9100
+ return matched;
9079
9101
  };
9080
9102
 
9081
9103
  const getLanguageOptions = (player, sorted) => {
@@ -11811,7 +11833,7 @@ const PremiumPlusPlayer = ({
11811
11833
  const restPlayerName = ['shaka', 'bitmovin'].find(name => name in rest);
11812
11834
  logTarget.current = mapLogEvents({
11813
11835
  playerName: restPlayerName || 'shaka',
11814
- version: "2.25.0-canary.18",
11836
+ version: "2.25.0-canary.19",
11815
11837
  video: videoRef.current,
11816
11838
  getPlaybackStatus: () => getMediaTime(videoRef.current, {
11817
11839
  player: corePlayerRef.current,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kkcompany/player",
3
- "version": "2.25.0-canary.18",
3
+ "version": "2.25.0-canary.19",
4
4
  "module": "dist/index.mjs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",