zarebin-player-library 1.1.9 → 1.1.11

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.
@@ -1,4 +1,2 @@
1
- declare const UnMuteVideo: ({ advertisement }: {
2
- advertisement?: boolean;
3
- }) => import("react/jsx-runtime").JSX.Element;
1
+ declare const UnMuteVideo: () => import("react/jsx-runtime").JSX.Element;
4
2
  export default UnMuteVideo;
@@ -11509,9 +11509,9 @@ video {
11509
11509
  }.pl-size-4{
11510
11510
  width: 1rem;
11511
11511
  height: 1rem;
11512
- }.pl-size-6{
11513
- width: 1.5rem;
11514
- height: 1.5rem;
11512
+ }.pl-size-5{
11513
+ width: 1.25rem;
11514
+ height: 1.25rem;
11515
11515
  }.pl-size-full{
11516
11516
  width: 100%;
11517
11517
  height: 100%;
@@ -13293,6 +13293,9 @@ video {
13293
13293
  height: 2.75rem;
13294
13294
  }.lg\:pl-w-\[40\%\]{
13295
13295
  width: 40%;
13296
+ }.lg\:pl-px-3{
13297
+ padding-left: 0.75rem;
13298
+ padding-right: 0.75rem;
13296
13299
  }.lg\:pl-pb-4{
13297
13300
  padding-bottom: 1rem;
13298
13301
  }.lg\:pl-text-\[14px\]{
@@ -10493,7 +10493,8 @@ var handleChangeSoundVolume = (volume) => {
10493
10493
  ...settings,
10494
10494
  volume
10495
10495
  }));
10496
- if (conditions(ConditionName.isIOS)) videoTag().muted = !videoTag().muted;
10496
+ if (conditions(ConditionName.isIOS)) if (conditions(ConditionName.hasAd)) videoTag().muted = false;
10497
+ else videoTag().muted = !videoTag().muted;
10497
10498
  else videoTag().volume = volume / 100;
10498
10499
  };
10499
10500
  var handleIsLive = () => {
@@ -68937,7 +68938,6 @@ var useVideoControls = (ad, params) => {
68937
68938
  };
68938
68939
  const handlePause = () => {
68939
68940
  setIsCounting(false);
68940
- setIsPaused(true);
68941
68941
  if (firstPlay) handleChangeSoundVolume(100);
68942
68942
  setFirstPlay(false);
68943
68943
  };
@@ -68961,8 +68961,13 @@ var useVideoControls = (ad, params) => {
68961
68961
  const playPromise = video.play();
68962
68962
  dispatch(setPlay(true));
68963
68963
  if (playPromise !== void 0) playPromise.then(() => {
68964
- handleChangeSoundVolume(100);
68965
- dispatch(setFirstMute(false));
68964
+ if (!isIOS()) {
68965
+ handleChangeSoundVolume(100);
68966
+ dispatch(setFirstMute(false));
68967
+ } else {
68968
+ handleChangeSoundVolume(0);
68969
+ dispatch(setFirstMute(true));
68970
+ }
68966
68971
  }).catch(() => {
68967
68972
  handleChangeSoundVolume(0);
68968
68973
  dispatch(setFirstMute(true));
@@ -69041,14 +69046,14 @@ var SkipButton = ({ skipCounter }) => {
69041
69046
  };
69042
69047
  //#endregion
69043
69048
  //#region src/videoPlayerLibrary/shared/ui/src/components/advertisement/UnMuteVideo.tsx
69044
- var UnMuteVideo = ({ advertisement }) => /* @__PURE__ */ jsxs("div", {
69045
- className: `pl-flex pl-cursor-pointer pl-items-center pl-rounded-lg pl-bg-gray-500 ${!advertisement ? "pl-absolute -pl-left-2 pl-top-[60px]" : ""} ${conditions(ConditionName.isTouchScreen) ? "pl-gap-1 pl-px-2 pl-py-[10px]" : "!pl-left-8 pl-gap-2 pl-p-3"} ${conditions(ConditionName.isTouchScreen) && "pl-mx-4"}`,
69049
+ var UnMuteVideo = () => /* @__PURE__ */ jsxs("div", {
69050
+ className: `pl-absolute pl-left-0 pl-top-[10px] pl-flex pl-cursor-pointer pl-items-center pl-rounded-lg pl-bg-gray-500 ${conditions(ConditionName.isTouchScreen) ? "pl-gap-1 pl-px-2 pl-py-2" : "!pl-left-8 pl-gap-2 pl-p-3"} ${conditions(ConditionName.isTouchScreen) && "pl-mx-4"}`,
69046
69051
  children: [/* @__PURE__ */ jsx("img", {
69047
69052
  src: IMAGES.mute,
69048
69053
  alt: "mute icon",
69049
- className: `pl-shrink-0 ${conditions(ConditionName.isTouchScreen) ? "pl-size-4" : "pl-size-6"}`
69054
+ className: `pl-shrink-0 ${conditions(ConditionName.isTouchScreen) ? "pl-size-4" : "pl-size-5"}`
69050
69055
  }), /* @__PURE__ */ jsx("p", {
69051
- className: `pl-text-[14px] ${!advertisement ? "pl-whitespace-nowrap" : ""} pl-font-medium dark:pl-text-secondary-100`,
69056
+ className: `pl-whitespace-nowrap pl-text-[14px] pl-font-medium dark:pl-text-secondary-100`,
69052
69057
  children: "برای پخش صدا روی ویدیو ضربه بزنید."
69053
69058
  })]
69054
69059
  });
@@ -69137,22 +69142,22 @@ var Advertisement = () => {
69137
69142
  await handleFullScreen();
69138
69143
  await handleLockOrientation();
69139
69144
  },
69140
- className: `pl-flex pl-h-full pl-w-full pl-flex-col pl-justify-end pl-bg-dark-1 ${conditions(ConditionName.isFullScreen) && "!pl-fixed !pl-right-0 !pl-top-0 !pl-h-screen !pl-w-screen"}`,
69141
- style: { zIndex: 1e5 },
69145
+ className: `pl-flex pl-h-full pl-relative pl-w-full pl-flex-col pl-justify-end pl-bg-dark-1 ${conditions(ConditionName.isFullScreen) && "!pl-fixed !pl-right-0 !pl-top-0 !pl-h-screen !pl-w-screen"}`,
69146
+ style: { zIndex: 100001 },
69142
69147
  children: [
69143
69148
  /* @__PURE__ */ jsx("video", {
69144
69149
  id: "player-tag",
69145
69150
  src: adData?.url + `?uuid=${getUUID()}`,
69146
69151
  autoPlay: true,
69147
69152
  playsInline: true,
69148
- className: "pl-absolute pl-top-0 pl-size-full"
69153
+ className: "pl-size-full"
69149
69154
  }),
69150
69155
  /* @__PURE__ */ jsxs("div", {
69151
69156
  className: `pl-relative pl-flex pl-h-full pl-w-full pl-flex-col pl-justify-between ${conditions(ConditionName.isTouchScreen) ? "pl-pb-3 pl-pt-4 lg:pl-pb-4" : "pl-pb-5 pl-pt-[30px]"}`,
69152
69157
  children: [
69153
69158
  /* @__PURE__ */ jsx("div", {
69154
- className: `pl-relative pl-z-[3] pl-flex pl-items-center pl-gap-5 pl-self-end pl-px-3 ${conditions(ConditionName.isTouchScreenPortrait) && "!pl-h-max !pl-flex-col-reverse !pl-items-start !pl-gap-0 !pl-self-start"} ${conditions(ConditionName.isTouchScreenLandscape) && "!pl-flex-row-reverse !pl-justify-between !pl-self-stretch"}`,
69155
- children: firstMute && /* @__PURE__ */ jsx(UnMuteVideo, { advertisement: true })
69159
+ className: `pl-z-[3] pl-flex pl-items-center pl-gap-5 pl-self-end pl-px-2 lg:pl-px-3 ${conditions(ConditionName.isTouchScreenPortrait) && "!pl-h-max !pl-flex-col-reverse !pl-items-start !pl-gap-0 !pl-self-start"} ${conditions(ConditionName.isTouchScreenLandscape) && "!pl-flex-row-reverse !pl-justify-between !pl-self-stretch"}`,
69160
+ children: firstMute && /* @__PURE__ */ jsx(UnMuteVideo, {})
69156
69161
  }),
69157
69162
  /* @__PURE__ */ jsx("div", {
69158
69163
  className: `pl-absolute pl-inset-0 pl-z-[2] pl-flex pl-items-center pl-justify-center pl-transition-opacity pl-duration-500 pl-ease-in-out ${showControls ? "pl-opacity-100" : "pl-pointer-events-none pl-opacity-0"}`,