@kkcompany/ott-player 0.5.2 → 0.5.3

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
+ ### [0.5.3](https://gitlab.kkinternal.com/kks-web/blahaj/compare/player@0.5.2...player@0.5.3) (2026-07-03)
6
+
7
+
8
+ ### Features
9
+
10
+ * LinearEnd view is opt-it ([5afc85a](https://gitlab.kkinternal.com/kks-web/blahaj/commit/5afc85a386cf7bfeb166fd893a38a29151ea5265))
11
+
5
12
  ### [0.5.2](https://gitlab.kkinternal.com/kks-web/blahaj/compare/player@0.5.1...player@0.5.2) (2026-06-29)
6
13
 
7
14
 
package/dist/index.cjs CHANGED
@@ -914,7 +914,7 @@ var preload_default = preload;
914
914
 
915
915
  //#endregion
916
916
  //#region package.json
917
- var version = "0.5.2";
917
+ var version = "0.5.3";
918
918
 
919
919
  //#endregion
920
920
  //#region src/constants.js
@@ -960,6 +960,10 @@ const getEnterpriseDrmHeaders = ({ token, tokenType = "playback" }) => {
960
960
  const sessionCache = {};
961
961
  const getCastState = () => window.cast?.framework?.CastContext.getInstance()?.getCastState() || CastState.NO_DEVICES_AVAILABLE;
962
962
  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 }) => {
963
+ const components = {
964
+ LinearEnd: __kkcompany_player_react.LiveEnd,
965
+ ...rest.slots
966
+ };
963
967
  const videoRef = (0, react.useRef)();
964
968
  const corePlayerRef = (0, react.useRef)();
965
969
  const lastSession$1 = (0, react.useRef)({});
@@ -1114,7 +1118,8 @@ const PremiumPlusPlayer = ({ controls, preload: preload$1 = "auto", preloadList
1114
1118
  dispatch,
1115
1119
  onAdSkip: () => setTargetPlaybackState("playing")
1116
1120
  }), [contentType]);
1117
- const [source, startTime] = (0, react.useMemo)(() => [!contentData.end && getStreamInfo(playbackInfo.sources, {
1121
+ const sourceStatus = playbackState === "error" ? "error" : components.LinearEnd && contentData.end ? "linear-end" : "init";
1122
+ const [source, startTime] = (0, react.useMemo)(() => [sourceStatus === "init" && getStreamInfo(playbackInfo.sources, {
1118
1123
  type: sourceType,
1119
1124
  getTextTrackInfo: appSettings.getTextTrackInfo,
1120
1125
  licenseUri: playbackInfo.drmPortalUrl,
@@ -1259,9 +1264,9 @@ const PremiumPlusPlayer = ({ controls, preload: preload$1 = "auto", preloadList
1259
1264
  onToggle: () => dispatch(uiActions.toggleRecommendationPanel()),
1260
1265
  children: recommendation.content || null
1261
1266
  }),
1262
- contentData.end && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1267
+ sourceStatus === "linear-end" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1263
1268
  className: "pinned",
1264
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__kkcompany_player_react.LiveEnd, {
1269
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(components.LinearEnd, {
1265
1270
  onBack,
1266
1271
  onRetry: () => {
1267
1272
  handleReset({
@@ -1347,6 +1352,7 @@ exports.ClassicSettingsContainer = __kkcompany_player_react.ClassicSettingsConta
1347
1352
  exports.ImaDaiPlugin = __kkcompany_player_plugins.ImaDaiPlugin;
1348
1353
  exports.InfoBarExtension = __kkcompany_player_react.InfoBarExtension;
1349
1354
  exports.LanguageMenu = __kkcompany_player_react.LanguageMenu;
1355
+ exports.LiveEnd = __kkcompany_player_react.LiveEnd;
1350
1356
  exports.MenuItem = __kkcompany_player_react.MenuItem;
1351
1357
  exports.OverlayPanel = __kkcompany_player_react.OverlayPanel;
1352
1358
  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";
@@ -890,7 +890,7 @@ var preload_default = preload;
890
890
 
891
891
  //#endregion
892
892
  //#region package.json
893
- var version = "0.5.2";
893
+ var version = "0.5.3";
894
894
 
895
895
  //#endregion
896
896
  //#region src/constants.js
@@ -936,6 +936,10 @@ const getEnterpriseDrmHeaders = ({ token, tokenType = "playback" }) => {
936
936
  const sessionCache = {};
937
937
  const getCastState = () => window.cast?.framework?.CastContext.getInstance()?.getCastState() || CastState.NO_DEVICES_AVAILABLE;
938
938
  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 }) => {
939
+ const components = {
940
+ LinearEnd: LiveEnd$1,
941
+ ...rest.slots
942
+ };
939
943
  const videoRef = useRef();
940
944
  const corePlayerRef = useRef();
941
945
  const lastSession$1 = useRef({});
@@ -1090,7 +1094,8 @@ const PremiumPlusPlayer = ({ controls, preload: preload$1 = "auto", preloadList
1090
1094
  dispatch,
1091
1095
  onAdSkip: () => setTargetPlaybackState("playing")
1092
1096
  }), [contentType]);
1093
- const [source, startTime] = useMemo(() => [!contentData.end && getStreamInfo(playbackInfo.sources, {
1097
+ const sourceStatus = playbackState === "error" ? "error" : components.LinearEnd && contentData.end ? "linear-end" : "init";
1098
+ const [source, startTime] = useMemo(() => [sourceStatus === "init" && getStreamInfo(playbackInfo.sources, {
1094
1099
  type: sourceType,
1095
1100
  getTextTrackInfo: appSettings.getTextTrackInfo,
1096
1101
  licenseUri: playbackInfo.drmPortalUrl,
@@ -1235,9 +1240,9 @@ const PremiumPlusPlayer = ({ controls, preload: preload$1 = "auto", preloadList
1235
1240
  onToggle: () => dispatch(uiActions.toggleRecommendationPanel()),
1236
1241
  children: recommendation.content || null
1237
1242
  }),
1238
- contentData.end && /* @__PURE__ */ jsx("div", {
1243
+ sourceStatus === "linear-end" && /* @__PURE__ */ jsx("div", {
1239
1244
  className: "pinned",
1240
- children: /* @__PURE__ */ jsx(LiveEnd, {
1245
+ children: /* @__PURE__ */ jsx(components.LinearEnd, {
1241
1246
  onBack,
1242
1247
  onRetry: () => {
1243
1248
  handleReset({
@@ -1316,4 +1321,4 @@ const useAmplitudeLogger = ({ logger: setPlaybackRelatedEvt, remoteInfo: { endpo
1316
1321
  var useAmplitudeLogger_default = useAmplitudeLogger;
1317
1322
 
1318
1323
  //#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 };
1324
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kkcompany/ott-player",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./dist/index.mjs",