@kkcompany/ott-player 0.5.2 → 0.5.4-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 +9 -0
- package/dist/index.cjs +12 -4
- package/dist/index.mjs +13 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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
|
+
### [0.5.4-canary.0](https://gitlab.kkinternal.com/kks-web/blahaj/compare/player@0.5.3...player@0.5.4-canary.0) (2026-07-08)
|
|
6
|
+
|
|
7
|
+
### [0.5.3](https://gitlab.kkinternal.com/kks-web/blahaj/compare/player@0.5.2...player@0.5.3) (2026-07-03)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* LinearEnd view is opt-it ([5afc85a](https://gitlab.kkinternal.com/kks-web/blahaj/commit/5afc85a386cf7bfeb166fd893a38a29151ea5265))
|
|
13
|
+
|
|
5
14
|
### [0.5.2](https://gitlab.kkinternal.com/kks-web/blahaj/compare/player@0.5.1...player@0.5.2) (2026-06-29)
|
|
6
15
|
|
|
7
16
|
|
package/dist/index.cjs
CHANGED
|
@@ -790,6 +790,7 @@ const startPlaybackSession = async (playbackApi, options = {}) => {
|
|
|
790
790
|
const waitForContent = Promise.race([updateContent({ useCache: true }), new Promise((resolve) => {
|
|
791
791
|
setTimeout(resolve, UPDATE_INTERVAL_MS);
|
|
792
792
|
})]);
|
|
793
|
+
performance.mark("session-request");
|
|
793
794
|
const sessionInfo = await playbackApi.startPlayback({
|
|
794
795
|
type: type$1,
|
|
795
796
|
id
|
|
@@ -844,6 +845,7 @@ const startPlaybackSession = async (playbackApi, options = {}) => {
|
|
|
844
845
|
};
|
|
845
846
|
emitter.on("liveEnd", end);
|
|
846
847
|
await waitForContent;
|
|
848
|
+
performance.mark("session-started");
|
|
847
849
|
return {
|
|
848
850
|
...state,
|
|
849
851
|
token: sessionInfo.token,
|
|
@@ -914,7 +916,7 @@ var preload_default = preload;
|
|
|
914
916
|
|
|
915
917
|
//#endregion
|
|
916
918
|
//#region package.json
|
|
917
|
-
var version = "0.5.
|
|
919
|
+
var version = "0.5.4-canary.0";
|
|
918
920
|
|
|
919
921
|
//#endregion
|
|
920
922
|
//#region src/constants.js
|
|
@@ -960,6 +962,10 @@ const getEnterpriseDrmHeaders = ({ token, tokenType = "playback" }) => {
|
|
|
960
962
|
const sessionCache = {};
|
|
961
963
|
const getCastState = () => window.cast?.framework?.CastContext.getInstance()?.getCastState() || CastState.NO_DEVICES_AVAILABLE;
|
|
962
964
|
const PremiumPlusPlayer = ({ controls, preload: preload$1 = "auto", preloadList = [], currentTime, quality, sourceType, host, accessToken, deviceId, headers, params, contentType, contentId, contentKey = `${contentType}/${contentId}`, autoplayNext, thumbnailSeeking, plugins = [], settings: appSettings = {}, coverImageUrl, coverImageDisplay = "auto", recommendation, uiElements: { castButton, ...uiElements } = {}, playerRef, children, slotProps, onError, onApiError, onBack, onPlaybackStateChange, onPlayerLoaded, onChange, onPlaybackApiResponse, sendLog, playbackState: appPlaybackState, turnOnSkipOpening, shouldHideSkipButton = false, playerToModuleErrorCodeMap, drmOptions = {}, ...rest }) => {
|
|
965
|
+
const components = {
|
|
966
|
+
LinearEnd: __kkcompany_player_react.LiveEnd,
|
|
967
|
+
...rest.slots
|
|
968
|
+
};
|
|
963
969
|
const videoRef = (0, react.useRef)();
|
|
964
970
|
const corePlayerRef = (0, react.useRef)();
|
|
965
971
|
const lastSession$1 = (0, react.useRef)({});
|
|
@@ -1114,7 +1120,8 @@ const PremiumPlusPlayer = ({ controls, preload: preload$1 = "auto", preloadList
|
|
|
1114
1120
|
dispatch,
|
|
1115
1121
|
onAdSkip: () => setTargetPlaybackState("playing")
|
|
1116
1122
|
}), [contentType]);
|
|
1117
|
-
const
|
|
1123
|
+
const sourceStatus = playbackState === "error" ? "error" : components.LinearEnd && contentData.end ? "linear-end" : "init";
|
|
1124
|
+
const [source, startTime] = (0, react.useMemo)(() => [sourceStatus === "init" && getStreamInfo(playbackInfo.sources, {
|
|
1118
1125
|
type: sourceType,
|
|
1119
1126
|
getTextTrackInfo: appSettings.getTextTrackInfo,
|
|
1120
1127
|
licenseUri: playbackInfo.drmPortalUrl,
|
|
@@ -1259,9 +1266,9 @@ const PremiumPlusPlayer = ({ controls, preload: preload$1 = "auto", preloadList
|
|
|
1259
1266
|
onToggle: () => dispatch(uiActions.toggleRecommendationPanel()),
|
|
1260
1267
|
children: recommendation.content || null
|
|
1261
1268
|
}),
|
|
1262
|
-
|
|
1269
|
+
sourceStatus === "linear-end" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1263
1270
|
className: "pinned",
|
|
1264
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1271
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(components.LinearEnd, {
|
|
1265
1272
|
onBack,
|
|
1266
1273
|
onRetry: () => {
|
|
1267
1274
|
handleReset({
|
|
@@ -1347,6 +1354,7 @@ exports.ClassicSettingsContainer = __kkcompany_player_react.ClassicSettingsConta
|
|
|
1347
1354
|
exports.ImaDaiPlugin = __kkcompany_player_plugins.ImaDaiPlugin;
|
|
1348
1355
|
exports.InfoBarExtension = __kkcompany_player_react.InfoBarExtension;
|
|
1349
1356
|
exports.LanguageMenu = __kkcompany_player_react.LanguageMenu;
|
|
1357
|
+
exports.LiveEnd = __kkcompany_player_react.LiveEnd;
|
|
1350
1358
|
exports.MenuItem = __kkcompany_player_react.MenuItem;
|
|
1351
1359
|
exports.OverlayPanel = __kkcompany_player_react.OverlayPanel;
|
|
1352
1360
|
exports.Player = PremiumPlusPlayer_default;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { castMedia, createApi, dispatchChapterEvents, ensureTabLock, getContentInfo, handleIOSHeadphonesDisconnection, initSender, linkCast, selectHlsQualities, selectHlsQualities as selectHlsQualities$1, stopCast, subscribeCastState, subscribeCastState as subscribeCastState$1, validateEnvironment } from "@kkcompany/player/modules";
|
|
2
|
-
import { AutoplayPrompt, Button, CastSender, ClassicLayout, ClassicSettingsContainer, CoverImage, DEBUG_OPTIONS, InfoBarExtension, LanguageMenu, LiveEnd, MenuItem, OverlayPanel, PremiumPlayer, SkipButton, SkipButton as SkipButton$1, classicStyleProps, setupLicenseServerOverride } from "@kkcompany/player/react";
|
|
2
|
+
import { AutoplayPrompt, Button, CastSender, ClassicLayout, ClassicSettingsContainer, CoverImage, DEBUG_OPTIONS, InfoBarExtension, LanguageMenu, LiveEnd, LiveEnd as LiveEnd$1, MenuItem, OverlayPanel, PremiumPlayer, SkipButton, SkipButton as SkipButton$1, classicStyleProps, setupLicenseServerOverride } from "@kkcompany/player/react";
|
|
3
3
|
import { ImaDaiPlugin } from "@kkcompany/player/plugins";
|
|
4
4
|
import { getMediaTime, isLiveDuration } from "@kkcompany/player/core";
|
|
5
5
|
import { useCallback, useEffect, useImperativeHandle, useMemo, useReducer, useRef, useState } from "react";
|
|
@@ -766,6 +766,7 @@ const startPlaybackSession = async (playbackApi, options = {}) => {
|
|
|
766
766
|
const waitForContent = Promise.race([updateContent({ useCache: true }), new Promise((resolve) => {
|
|
767
767
|
setTimeout(resolve, UPDATE_INTERVAL_MS);
|
|
768
768
|
})]);
|
|
769
|
+
performance.mark("session-request");
|
|
769
770
|
const sessionInfo = await playbackApi.startPlayback({
|
|
770
771
|
type: type$1,
|
|
771
772
|
id
|
|
@@ -820,6 +821,7 @@ const startPlaybackSession = async (playbackApi, options = {}) => {
|
|
|
820
821
|
};
|
|
821
822
|
emitter.on("liveEnd", end);
|
|
822
823
|
await waitForContent;
|
|
824
|
+
performance.mark("session-started");
|
|
823
825
|
return {
|
|
824
826
|
...state,
|
|
825
827
|
token: sessionInfo.token,
|
|
@@ -890,7 +892,7 @@ var preload_default = preload;
|
|
|
890
892
|
|
|
891
893
|
//#endregion
|
|
892
894
|
//#region package.json
|
|
893
|
-
var version = "0.5.
|
|
895
|
+
var version = "0.5.4-canary.0";
|
|
894
896
|
|
|
895
897
|
//#endregion
|
|
896
898
|
//#region src/constants.js
|
|
@@ -936,6 +938,10 @@ const getEnterpriseDrmHeaders = ({ token, tokenType = "playback" }) => {
|
|
|
936
938
|
const sessionCache = {};
|
|
937
939
|
const getCastState = () => window.cast?.framework?.CastContext.getInstance()?.getCastState() || CastState.NO_DEVICES_AVAILABLE;
|
|
938
940
|
const PremiumPlusPlayer = ({ controls, preload: preload$1 = "auto", preloadList = [], currentTime, quality, sourceType, host, accessToken, deviceId, headers, params, contentType, contentId, contentKey = `${contentType}/${contentId}`, autoplayNext, thumbnailSeeking, plugins = [], settings: appSettings = {}, coverImageUrl, coverImageDisplay = "auto", recommendation, uiElements: { castButton, ...uiElements } = {}, playerRef, children, slotProps, onError, onApiError, onBack, onPlaybackStateChange, onPlayerLoaded, onChange, onPlaybackApiResponse, sendLog, playbackState: appPlaybackState, turnOnSkipOpening, shouldHideSkipButton = false, playerToModuleErrorCodeMap, drmOptions = {}, ...rest }) => {
|
|
941
|
+
const components = {
|
|
942
|
+
LinearEnd: LiveEnd$1,
|
|
943
|
+
...rest.slots
|
|
944
|
+
};
|
|
939
945
|
const videoRef = useRef();
|
|
940
946
|
const corePlayerRef = useRef();
|
|
941
947
|
const lastSession$1 = useRef({});
|
|
@@ -1090,7 +1096,8 @@ const PremiumPlusPlayer = ({ controls, preload: preload$1 = "auto", preloadList
|
|
|
1090
1096
|
dispatch,
|
|
1091
1097
|
onAdSkip: () => setTargetPlaybackState("playing")
|
|
1092
1098
|
}), [contentType]);
|
|
1093
|
-
const
|
|
1099
|
+
const sourceStatus = playbackState === "error" ? "error" : components.LinearEnd && contentData.end ? "linear-end" : "init";
|
|
1100
|
+
const [source, startTime] = useMemo(() => [sourceStatus === "init" && getStreamInfo(playbackInfo.sources, {
|
|
1094
1101
|
type: sourceType,
|
|
1095
1102
|
getTextTrackInfo: appSettings.getTextTrackInfo,
|
|
1096
1103
|
licenseUri: playbackInfo.drmPortalUrl,
|
|
@@ -1235,9 +1242,9 @@ const PremiumPlusPlayer = ({ controls, preload: preload$1 = "auto", preloadList
|
|
|
1235
1242
|
onToggle: () => dispatch(uiActions.toggleRecommendationPanel()),
|
|
1236
1243
|
children: recommendation.content || null
|
|
1237
1244
|
}),
|
|
1238
|
-
|
|
1245
|
+
sourceStatus === "linear-end" && /* @__PURE__ */ jsx("div", {
|
|
1239
1246
|
className: "pinned",
|
|
1240
|
-
children: /* @__PURE__ */ jsx(
|
|
1247
|
+
children: /* @__PURE__ */ jsx(components.LinearEnd, {
|
|
1241
1248
|
onBack,
|
|
1242
1249
|
onRetry: () => {
|
|
1243
1250
|
handleReset({
|
|
@@ -1316,4 +1323,4 @@ const useAmplitudeLogger = ({ logger: setPlaybackRelatedEvt, remoteInfo: { endpo
|
|
|
1316
1323
|
var useAmplitudeLogger_default = useAmplitudeLogger;
|
|
1317
1324
|
|
|
1318
1325
|
//#endregion
|
|
1319
|
-
export { Button, CastSender, ClassicLayout, ClassicSettingsContainer, ImaDaiPlugin, InfoBarExtension, LanguageMenu, MenuItem, OverlayPanel, PremiumPlusPlayer_default as Player, SkipButton, castMedia, classicStyleProps, dispatchPlaybackError, handleIOSHeadphonesDisconnection, initSender, linkCast, selectHlsQualities, stopCast, subscribeCastState, useAmplitudeLogger_default as useAmplitudeLogger, validateBrowser };
|
|
1326
|
+
export { Button, CastSender, ClassicLayout, ClassicSettingsContainer, ImaDaiPlugin, InfoBarExtension, LanguageMenu, LiveEnd, MenuItem, OverlayPanel, PremiumPlusPlayer_default as Player, SkipButton, castMedia, classicStyleProps, dispatchPlaybackError, handleIOSHeadphonesDisconnection, initSender, linkCast, selectHlsQualities, stopCast, subscribeCastState, useAmplitudeLogger_default as useAmplitudeLogger, validateBrowser };
|