zarebin-player-library 1.0.36 → 1.0.38

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.
@@ -93,7 +93,7 @@ export interface IParams {
93
93
  homeButtonClickFlag?: number | null;
94
94
  ad?: {
95
95
  adUserId: string;
96
- onAdView?: () => void;
96
+ onAdView?: (ad: Ad) => void;
97
97
  } | undefined;
98
98
  redirectOnEndedUrl?: string;
99
99
  lang?: "ar" | "fa" | "en";
@@ -1144,7 +1144,7 @@ export type Ad = {
1144
1144
  channel: number;
1145
1145
  banner?: string;
1146
1146
  video_id?: number;
1147
- user_id?: number;
1147
+ user_id?: number | null;
1148
1148
  content_id?: number;
1149
1149
  content_type?: number;
1150
1150
  };
@@ -68934,7 +68934,7 @@ var useVideoControls = (ad, params) => {
68934
68934
  setIsCounting(true);
68935
68935
  setIsPaused(false);
68936
68936
  if (firstPlayRef.current) {
68937
- params.ad.onAdView();
68937
+ params.ad.onAdView(ad);
68938
68938
  setFirstPlay(false);
68939
68939
  }
68940
68940
  };
@@ -69106,13 +69106,18 @@ var VideoControls = ({ progress, buffered, duration, currentTime, showControls }
69106
69106
  //#endregion
69107
69107
  //#region src/videoPlayerLibrary/shared/ui/src/components/advertisement/Advertisement.tsx
69108
69108
  var Advertisement = () => {
69109
- const { params, firstMute, adData } = useAppSelector(({ videoData: { params, adData }, controller: { firstMute } }) => ({
69109
+ const { params, firstMute, adData, details } = useAppSelector(({ videoData: { params, adData, details }, controller: { firstMute } }) => ({
69110
69110
  params,
69111
69111
  firstMute,
69112
- adData
69112
+ adData,
69113
+ details
69113
69114
  }), shallowEqual);
69114
69115
  const dispatch = useAppDispatch();
69115
- const { progress, buffered, currentTime, duration, isPaused, skipCounter, hasSkip } = useVideoControls(adData, params);
69116
+ const { progress, buffered, currentTime, duration, isPaused, skipCounter, hasSkip } = useVideoControls({
69117
+ ...adData,
69118
+ video_id: details.id,
69119
+ user_id: details.user_id
69120
+ }, params);
69116
69121
  const containerRef = useRef(null);
69117
69122
  const { showControls, resetTimer } = useControlsVisibility(isPaused);
69118
69123
  useEffect(() => {