@kkcompany/player 2.9.20 → 2.25.0-canary.0
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 +48 -0
- package/README.md +40 -8
- package/dist/core.mjs +889 -6677
- package/dist/index.js +9831 -18714
- package/dist/index.mjs +2688 -9884
- package/dist/modules.mjs +307 -7201
- package/dist/plugins.mjs +4 -6961
- package/dist/react.mjs +5535 -12362
- package/package.json +4 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,54 @@
|
|
|
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.0](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.9.20...v2.25.0-canary.0) (2025-10-08)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add castMedia export with error handling added ([82aa0b6](https://gitlab.kkinternal.com/playback/web-playcraft/commit/82aa0b608aad2f2e5c638b20ca3254298ec77291))
|
|
11
|
+
* add change setting support to new audio/subtitle menu ([97728db](https://gitlab.kkinternal.com/playback/web-playcraft/commit/97728dbdc5f223cfccc18818cb5afa3b17be36d3))
|
|
12
|
+
* basic HLS on MSE ([b02c6f0](https://gitlab.kkinternal.com/playback/web-playcraft/commit/b02c6f0f44a89000aed9f279c1715bb4d0d115dc))
|
|
13
|
+
* display audio / subtitle options even if there's only 1 ([2e23915](https://gitlab.kkinternal.com/playback/web-playcraft/commit/2e23915d7aa7d084b65c9729c8ac468690852eb3))
|
|
14
|
+
* enable custom language menu ([fb2038d](https://gitlab.kkinternal.com/playback/web-playcraft/commit/fb2038da7fc3ea399bad3fbb4b7e1eb1c7bb49f0))
|
|
15
|
+
* enable custom setting menu sections with slotProps ([013fb63](https://gitlab.kkinternal.com/playback/web-playcraft/commit/013fb6393d7cc17502db6ef36b8b6d9492787529))
|
|
16
|
+
* export MenuItem + styles of LanguageMenu for custom menu component ([4f37d2e](https://gitlab.kkinternal.com/playback/web-playcraft/commit/4f37d2ed793287885e69dead576ceb1cecbe3320))
|
|
17
|
+
* **text:** add style for shaka player text display container ([39e62ec](https://gitlab.kkinternal.com/playback/web-playcraft/commit/39e62eccf99f394d12d682cd3b4a1a5ad1a398b3))
|
|
18
|
+
* **text:** patch vertical text display style ([7725796](https://gitlab.kkinternal.com/playback/web-playcraft/commit/7725796e0d5ef77a6728c88296519eb809f090c5))
|
|
19
|
+
* **text:** remove extra styles from ruby/rt to display properly ([4c77c61](https://gitlab.kkinternal.com/playback/web-playcraft/commit/4c77c61436a28fbdcc69e2bde0cd670681f7fadb))
|
|
20
|
+
* **ui:** add close button to mobile language menu ([6704ce1](https://gitlab.kkinternal.com/playback/web-playcraft/commit/6704ce14b13e8e5f344615ca43220b3b8f79b5f8))
|
|
21
|
+
* integrate new audio/subtitle menu to player UI ([d0944cb](https://gitlab.kkinternal.com/playback/web-playcraft/commit/d0944cb469342ae5eb84cd212a17835559e25115))
|
|
22
|
+
* **ui:** add LanguageMenu component ([3ec5456](https://gitlab.kkinternal.com/playback/web-playcraft/commit/3ec5456eb1003b9374505e53bde56d967fef0b68))
|
|
23
|
+
* **ui:** add OverlayPanel for custom setting menu ([dede035](https://gitlab.kkinternal.com/playback/web-playcraft/commit/dede03515b414c7e4afe7b6cb9c687097d46e920))
|
|
24
|
+
* **ui:** add subtitles icon ([e771220](https://gitlab.kkinternal.com/playback/web-playcraft/commit/e7712208a8594aaf7211d55445fb5d4519e776e3))
|
|
25
|
+
* add support of external text track / subtitle ([2d2aa9f](https://gitlab.kkinternal.com/playback/web-playcraft/commit/2d2aa9f8b624749795b76f80551dbeca40359a79))
|
|
26
|
+
* enable Shaka player built-in text/subtitle display ([47375d6](https://gitlab.kkinternal.com/playback/web-playcraft/commit/47375d639a94df07e0919a79560f0202540f46fa))
|
|
27
|
+
* expose audio track info ([87426d7](https://gitlab.kkinternal.com/playback/web-playcraft/commit/87426d710262baaa347e07ef7c21cd129671d834))
|
|
28
|
+
* give subtitle a bottom magin while controller is hidden ([6444f6a](https://gitlab.kkinternal.com/playback/web-playcraft/commit/6444f6a5bfe9ed6a040c78e8317a67bcf136fa41))
|
|
29
|
+
* select preferred text track after switching video ([e380825](https://gitlab.kkinternal.com/playback/web-playcraft/commit/e3808255ced22c7bdbe3ace169e33b1c9b9b176b))
|
|
30
|
+
* **cast:** add CastSessionControl for non-context integration ([4749ec0](https://gitlab.kkinternal.com/playback/web-playcraft/commit/4749ec0d62771bc73abcf231fc6e58672508e1b5))
|
|
31
|
+
* **premium:** add cast prop for non-context integration ([7a3307f](https://gitlab.kkinternal.com/playback/web-playcraft/commit/7a3307f35c691b77d83b6181670fb76f21187476))
|
|
32
|
+
* upgrade shaka-player and limit version range to 4.15.x ([48c5ec8](https://gitlab.kkinternal.com/playback/web-playcraft/commit/48c5ec81bd8adec74b8415cf101e12617c1d1f07))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* cursh while using quilty setting ([2389954](https://gitlab.kkinternal.com/playback/web-playcraft/commit/2389954551de8fc1dde4a62b70c7075bebf929dd))
|
|
38
|
+
* detect Safari 18 ([981efde](https://gitlab.kkinternal.com/playback/web-playcraft/commit/981efde96791bd93b47b69ca9d4ede32be8bcc0e))
|
|
39
|
+
* format subtitle label only if it exists ([c88fb03](https://gitlab.kkinternal.com/playback/web-playcraft/commit/c88fb033a84126cfc86f6a6ba3b59ab5a745bd48))
|
|
40
|
+
* handle audio tracks with same language code ([d9de3fe](https://gitlab.kkinternal.com/playback/web-playcraft/commit/d9de3fefeda9fcaa7359bcc80ef94ea2dbfa65e0))
|
|
41
|
+
* inconsistent subtitle size on newer MacOS + Chrome ([49008dc](https://gitlab.kkinternal.com/playback/web-playcraft/commit/49008dcde8b1df2dc54f2ea0b0de60568e70151e))
|
|
42
|
+
* initial subtitle on safari ([564c9e5](https://gitlab.kkinternal.com/playback/web-playcraft/commit/564c9e59495f81829074031173e747ee056b39c1))
|
|
43
|
+
* listen to visibility change only in iOS device ([01e0e18](https://gitlab.kkinternal.com/playback/web-playcraft/commit/01e0e18ea011bb10abd6af0ac20e03385171a674))
|
|
44
|
+
* load sender framework only while the application id exists ([0b0caa9](https://gitlab.kkinternal.com/playback/web-playcraft/commit/0b0caa9e1546af4e2bb5ad6fbed1170dcfe460bd))
|
|
45
|
+
* maintain text track / subtitle setting after Safari quality switch ([74837cc](https://gitlab.kkinternal.com/playback/web-playcraft/commit/74837cc7ec3c7ec7d93f46d37e73e00810878985))
|
|
46
|
+
* match subtitle value as off while subtitle is undefined ([4f8ebd2](https://gitlab.kkinternal.com/playback/web-playcraft/commit/4f8ebd2bfbde374215ec08ff4e3594c78f382799))
|
|
47
|
+
* turn off subtitles when starting playback in iOS browsers ([9afbbf1](https://gitlab.kkinternal.com/playback/web-playcraft/commit/9afbbf1516b0007435153311418c1afc2bcba3df))
|
|
48
|
+
* **core:** provide audio tracks without duplicate variantTracks ([799525d](https://gitlab.kkinternal.com/playback/web-playcraft/commit/799525d8b2e7af4417849ac6517ba194644dd720))
|
|
49
|
+
* should use track.label instead of .name ([249b606](https://gitlab.kkinternal.com/playback/web-playcraft/commit/249b6064d8ed444917aaa0d0465269f7610f111d))
|
|
50
|
+
* use text tracks only if have valid language ([b126b7c](https://gitlab.kkinternal.com/playback/web-playcraft/commit/b126b7c545a0782e19d91fa2a72030ab5acdb7f2))
|
|
51
|
+
* workaround for Safari text track on by default ([c4282d8](https://gitlab.kkinternal.com/playback/web-playcraft/commit/c4282d84dff31ad5a92ab58a195c9b77994064e7))
|
|
52
|
+
|
|
5
53
|
### [2.9.20](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.9.19...v2.9.20) (2025-09-10)
|
|
6
54
|
|
|
7
55
|
|
package/README.md
CHANGED
|
@@ -199,6 +199,22 @@ To play content protection endabled videos, you should specify license server UR
|
|
|
199
199
|
]
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
+
**Extranal text track / subtitles**
|
|
203
|
+
|
|
204
|
+
To add external text track, specify another source object with `type: 'text/vtt'`:
|
|
205
|
+
|
|
206
|
+
```js
|
|
207
|
+
;[
|
|
208
|
+
{
|
|
209
|
+
type: 'dash',
|
|
210
|
+
src: 'https://storage.googleapis.com/shaka-demo-assets/bbb-dark-truths/dash.mpd',
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
type: 'text/vtt',
|
|
214
|
+
src: 'https://storage.googleapis.com/shaka-demo-assets/bbb-dark-truths/text_ex.vtt',
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
202
218
|
#### Props for Player Options
|
|
203
219
|
|
|
204
220
|
**`shaka`**
|
|
@@ -942,22 +958,38 @@ const MyApp = () => {
|
|
|
942
958
|
|
|
943
959
|
For plain JS integration, sender integration & mini control UI comes with player UI automatically, just specify `castReceiverAppId` and it will handle the rest, including initialization of Google Cast sender SDK.
|
|
944
960
|
|
|
945
|
-
####
|
|
961
|
+
#### React integration
|
|
946
962
|
|
|
947
|
-
For React integration, enable Cast by adding `<CastSender>` to your app.
|
|
963
|
+
For React integration, enable Cast by adding `initSender` and `<CastSender>` to your app.
|
|
948
964
|
|
|
949
965
|
`<PremiumPlayer>` have a Cast button, which will display automatically when Google Cast sender is initialized and there's some available receiver ready for connection.
|
|
950
966
|
|
|
951
967
|
```js
|
|
952
|
-
import {
|
|
968
|
+
import {CastSessionControl} from 'playcraft/react'
|
|
953
969
|
|
|
954
|
-
|
|
955
|
-
appId
|
|
956
|
-
|
|
957
|
-
|
|
970
|
+
useEffect(() => {
|
|
971
|
+
initSender({appId: "XXXXXX"});
|
|
972
|
+
},[])
|
|
973
|
+
|
|
974
|
+
<CastSessionControl intl={{locale: 'ja'}} />
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
To add `customData` for your own custom logic, use `cast.customData` prop of `<PremiumPlayer>`:
|
|
978
|
+
|
|
979
|
+
```js
|
|
980
|
+
<PremiumPlayer cast={{
|
|
981
|
+
contentId: '1',
|
|
982
|
+
customData: {
|
|
983
|
+
host: 'https://example.com',
|
|
984
|
+
accessToken: '1234567890',
|
|
985
|
+
customHeader: {},
|
|
986
|
+
customQuery: {},
|
|
987
|
+
},
|
|
988
|
+
onChange: handleCastChange,
|
|
989
|
+
}}>
|
|
958
990
|
```
|
|
959
991
|
|
|
960
|
-
|
|
992
|
+
You may also handle Cast connection state change with `cast.onChange`.
|
|
961
993
|
|
|
962
994
|
```js
|
|
963
995
|
<PremiumPlayer onCast={async request => {
|