@kkcompany/player 2.9.22 → 2.9.444
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 +0 -7
- package/README.md +40 -8
- package/dist/core.mjs +898 -6674
- package/dist/index.js +4213 -9965
- package/dist/index.mjs +2129 -7876
- package/dist/modules.mjs +292 -7183
- package/dist/plugins.mjs +1 -6957
- package/dist/react.mjs +2721 -8124
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,13 +2,6 @@
|
|
|
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.22](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.9.20...v2.9.22) (2025-10-14)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Bug Fixes
|
|
9
|
-
|
|
10
|
-
* set preferredKeySystems before loading new source ([7ba983c](https://gitlab.kkinternal.com/playback/web-playcraft/commit/7ba983cc924161b5a9eb2f669d3d510a79e0ea10))
|
|
11
|
-
|
|
12
5
|
### [2.9.20](https://gitlab.kkinternal.com/playback/web-playcraft/compare/v2.9.19...v2.9.20) (2025-09-10)
|
|
13
6
|
|
|
14
7
|
|
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 => {
|