cafe-video-player 2.3.3 → 2.4.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/VideoHighLighter-D5Y7XONG.js +2 -0
- package/VideoHighLighter-D5Y7XONG.js.map +1 -0
- package/VideoHighLighter-IO7MB53J.mjs +2 -0
- package/VideoHighLighter-IO7MB53J.mjs.map +1 -0
- package/chunk-5FTEBU6O.js.map +1 -1
- package/chunk-7GSH5XMZ.js.map +1 -1
- package/chunk-A7MEJC4F.mjs.map +1 -1
- package/chunk-BOS4UPEA.js.map +1 -1
- package/chunk-D7CTAABP.js.map +1 -1
- package/chunk-EDQKSY4F.js.map +1 -1
- package/chunk-HME64W2O.js.map +1 -1
- package/chunk-IGINC4KI.js.map +1 -1
- package/chunk-J6UYAT2V.mjs.map +1 -1
- package/chunk-KIC75NSX.mjs.map +1 -1
- package/chunk-MZP43FH7.mjs.map +1 -1
- package/chunk-NXC6LNWJ.mjs.map +1 -1
- package/{chunk-4RRUNHWO.mjs → chunk-NZZC5HJ2.mjs} +4 -4
- package/chunk-NZZC5HJ2.mjs.map +1 -0
- package/chunk-O6OWG7HM.mjs.map +1 -1
- package/chunk-OEFD3YXU.mjs.map +1 -1
- package/chunk-PJVN7RKN.mjs.map +1 -1
- package/chunk-QHZJEU27.js.map +1 -1
- package/{chunk-WZY5UTDQ.js → chunk-SHHWXSU2.js} +4 -4
- package/chunk-SHHWXSU2.js.map +1 -0
- package/chunk-SIUJSGLY.mjs.map +1 -1
- package/chunk-TDHILUXF.js.map +1 -1
- package/chunk-TM66GJCG.mjs.map +1 -1
- package/chunk-TVDVQALL.js.map +1 -1
- package/chunk-VIQ5L73J.js.map +1 -1
- package/chunk-VIUNI5PQ.mjs.map +1 -1
- package/chunk-WO4IQUGO.js.map +1 -1
- package/chunk-YZYTKWCY.mjs.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/nonStaticVideoTag-C2LVXINP.mjs.map +1 -1
- package/nonStaticVideoTag-C6MCWMG2.js.map +1 -1
- package/notActive-FNSATJST.mjs.map +1 -1
- package/notActive-YTLKQJYE.js.map +1 -1
- package/package.json +1 -1
- package/{staticPlayer-TVQ5X5HP.js → staticPlayer-G7CWQS2I.js} +2 -2
- package/staticPlayer-G7CWQS2I.js.map +1 -0
- package/{staticPlayer-NBAO6BRV.mjs → staticPlayer-JB7IW4MV.mjs} +2 -2
- package/{staticPlayer-TVQ5X5HP.js.map → staticPlayer-JB7IW4MV.mjs.map} +1 -1
- package/staticVideoTag-TO5HBYDE.mjs.map +1 -1
- package/staticVideoTag-YUBA5OAZ.js.map +1 -1
- package/touchVolumeBrightness-27EBEX5W.mjs.map +1 -1
- package/touchVolumeBrightness-KAAGMQWI.js.map +1 -1
- package/{videoArea-QVYICN4X.mjs → videoArea-53VNHKQV.mjs} +2 -2
- package/{videoArea-QVYICN4X.mjs.map → videoArea-53VNHKQV.mjs.map} +1 -1
- package/{videoArea-4JINI27J.js → videoArea-SCS3UO6S.js} +2 -2
- package/{videoArea-4JINI27J.js.map → videoArea-SCS3UO6S.js.map} +1 -1
- package/videoPlayerStyles.css +8 -0
- package/{vodPlayer-7NT4IXTL.mjs → vodPlayer-B4VLF5TP.mjs} +2 -2
- package/vodPlayer-B4VLF5TP.mjs.map +1 -0
- package/{vodPlayer-IIS4NQTV.js → vodPlayer-TF7TO66R.js} +2 -2
- package/vodPlayer-TF7TO66R.js.map +1 -0
- package/VideoHighLighter-U4GGV66X.mjs +0 -2
- package/VideoHighLighter-U4GGV66X.mjs.map +0 -1
- package/VideoHighLighter-ZAC6DXOM.js +0 -2
- package/VideoHighLighter-ZAC6DXOM.js.map +0 -1
- package/chunk-4RRUNHWO.mjs.map +0 -1
- package/chunk-WZY5UTDQ.js.map +0 -1
- package/staticPlayer-NBAO6BRV.mjs.map +0 -1
- package/vodPlayer-7NT4IXTL.mjs.map +0 -1
- package/vodPlayer-IIS4NQTV.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkTDHILUXF_js=require('./chunk-TDHILUXF.js');require('./chunk-VIQ5L73J.js');var chunkHME64W2O_js=require('./chunk-HME64W2O.js'),chunk5FTEBU6O_js=require('./chunk-5FTEBU6O.js'),chunkWO4IQUGO_js=require('./chunk-WO4IQUGO.js'),reactRedux=require('react-redux'),jsxRuntime=require('react/jsx-runtime'),reactCircularProgressbar=require('react-circular-progressbar'),s=require('next/legacy/image');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var s__default=/*#__PURE__*/_interopDefault(s);chunkWO4IQUGO_js.e();chunkWO4IQUGO_js.e();var h=()=>jsxRuntime.jsx("div",{role:"status",className:`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${!chunkHME64W2O_js.fa("isTouchScreen")&&"pl-rounded-lg"} pl-animate-pulse dark:pl-bg-gray-700`,children:jsxRuntime.jsx("span",{className:"pl-sr-only",children:"Loading..."})}),u=h;var w=()=>{let{params:e}=chunkHME64W2O_js.ha(({videoData:{params:f}})=>({params:f}),reactRedux.shallowEqual);return chunkTDHILUXF_js.d(),jsxRuntime.jsxs("div",{id:"video-area",className:`pl-relative pl-rounded-[12px] pl-w-full pl-h-full pl-aspect-video !pl-overflow-hidden ${chunkHME64W2O_js.fa("isTouchScreen")&&"pl-rounded-none"} ${chunkHME64W2O_js.fa("isFullScreen")&&"!pl-overflow-hidden pl-fixed pl-top-0 pl-right-0 pl-w-screen pl-h-screen pl-rounded-none"}`,children:[e.vhl_status&&e.vhl_status!=="skeleton"&&jsxRuntime.jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-gap-2 pl-size-full",children:[e.banner&&jsxRuntime.jsxs("div",{className:"pl-w-full pl-aspect-video pl-absolute",children:[jsxRuntime.jsx(s__default.default,{src:e.banner,alt:"banner",layout:"fill",className:"pl-w-full pl-aspect-video"}),jsxRuntime.jsx("div",{className:"pl-absolute pl-inset-0 pl-bg-black/50 pl-rounded-lg"})]}),jsxRuntime.jsx("div",{}),e.vhl_status==="download_start"&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] tablet:!pl-max-w-[305px] desktop:!pl-max-w-[198px] pl-mx-auto pl-py-2 tablet:pl-py-[12.32px] desktop:pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2 tablet:pl-gap-[12.32px] desktop:pl-gap-2",children:[jsxRuntime.jsx("svg",{style:{height:0,position:"absolute"},children:jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:"gradientColor",x1:"0",y1:"0",x2:"1",y2:"1",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:"#FF649D"}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:"#A50C4B"})]})})}),jsxRuntime.jsx(reactCircularProgressbar.CircularProgressbarWithChildren,{value:e.vhl_progress,className:"pl-size-[50px]",styles:reactCircularProgressbar.buildStyles({trailColor:"rgba(0, 0, 0, 0.1)",pathColor:"url(#gradientColor)"}),children:jsxRuntime.jsxs("p",{className:"pl-text-text-primary pl-text-[14px] pl-font-medium",children:[e.vhl_progress,"%"]})}),jsxRuntime.jsx("p",{className:"pl-text-text-primary pl-text-[10px] pl-font-normal",children:e.vhl_statusText})]})}),e.vhl_status==="download_error"&&jsxRuntime.jsxs("div",{className:"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] pl-mx-auto pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2",children:[jsxRuntime.jsx(s__default.default,{alt:"info-circle-icon",src:chunk5FTEBU6O_js.a.infoCircle,width:32,height:32}),jsxRuntime.jsx("p",{className:"pl-text-[10px] pl-font-normal pl-text-text-primary",children:e.vhl_statusText}),jsxRuntime.jsxs("button",{className:"pl-flex pl-items-center pl-gap-2",onClick:()=>e.vhl_onRetry(),children:[jsxRuntime.jsx(s__default.default,{alt:"rotate-red-icon",src:chunk5FTEBU6O_js.a.rotateRed,width:14,height:14}),jsxRuntime.jsx("span",{className:"pl-text-primary pl-text-[10px] pl-font-normal",children:"\u062A\u0644\u0627\u0634 \u062F\u0648\u0628\u0627\u0631\u0647"})]})]}),jsxRuntime.jsxs("div",{className:`pl-flex ${chunkHME64W2O_js.fa("isTouchScreenPortrait")?"pl-flex-col":`pl-flex-col-reverse pl-mb-3 ${chunkHME64W2O_js.fa("isFullScreen")&&"pl-mb-8"}`} pl-gap-[14.58px]`,children:[jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center pl-justify-between ${chunkHME64W2O_js.fa("isFullScreen")?"pl-mx-8":"pl-mx-[14.58px]"}`,children:[jsxRuntime.jsx(chunkTDHILUXF_js.b,{}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[14.58px]",children:[e.vhl_duration&&jsxRuntime.jsxs("div",{className:"pl-text-Common-white pl-text-[10.93px] pl-font-normal pl-relative",children:[jsxRuntime.jsx("span",{children:chunkHME64W2O_js.S(0)}),jsxRuntime.jsx("span",{children:"/"}),jsxRuntime.jsx("span",{children:chunkHME64W2O_js.S(e.vhl_duration)})]}),jsxRuntime.jsx(chunkTDHILUXF_js.c,{})]})]}),jsxRuntime.jsx("div",{className:"pl-w-full pl-h-[3.64px] pl-bg-gray-highLight pl-animate-pulse"})]})]}),e.vhl_status==="skeleton"&&jsxRuntime.jsx(u,{})]})},R=w;module.exports=R;//# sourceMappingURL=VideoHighLighter-D5Y7XONG.js.map
|
|
2
|
+
//# sourceMappingURL=VideoHighLighter-D5Y7XONG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/components/videoPlayer/videoHighLighter/VideoHighLighter.tsx","../src/videoPlayerLibrary/components/custom-components/skeleton/Skeleton.tsx"],"names":["init_cjs_shims","Skeleton","jsx","conditions","Skeleton_default","VideoHighLighter","params","useAppSelector","shallowEqual","useFullScreen_default","jsxs","Image","Fragment","CircularProgressbarWithChildren","buildStyles","importImages_default","fullScreen_default","secondsToHMS","soundVolume_default","VideoHighLighter_default"],"mappings":"4gBAAAA,kBAAAA,EAAAA,CCAAA,kBAAAA,EAAAA,CAGA,IAAMC,EAAW,IAEbC,cAAAA,CAAC,OACC,IAAA,CAAK,QAAA,CACL,UAAW,CAAA,sEAAA,EAAyE,CAACC,mCAAsC,CAAA,EAAK,eAAe,CAAA,qCAAA,CAAA,CAE/I,QAAA,CAAAD,eAAC,MAAA,CAAA,CAAK,SAAA,CAAU,aAAa,QAAA,CAAA,YAAA,CAAU,CAAA,CACzC,EAIGE,CAAAA,CAAQH,CAAAA,KDDTI,CAAAA,CAAmB,IAAM,CAC7B,GAAM,CAAE,OAAAC,CAAO,CAAA,CAAIC,oBAAe,CAAC,CAAE,UAAW,CAAE,MAAA,CAAAD,CAAO,CAAE,CAAA,IAAO,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAA,CAAIE,uBAAY,EAC3F,OAAAC,kBAAAA,GAGEC,eAAAA,CAAC,KAAA,CAAA,CACC,GAAG,YAAA,CACH,SAAA,CAAW,yFACTP,mBAAAA,CAAAA,eAAsC,CAAA,EAAK,iBAC7C,CAAA,CAAA,EAAIA,mBAAAA,CAAAA,cAAqC,GAAK,0FAA0F,CAAA,CAAA,CAEvI,QAAA,CAAA,CAAAG,CAAAA,CAAO,YAAcA,CAAAA,CAAO,UAAA,GAAe,YAC1CI,eAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,8DAAA,CACZ,QAAA,CAAA,CAAAJ,EAAO,MAAA,EACNI,eAAAA,CAAC,OAAI,SAAA,CAAU,uCAAA,CACb,UAAAR,cAAAA,CAACS,kBAAAA,CAAA,CAAM,GAAA,CAAKL,CAAAA,CAAO,MAAA,CAAQ,GAAA,CAAI,SAAS,MAAA,CAAO,MAAA,CAAO,UAAU,2BAAA,CAA4B,CAAA,CAC5FJ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A,CAAAe,mBAAaX,CAAAA,CAAO,YAAY,EAAE,CAAA,CAAA,CAC3C,CAAA,CAEFJ,eAACgB,kBAAAA,CAAA,EAAY,GACf,CAAA,CAAA,CACF,CAAA,CACAhB,eAAC,KAAA,CAAA,CAAI,SAAA,CAAU,gEAAgE,CAAA,CAAA,CACjF,CAAA,CAAA,CACF,EAEDI,CAAAA,CAAO,UAAA,GAAe,YAAcJ,cAAAA,CAACE,CAAAA,CAAA,EAAS,CAAA,CAAA,CACjD,CAEJ,EAEOe,CAAAA,CAAQd","file":"VideoHighLighter-D5Y7XONG.js","sourcesContent":["import { shallowEqual } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport Skeleton from \"../../custom-components/skeleton/Skeleton\";\r\nimport FullScreen from \"../../custom-components/fullScreen/fullScreen\";\r\nimport SoundVolume from \"../../custom-components/soundVolume/soundVolume\";\r\nimport { secondsToHMS } from \"../../../helpers/helpers\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { buildStyles, CircularProgressbarWithChildren } from \"react-circular-progressbar\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/legacy/image\";\r\nimport useFullScreen from \"../../../helpers/hooks/useFullScreen\";\r\n\r\nconst VideoHighLighter = () => {\r\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n useFullScreen();\r\n\r\n return (\r\n <div\r\n id=\"video-area\"\r\n className={`pl-relative pl-rounded-[12px] pl-w-full pl-h-full pl-aspect-video !pl-overflow-hidden ${\r\n conditions(ConditionName.isTouchScreen) && \"pl-rounded-none\"\r\n } ${conditions(ConditionName.isFullScreen) && \"!pl-overflow-hidden pl-fixed pl-top-0 pl-right-0 pl-w-screen pl-h-screen pl-rounded-none\"}`}\r\n >\r\n {params.vhl_status && params.vhl_status !== \"skeleton\" && (\r\n <div className=\"pl-flex pl-flex-col pl-justify-between pl-gap-2 pl-size-full\">\r\n {params.banner && (\r\n <div className=\"pl-w-full pl-aspect-video pl-absolute\">\r\n <Image src={params.banner} alt=\"banner\" layout=\"fill\" className=\"pl-w-full pl-aspect-video\" />\r\n <div className=\"pl-absolute pl-inset-0 pl-bg-black/50 pl-rounded-lg\" />\r\n </div>\r\n )}\r\n <div />\r\n {params.vhl_status === \"download_start\" && (\r\n <>\r\n <div className=\"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] tablet:!pl-max-w-[305px] desktop:!pl-max-w-[198px] pl-mx-auto pl-py-2 tablet:pl-py-[12.32px] desktop:pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2 tablet:pl-gap-[12.32px] desktop:pl-gap-2\">\r\n <svg style={{ height: 0, position: \"absolute\" }}>\r\n <defs>\r\n <linearGradient id=\"gradientColor\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\r\n <stop offset=\"0%\" stopColor=\"#FF649D\" />\r\n <stop offset=\"100%\" stopColor=\"#A50C4B\" />\r\n </linearGradient>\r\n </defs>\r\n </svg>\r\n <CircularProgressbarWithChildren\r\n value={params.vhl_progress!}\r\n className=\"pl-size-[50px]\"\r\n styles={buildStyles({\r\n trailColor: \"rgba(0, 0, 0, 0.1)\",\r\n pathColor: \"url(#gradientColor)\",\r\n })}\r\n >\r\n <p className=\"pl-text-text-primary pl-text-[14px] pl-font-medium\">{params.vhl_progress}%</p>\r\n </CircularProgressbarWithChildren>\r\n <p className=\"pl-text-text-primary pl-text-[10px] pl-font-normal\">{params.vhl_statusText}</p>\r\n </div>\r\n </>\r\n )}\r\n {params.vhl_status === \"download_error\" && (\r\n <div className=\"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] pl-mx-auto pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2\">\r\n <Image alt=\"info-circle-icon\" src={IMAGES.infoCircle} width={32} height={32} />\r\n <p className=\"pl-text-[10px] pl-font-normal pl-text-text-primary\">{params.vhl_statusText}</p>\r\n <button className=\"pl-flex pl-items-center pl-gap-2\" onClick={() => params.vhl_onRetry!()}>\r\n <Image alt=\"rotate-red-icon\" src={IMAGES.rotateRed} width={14} height={14} />\r\n <span className=\"pl-text-primary pl-text-[10px] pl-font-normal\">تلاش دوباره</span>\r\n </button>\r\n </div>\r\n )}\r\n <div\r\n className={`pl-flex ${\r\n !conditions(ConditionName.isTouchScreenPortrait)\r\n ? `pl-flex-col-reverse pl-mb-3 ${conditions(ConditionName.isFullScreen) && \"pl-mb-8\"}`\r\n : \"pl-flex-col\"\r\n } pl-gap-[14.58px]`}\r\n >\r\n <div className={`pl-flex pl-items-center pl-justify-between ${conditions(ConditionName.isFullScreen) ? \"pl-mx-8\" : \"pl-mx-[14.58px]\"}`}>\r\n <FullScreen />\r\n <div className={`pl-flex pl-items-center pl-gap-[14.58px]`}>\r\n {params.vhl_duration && (\r\n <div className=\"pl-text-Common-white pl-text-[10.93px] pl-font-normal pl-relative\">\r\n <span>{secondsToHMS(0)}</span>\r\n <span>/</span>\r\n <span>{secondsToHMS(params.vhl_duration)}</span>\r\n </div>\r\n )}\r\n <SoundVolume />\r\n </div>\r\n </div>\r\n <div className=\"pl-w-full pl-h-[3.64px] pl-bg-gray-highLight pl-animate-pulse\" />\r\n </div>\r\n </div>\r\n )}\r\n {params.vhl_status === \"skeleton\" && <Skeleton />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default VideoHighLighter;\r\n","import { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\n\r\nconst Skeleton = () => {\r\n return (\r\n <div\r\n role=\"status\"\r\n className={`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${!conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"} pl-animate-pulse dark:pl-bg-gray-700`}\r\n >\r\n <span className=\"pl-sr-only\">Loading...</span>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Skeleton;\r\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {d,b,c}from'./chunk-O6OWG7HM.mjs';import'./chunk-PJVN7RKN.mjs';import {ha,fa,S}from'./chunk-YZYTKWCY.mjs';import {a}from'./chunk-TM66GJCG.mjs';import {e}from'./chunk-NXC6LNWJ.mjs';import {shallowEqual}from'react-redux';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {CircularProgressbarWithChildren,buildStyles}from'react-circular-progressbar';import s from'next/legacy/image';e();e();var g=()=>jsx("div",{role:"status",className:`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${!fa("isTouchScreen")&&"pl-rounded-lg"} pl-animate-pulse dark:pl-bg-gray-700`,children:jsx("span",{className:"pl-sr-only",children:"Loading..."})}),u=g;var N=()=>{let{params:e}=ha(({videoData:{params:f}})=>({params:f}),shallowEqual);return d(),jsxs("div",{id:"video-area",className:`pl-relative pl-rounded-[12px] pl-w-full pl-h-full pl-aspect-video !pl-overflow-hidden ${fa("isTouchScreen")&&"pl-rounded-none"} ${fa("isFullScreen")&&"!pl-overflow-hidden pl-fixed pl-top-0 pl-right-0 pl-w-screen pl-h-screen pl-rounded-none"}`,children:[e.vhl_status&&e.vhl_status!=="skeleton"&&jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-gap-2 pl-size-full",children:[e.banner&&jsxs("div",{className:"pl-w-full pl-aspect-video pl-absolute",children:[jsx(s,{src:e.banner,alt:"banner",layout:"fill",className:"pl-w-full pl-aspect-video"}),jsx("div",{className:"pl-absolute pl-inset-0 pl-bg-black/50 pl-rounded-lg"})]}),jsx("div",{}),e.vhl_status==="download_start"&&jsx(Fragment,{children:jsxs("div",{className:"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] tablet:!pl-max-w-[305px] desktop:!pl-max-w-[198px] pl-mx-auto pl-py-2 tablet:pl-py-[12.32px] desktop:pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2 tablet:pl-gap-[12.32px] desktop:pl-gap-2",children:[jsx("svg",{style:{height:0,position:"absolute"},children:jsx("defs",{children:jsxs("linearGradient",{id:"gradientColor",x1:"0",y1:"0",x2:"1",y2:"1",children:[jsx("stop",{offset:"0%",stopColor:"#FF649D"}),jsx("stop",{offset:"100%",stopColor:"#A50C4B"})]})})}),jsx(CircularProgressbarWithChildren,{value:e.vhl_progress,className:"pl-size-[50px]",styles:buildStyles({trailColor:"rgba(0, 0, 0, 0.1)",pathColor:"url(#gradientColor)"}),children:jsxs("p",{className:"pl-text-text-primary pl-text-[14px] pl-font-medium",children:[e.vhl_progress,"%"]})}),jsx("p",{className:"pl-text-text-primary pl-text-[10px] pl-font-normal",children:e.vhl_statusText})]})}),e.vhl_status==="download_error"&&jsxs("div",{className:"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] pl-mx-auto pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2",children:[jsx(s,{alt:"info-circle-icon",src:a.infoCircle,width:32,height:32}),jsx("p",{className:"pl-text-[10px] pl-font-normal pl-text-text-primary",children:e.vhl_statusText}),jsxs("button",{className:"pl-flex pl-items-center pl-gap-2",onClick:()=>e.vhl_onRetry(),children:[jsx(s,{alt:"rotate-red-icon",src:a.rotateRed,width:14,height:14}),jsx("span",{className:"pl-text-primary pl-text-[10px] pl-font-normal",children:"\u062A\u0644\u0627\u0634 \u062F\u0648\u0628\u0627\u0631\u0647"})]})]}),jsxs("div",{className:`pl-flex ${fa("isTouchScreenPortrait")?"pl-flex-col":`pl-flex-col-reverse pl-mb-3 ${fa("isFullScreen")&&"pl-mb-8"}`} pl-gap-[14.58px]`,children:[jsxs("div",{className:`pl-flex pl-items-center pl-justify-between ${fa("isFullScreen")?"pl-mx-8":"pl-mx-[14.58px]"}`,children:[jsx(b,{}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-[14.58px]",children:[e.vhl_duration&&jsxs("div",{className:"pl-text-Common-white pl-text-[10.93px] pl-font-normal pl-relative",children:[jsx("span",{children:S(0)}),jsx("span",{children:"/"}),jsx("span",{children:S(e.vhl_duration)})]}),jsx(c,{})]})]}),jsx("div",{className:"pl-w-full pl-h-[3.64px] pl-bg-gray-highLight pl-animate-pulse"})]})]}),e.vhl_status==="skeleton"&&jsx(u,{})]})},V=N;export{V as default};//# sourceMappingURL=VideoHighLighter-IO7MB53J.mjs.map
|
|
2
|
+
//# sourceMappingURL=VideoHighLighter-IO7MB53J.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/components/videoPlayer/videoHighLighter/VideoHighLighter.tsx","../src/videoPlayerLibrary/components/custom-components/skeleton/Skeleton.tsx"],"names":["init_esm_shims","Skeleton","jsx","conditions","Skeleton_default","VideoHighLighter","params","useAppSelector","shallowEqual","useFullScreen_default","jsxs","Image","Fragment","CircularProgressbarWithChildren","buildStyles","importImages_default","fullScreen_default","secondsToHMS","soundVolume_default","VideoHighLighter_default"],"mappings":"0YAAAA,CAAAA,EAAAA,CCAAA,CAAAA,EAAAA,CAGA,IAAMC,EAAW,IAEbC,GAAAA,CAAC,OACC,IAAA,CAAK,QAAA,CACL,UAAW,CAAA,sEAAA,EAAyE,CAACC,kBAAsC,CAAA,EAAK,eAAe,CAAA,qCAAA,CAAA,CAE/I,QAAA,CAAAD,IAAC,MAAA,CAAA,CAAK,SAAA,CAAU,aAAa,QAAA,CAAA,YAAA,CAAU,CAAA,CACzC,EAIGE,CAAAA,CAAQH,CAAAA,KDDTI,CAAAA,CAAmB,IAAM,CAC7B,GAAM,CAAE,OAAAC,CAAO,CAAA,CAAIC,GAAe,CAAC,CAAE,UAAW,CAAE,MAAA,CAAAD,CAAO,CAAE,CAAA,IAAO,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAA,CAAIE,YAAY,EAC3F,OAAAC,CAAAA,GAGE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AK,SAAS,EAExF,CAAA,iBAAA,CAAA,CAEA,QAAA,CAAA,CAAAO,IAAAA,CAAC,KAAA,CAAA,CAAI,UAAW,CAAA,2CAAA,EAA8CP,EAAAA,CAAAA,cAAqC,EAAI,SAAA,CAAY,iBAAiB,GAClI,QAAA,CAAA,CAAAD,GAAAA,CAACc,EAAA,EAAW,CAAA,CACZN,KAAC,KAAA,CAAA,CAAI,SAAA,CAAW,2CACb,QAAA,CAAA,CAAAJ,CAAAA,CAAO,cACNI,IAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,mEAAA,CACb,UAAAR,GAAAA,CAAC,MAAA,CAAA,CAAM,SAAAe,CAAAA,CAAa,CAAC,EAAE,CAAA,CACvBf,GAAAA,CAAC,QAAK,QAAA,CAAA,GAAA,CAAC,CAAA,CACPA,IAAC,MAAA,CAAA,CAAM,QAAA,CAAAe,EAAaX,CAAAA,CAAO,YAAY,EAAE,CAAA,CAAA,CAC3C,CAAA,CAEFJ,IAACgB,CAAAA,CAAA,EAAY,GACf,CAAA,CAAA,CACF,CAAA,CACAhB,IAAC,KAAA,CAAA,CAAI,SAAA,CAAU,gEAAgE,CAAA,CAAA,CACjF,CAAA,CAAA,CACF,EAEDI,CAAAA,CAAO,UAAA,GAAe,YAAcJ,GAAAA,CAACE,CAAAA,CAAA,EAAS,CAAA,CAAA,CACjD,CAEJ,EAEOe,CAAAA,CAAQd","file":"VideoHighLighter-IO7MB53J.mjs","sourcesContent":["import { shallowEqual } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport Skeleton from \"../../custom-components/skeleton/Skeleton\";\r\nimport FullScreen from \"../../custom-components/fullScreen/fullScreen\";\r\nimport SoundVolume from \"../../custom-components/soundVolume/soundVolume\";\r\nimport { secondsToHMS } from \"../../../helpers/helpers\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { buildStyles, CircularProgressbarWithChildren } from \"react-circular-progressbar\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/legacy/image\";\r\nimport useFullScreen from \"../../../helpers/hooks/useFullScreen\";\r\n\r\nconst VideoHighLighter = () => {\r\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n useFullScreen();\r\n\r\n return (\r\n <div\r\n id=\"video-area\"\r\n className={`pl-relative pl-rounded-[12px] pl-w-full pl-h-full pl-aspect-video !pl-overflow-hidden ${\r\n conditions(ConditionName.isTouchScreen) && \"pl-rounded-none\"\r\n } ${conditions(ConditionName.isFullScreen) && \"!pl-overflow-hidden pl-fixed pl-top-0 pl-right-0 pl-w-screen pl-h-screen pl-rounded-none\"}`}\r\n >\r\n {params.vhl_status && params.vhl_status !== \"skeleton\" && (\r\n <div className=\"pl-flex pl-flex-col pl-justify-between pl-gap-2 pl-size-full\">\r\n {params.banner && (\r\n <div className=\"pl-w-full pl-aspect-video pl-absolute\">\r\n <Image src={params.banner} alt=\"banner\" layout=\"fill\" className=\"pl-w-full pl-aspect-video\" />\r\n <div className=\"pl-absolute pl-inset-0 pl-bg-black/50 pl-rounded-lg\" />\r\n </div>\r\n )}\r\n <div />\r\n {params.vhl_status === \"download_start\" && (\r\n <>\r\n <div className=\"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] tablet:!pl-max-w-[305px] desktop:!pl-max-w-[198px] pl-mx-auto pl-py-2 tablet:pl-py-[12.32px] desktop:pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2 tablet:pl-gap-[12.32px] desktop:pl-gap-2\">\r\n <svg style={{ height: 0, position: \"absolute\" }}>\r\n <defs>\r\n <linearGradient id=\"gradientColor\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\r\n <stop offset=\"0%\" stopColor=\"#FF649D\" />\r\n <stop offset=\"100%\" stopColor=\"#A50C4B\" />\r\n </linearGradient>\r\n </defs>\r\n </svg>\r\n <CircularProgressbarWithChildren\r\n value={params.vhl_progress!}\r\n className=\"pl-size-[50px]\"\r\n styles={buildStyles({\r\n trailColor: \"rgba(0, 0, 0, 0.1)\",\r\n pathColor: \"url(#gradientColor)\",\r\n })}\r\n >\r\n <p className=\"pl-text-text-primary pl-text-[14px] pl-font-medium\">{params.vhl_progress}%</p>\r\n </CircularProgressbarWithChildren>\r\n <p className=\"pl-text-text-primary pl-text-[10px] pl-font-normal\">{params.vhl_statusText}</p>\r\n </div>\r\n </>\r\n )}\r\n {params.vhl_status === \"download_error\" && (\r\n <div className=\"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] pl-mx-auto pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2\">\r\n <Image alt=\"info-circle-icon\" src={IMAGES.infoCircle} width={32} height={32} />\r\n <p className=\"pl-text-[10px] pl-font-normal pl-text-text-primary\">{params.vhl_statusText}</p>\r\n <button className=\"pl-flex pl-items-center pl-gap-2\" onClick={() => params.vhl_onRetry!()}>\r\n <Image alt=\"rotate-red-icon\" src={IMAGES.rotateRed} width={14} height={14} />\r\n <span className=\"pl-text-primary pl-text-[10px] pl-font-normal\">تلاش دوباره</span>\r\n </button>\r\n </div>\r\n )}\r\n <div\r\n className={`pl-flex ${\r\n !conditions(ConditionName.isTouchScreenPortrait)\r\n ? `pl-flex-col-reverse pl-mb-3 ${conditions(ConditionName.isFullScreen) && \"pl-mb-8\"}`\r\n : \"pl-flex-col\"\r\n } pl-gap-[14.58px]`}\r\n >\r\n <div className={`pl-flex pl-items-center pl-justify-between ${conditions(ConditionName.isFullScreen) ? \"pl-mx-8\" : \"pl-mx-[14.58px]\"}`}>\r\n <FullScreen />\r\n <div className={`pl-flex pl-items-center pl-gap-[14.58px]`}>\r\n {params.vhl_duration && (\r\n <div className=\"pl-text-Common-white pl-text-[10.93px] pl-font-normal pl-relative\">\r\n <span>{secondsToHMS(0)}</span>\r\n <span>/</span>\r\n <span>{secondsToHMS(params.vhl_duration)}</span>\r\n </div>\r\n )}\r\n <SoundVolume />\r\n </div>\r\n </div>\r\n <div className=\"pl-w-full pl-h-[3.64px] pl-bg-gray-highLight pl-animate-pulse\" />\r\n </div>\r\n </div>\r\n )}\r\n {params.vhl_status === \"skeleton\" && <Skeleton />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default VideoHighLighter;\r\n","import { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\n\r\nconst Skeleton = () => {\r\n return (\r\n <div\r\n role=\"status\"\r\n className={`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${!conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"} pl-animate-pulse dark:pl-bg-gray-700`}\r\n >\r\n <span className=\"pl-sr-only\">Loading...</span>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Skeleton;\r\n"]}
|
package/chunk-5FTEBU6O.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/images/importImages.ts"],"names":["init_cjs_shims","IMAGES","importImages_default"],"mappings":"u+nDAAAA,
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/images/importImages.ts"],"names":["init_cjs_shims","IMAGES","importImages_default"],"mappings":"u+nDAAAA,kBAAAA,EAAAA,CAAA,IAAMC,EAAAA,CAAc,CAChB,UAAA,CAAY,CAAA,EAAA,CACZ,aAAA,CAAe,CAAA,EAAA,CACf,QAAA,CAAU,CAAA,EAAA,CACV,OAAA,CAAS,CAAA,EAAA,CACT,QAAA,CAAU,CAAA,EAAA,CACV,IAAA,CAAM,CAAA,EAAA,CACN,MAAA,CAAQ,CAAA,EAAA,CACR,UAAA,CAAY,CAAA,EAAA,CACZ,SAAA,CAAW,CAAA,EAAA,CACX,WAAA,CAAa,CAAA,EAAA,CACb,gBAAA,CAAkB,CAAA,EAAA,CAClB,IAAA,CAAM,CAAA,EAAA,CACN,MAAA,CAAQ,CAAA,EAAA,CACR,UAAW,CAAA,EAAA,CACX,KAAA,CAAO,CAAA,EAAA,CACP,MAAA,CAAQ,CAAA,EAAA,CACR,IAAA,CAAM,CAAA,EAAA,CACN,cAAA,CAAgB,CAAA,EAAA,CAChB,eAAA,CAAiB,CAAA,EAAA,CACjB,QAAA,CAAU,CAAA,EAAA,CACV,WAAA,CAAa,CAAA,EAAA,CACb,GAAA,CAAK,CAAA,EAAA,CACL,YAAA,CAAc,CAAA,EAAA,CACd,eAAA,CAAiB,CAAA,EAAA,CACjB,mBAAA,CAAqB,CAAA,EAAA,CACrB,UAAA,CAAY,CAAA,EAAA,CACZ,SAAA,CAAW,CAAA,EACf,CAAA,CAEOC,EAAAA,CAAQD","file":"chunk-5FTEBU6O.js","sourcesContent":["const IMAGES: any = {\r\n fullScreen: require(\"./svg/FullScreen.svg\"),\r\n nonFullScreen: require(\"./svg/NonFullScreen.svg\"),\r\n settings: require(\"./svg/Settings.svg\"),\r\n bigPlay: require(\"./svg/BigPlay.svg\"),\r\n bigPause: require(\"./svg/BigPause.svg\"),\r\n mute: require(\"./svg/Mute.svg\"),\r\n unMute: require(\"./svg/UnMute.svg\"),\r\n backward15: require(\"./svg/Backward15.svg\"),\r\n forward15: require(\"./svg/Forward15.svg\"),\r\n chevronLeft: require(\"./svg/ChevronLeft.svg\"),\r\n pictureInPicture: require(\"./svg/PictureInPicture.svg\"),\r\n lock: require(\"./svg/Lock.svg\"),\r\n unlock: require(\"./svg/Unlock.svg\"),\r\n arrowLeft: require(\"./svg/ArrowLeft.svg\"),\r\n speed: require(\"./svg/Speed.svg\"),\r\n speed1: require(\"./svg/Speed1.svg\"),\r\n tick: require(\"./svg/Tick.svg\"),\r\n qualitySetting: require(\"./svg/QualitySetting.svg\"),\r\n qualitySetting1: require(\"./svg/QualitySetting1.svg\"),\r\n notFound: require(\"./svg/NotFound.svg\"),\r\n closeSquare: require(\"./svg/CloseSquare.svg\"),\r\n sun: require(\"./svg/Sun.svg\"),\r\n subtitleFill: require(\"./svg/SubtitleFill.svg\"),\r\n subtitleOutline: require(\"./svg/SubtitleOutline.svg\"),\r\n subtitleOutlineGray: require(\"./svg/SubtitleOutlineGray.svg\"),\r\n infoCircle: require(\"./svg/InfoCircle.svg\"),\r\n rotateRed: require(\"./svg/RotateRed.svg\"),\r\n};\r\n\r\nexport default IMAGES;\r\n"]}
|
package/chunk-7GSH5XMZ.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/backwardForward/backwardForward.tsx"],"names":["init_cjs_shims","hideTime","BackwardForward","type","isRightDoubleTouched","isLeftDoubleTouched","setIsRightDoubleTouched","setIsLeftDoubleTouched","backwardForwardCount","setBackwardForwardCount","useState","hide","setHide","backwardForwardCountRef","useRef","dispatch","useAppDispatch","duration","useAppSelector","currentTime","shallowEqual","videoElementSizeInfo","params","timeoutRef","useEffect","doubleTouch","useDoubleTap","event","setActiveElements","mainPlayerVideoTag","handleBackwardForward","handleTouchStart","prev","conditions","handleRippleCircle","component","jsx","Image","importImages_default","jsxs","Fragment","backwardForward_default"],"mappings":"weAAAA,kBAAA,EAAA,KAcMC,CAAW,CAAA,GAAA,CAEXC,CAAkB,CAAA,CAAC,CACrB,IAAA,CAAAC,CACA,CAAA,oBAAA,CAAAC,CACA,CAAA,mBAAA,CAAAC,CACA,CAAA,uBAAA,CAAAC,CACA,CAAA,sBAAA,CAAAC,CACJ,CAA6B,GAAA,CACzB,GAAM,CAACC,CAAsBC,CAAAA,CAAuB,CAAIC,CAAAA,cAAAA,CAAiB,EAAE,CAAA,CACrE,CAACC,CAAAA,CAAMC,CAAO,CAAA,CAAIF,eAAkB,KAAK,CAAA,CACzCG,CAA0BC,CAAAA,YAAAA,CAAeN,CAAoB,CAAA,CAE7DO,EAAWC,mBAAe,EAAA,CAC1B,CAAE,QAAA,CAAAC,CAAS,CAAA,CAAIC,oBAAe,CAAC,CAAE,UA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EA,QAAAiC,CAAAA,CAAAA,cAAAA,CAACC,kBAAA,CAAA,CACG,IAAI,iBACJ,CAAA,GAAA,CAAKC,kBAAO,CAAA,SAAA,CACZ,SAAW,CAAA,CAAA,EAAGnC,CAAS,GAAA,cAAA,EAAkB,eAAe,CAAA,CAAA,CACxD,KAAO,CAAA,EAAA,CACP,MAAQ,CAAA,EAAA,CACZ,EACAiC,cAACC,CAAAA,kBAAAA,CAAA,CACG,GAAA,CAAI,iBACJ,CAAA,GAAA,CAAKC,mBAAO,SACZ,CAAA,SAAA,CAAW,CAAGnC,EAAAA,CAAAA,GAAS,cAAkB,EAAA,eAAe,GACxD,KAAO,CAAA,EAAA,CACP,MAAQ,CAAA,EAAA,CACZ,CACAiC,CAAAA,cAAAA,CAACC,kBAAA,CAAA,CACG,GAAI,CAAA,iBAAA,CACJ,GAAKC,CAAAA,kBAAAA,CAAO,SACZ,CAAA,SAAA,CAAW,GAAGnC,CAAS,GAAA,cAAA,EAAkB,eAAe,CAAA,CAAA,CACxD,KAAO,CAAA,EAAA,CACP,MAAQ,CAAA,EAAA,CACZ,CACJ,CAAA,CAAA,CAAA,CACAoC,eAAC,CAAA,GAAA,CAAA,CAAE,SAAU,CAAA,4DAAA,CAA8D,UAAA/B,CAAqB,CAAA,iCAAA,CAAA,CAAM,CAC1G,CAAA,CAAA,CAAA,CAER,CAID4B,CAAAA,CAAAA,cAAAA,CAAAI,mBAAA,CAAA,CAAG,QAAAL,CAAAA,CAAAA,CAAU,CACxB,CAAA,CAEOM,CAAQvC,CAAAA","file":"chunk-7GSH5XMZ.js","sourcesContent":["import { useEffect, useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useDoubleTap } from \"use-double-tap\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { IBackwardForwardProps } from \"../../../helpers/interfaces/interfaces\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { handleBackwardForward } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { handleRippleCircle } from \"../../../helpers/helpers\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/legacy/image\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\n\r\nconst hideTime = 1000;\r\n\r\nconst BackwardForward = ({\r\n type,\r\n isRightDoubleTouched,\r\n isLeftDoubleTouched,\r\n setIsRightDoubleTouched,\r\n setIsLeftDoubleTouched\r\n}: IBackwardForwardProps) => {\r\n const [backwardForwardCount, setBackwardForwardCount] = useState<number>(15);\r\n const [hide, setHide] = useState<boolean>(false);\r\n const backwardForwardCountRef = useRef<number>(backwardForwardCount);\r\n\r\n const dispatch = useAppDispatch();\r\n const { duration } = useAppSelector(({ controller: { currentTime, duration } }) => ({ currentTime, duration }), shallowEqual);\r\n const { videoElementSizeInfo } = useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n const timeoutRef = useRef<any>(null);\r\n\r\n useEffect(() => {\r\n backwardForwardCountRef.current = backwardForwardCount;\r\n }, [backwardForwardCount]);\r\n\r\n let doubleTouch: any = undefined;\r\n\r\n doubleTouch = useDoubleTap((event) => {\r\n if ([\"touchBackward\", \"touchForward\"].includes(type)) {\r\n event.stopPropagation();\r\n if (type === \"touchBackward\" && setIsLeftDoubleTouched) setIsLeftDoubleTouched(true);\r\n else if (type === \"touchForward\" && setIsRightDoubleTouched) setIsRightDoubleTouched(true);\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n }, 200);\r\n\r\n useEffect(() => {\r\n if (hide) {\r\n setHide(false);\r\n dispatch(setActiveElements(false));\r\n if (isRightDoubleTouched && setIsRightDoubleTouched) {\r\n setIsRightDoubleTouched(false);\r\n if (mainPlayerVideoTag().duration - mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, mainPlayerVideoTag().duration);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(15);\r\n } else if (isLeftDoubleTouched && setIsLeftDoubleTouched) {\r\n setIsLeftDoubleTouched(false);\r\n if (mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, 0);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(15);\r\n }\r\n }\r\n }, [hide]);\r\n\r\n const handleTouchStart = (event: any) => {\r\n setBackwardForwardCount((prev) => prev + 15);\r\n if (conditions(ConditionName.isTouchScreenLandscape)) handleRippleCircle(event, type);\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n };\r\n\r\n let component;\r\n\r\n if ([\"backward\", \"forward\"].includes(type)) {\r\n component = (\r\n <div\r\n className={`${\r\n !conditions(ConditionName.isTouchScreen) && \"hover:pl-scale-125\"\r\n } pl-transition-transform pl-ease-in-out pl-cursor-pointer ${\r\n type === \"backward\" && (mainPlayerVideoTag().currentTime >= 15 ? \"pl-opacity-100\" : \"pl-opacity-30 pl-cursor-default hover:pl-scale-100\")\r\n } ${\r\n type === \"forward\" &&\r\n (duration - mainPlayerVideoTag().currentTime >= 15 ? \"pl-opacity-100\" : \"pl-opacity-30 pl-cursor-default hover:pl-scale-100\")\r\n }}`}\r\n onContextMenu={(event) => event.preventDefault()}\r\n >\r\n <Image\r\n alt={type === \"backward\" ? \"backward-icon\" : \"forward-icon\"}\r\n src={type === \"backward\" ? IMAGES.backward15 : IMAGES.forward15}\r\n width={24} \r\n height={24}\r\n onClick={() => handleBackwardForward(type, backwardForwardCount)}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n />\r\n </div>\r\n );\r\n } else if ([\"touchBackward\", \"touchForward\"].includes(type)) {\r\n component = (\r\n <div\r\n id={type}\r\n className={`pl-relative pl-flex pl-flex-col pl-justify-center pl-items-center pl-gap-2 pl-overflow-hidden ${\r\n type === \"touchBackward\" ? \"pl-rounded-r-full\" : \"pl-rounded-l-full\"\r\n }`}\r\n style={{ width: videoElementSizeInfo.width, height: videoElementSizeInfo.width }}\r\n {...doubleTouch}\r\n >\r\n {(isRightDoubleTouched || isLeftDoubleTouched) && (\r\n <div\r\n className={`pl-w-full pl-h-full pl-flex pl-flex-col pl-justify-center pl-items-center pl-gap-2 pl-p-5 pl-bg-secondary-100/[0.3]`}\r\n onTouchStart={handleTouchStart}\r\n >\r\n <div\r\n className={`${\r\n type === \"touchBackward\" ? \"pl-arrow-left\" : \"pl-arrow-right pl-gap-2\"\r\n } pl-flex pl-justify-center pl-items-center`}\r\n >\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n </div>\r\n <p className=\"pl-text-center pl-text-[14px] pl-font-normal pl-text-white\">{backwardForwardCount} ثانیه</p>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n\r\n return <>{component}</>;\r\n};\r\n\r\nexport default BackwardForward;\r\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/backwardForward/backwardForward.tsx"],"names":["init_cjs_shims","hideTime","BackwardForward","type","isRightDoubleTouched","isLeftDoubleTouched","setIsRightDoubleTouched","setIsLeftDoubleTouched","backwardForwardCount","setBackwardForwardCount","useState","hide","setHide","backwardForwardCountRef","useRef","dispatch","useAppDispatch","duration","useAppSelector","currentTime","shallowEqual","videoElementSizeInfo","params","timeoutRef","useEffect","doubleTouch","useDoubleTap","event","setActiveElements","mainPlayerVideoTag","handleBackwardForward","handleTouchStart","prev","conditions","handleRippleCircle","component","jsx","Image","importImages_default","jsxs","Fragment","backwardForward_default"],"mappings":"weAAAA,kBAAAA,EAAAA,KAcMC,CAAAA,CAAW,GAAA,CAEXC,CAAAA,CAAkB,CAAC,CACrB,IAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,mBAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,CAAAA,CACA,sBAAA,CAAAC,CACJ,CAAA,GAA6B,CACzB,GAAM,CAACC,CAAAA,CAAsBC,CAAuB,CAAA,CAAIC,cAAAA,CAAiB,EAAE,CAAA,CACrE,CAACC,CAAAA,CAAMC,CAAO,CAAA,CAAIF,eAAkB,KAAK,CAAA,CACzCG,CAAAA,CAA0BC,YAAAA,CAAeN,CAAoB,CAAA,CAE7DO,EAAWC,mBAAAA,EAAe,CAC1B,CAAE,QAAA,CAAAC,CAAS,CAAA,CAAIC,oBAAe,CAAC,CAAE,UAAA,CAAY,CAAE,WAAA,CAAAC,CAAAA,CAAa,QAAA,CAAAF,CAAS,CAAE,CAAA,IAAO,CAAE,WAAA,CAAAE,CAAAA,CAAa,QAAA,CAAAF,CAAS,CAAA,CAAA,CAAIG,uBAAY,CAAA,CACtH,CAAE,oBAAA,CAAAC,CAAqB,CAAA,CAAIH,mBAAAA,CAC7B,CAAC,CAAE,SAAA,CAAW,CAAE,oBAAA,CAAAG,CAAAA,CAAsB,OAAAC,CAAO,CAAE,CAAA,IAAO,CAAE,oBAAA,CAAAD,CAAAA,CAAsB,MAAA,CAAAC,CAAO,CAAA,CAAA,CACrFF,uBACJ,CAAA,CAEMG,CAAAA,CAAaT,YAAAA,CAAY,IAAI,EAEnCU,eAAAA,CAAU,IAAM,CACZX,CAAAA,CAAwB,OAAA,CAAUL,EACtC,EAAG,CAACA,CAAo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CACZ,SAAA,CAAW,GAAGnC,CAAAA,GAAS,cAAA,EAAkB,eAAe,CAAA,CAAA,CACxD,KAAA,CAAO,EAAA,CACP,MAAA,CAAQ,EAAA,CACZ,CAAA,CAAA,CACJ,CAAA,CACAoC,eAAAA,CAAC,GAAA,CAAA,CAAE,SAAA,CAAU,4DAAA,CAA8D,UAAA/B,CAAAA,CAAqB,iCAAA,CAAA,CAAM,CAAA,CAAA,CAC1G,CAAA,CAER,CAAA,CAAA,CAID4B,cAAAA,CAAAI,mBAAAA,CAAA,CAAG,QAAA,CAAAL,CAAAA,CAAU,CACxB,CAAA,CAEOM,CAAAA,CAAQvC","file":"chunk-7GSH5XMZ.js","sourcesContent":["import { useEffect, useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useDoubleTap } from \"use-double-tap\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { IBackwardForwardProps } from \"../../../helpers/interfaces/interfaces\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { handleBackwardForward } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { handleRippleCircle } from \"../../../helpers/helpers\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/legacy/image\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\n\r\nconst hideTime = 1000;\r\n\r\nconst BackwardForward = ({\r\n type,\r\n isRightDoubleTouched,\r\n isLeftDoubleTouched,\r\n setIsRightDoubleTouched,\r\n setIsLeftDoubleTouched\r\n}: IBackwardForwardProps) => {\r\n const [backwardForwardCount, setBackwardForwardCount] = useState<number>(15);\r\n const [hide, setHide] = useState<boolean>(false);\r\n const backwardForwardCountRef = useRef<number>(backwardForwardCount);\r\n\r\n const dispatch = useAppDispatch();\r\n const { duration } = useAppSelector(({ controller: { currentTime, duration } }) => ({ currentTime, duration }), shallowEqual);\r\n const { videoElementSizeInfo } = useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n const timeoutRef = useRef<any>(null);\r\n\r\n useEffect(() => {\r\n backwardForwardCountRef.current = backwardForwardCount;\r\n }, [backwardForwardCount]);\r\n\r\n let doubleTouch: any = undefined;\r\n\r\n doubleTouch = useDoubleTap((event) => {\r\n if ([\"touchBackward\", \"touchForward\"].includes(type)) {\r\n event.stopPropagation();\r\n if (type === \"touchBackward\" && setIsLeftDoubleTouched) setIsLeftDoubleTouched(true);\r\n else if (type === \"touchForward\" && setIsRightDoubleTouched) setIsRightDoubleTouched(true);\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n }, 200);\r\n\r\n useEffect(() => {\r\n if (hide) {\r\n setHide(false);\r\n dispatch(setActiveElements(false));\r\n if (isRightDoubleTouched && setIsRightDoubleTouched) {\r\n setIsRightDoubleTouched(false);\r\n if (mainPlayerVideoTag().duration - mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, mainPlayerVideoTag().duration);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(15);\r\n } else if (isLeftDoubleTouched && setIsLeftDoubleTouched) {\r\n setIsLeftDoubleTouched(false);\r\n if (mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, 0);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(15);\r\n }\r\n }\r\n }, [hide]);\r\n\r\n const handleTouchStart = (event: any) => {\r\n setBackwardForwardCount((prev) => prev + 15);\r\n if (conditions(ConditionName.isTouchScreenLandscape)) handleRippleCircle(event, type);\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n };\r\n\r\n let component;\r\n\r\n if ([\"backward\", \"forward\"].includes(type)) {\r\n component = (\r\n <div\r\n className={`${\r\n !conditions(ConditionName.isTouchScreen) && \"hover:pl-scale-125\"\r\n } pl-transition-transform pl-ease-in-out pl-cursor-pointer ${\r\n type === \"backward\" && (mainPlayerVideoTag().currentTime >= 15 ? \"pl-opacity-100\" : \"pl-opacity-30 pl-cursor-default hover:pl-scale-100\")\r\n } ${\r\n type === \"forward\" &&\r\n (duration - mainPlayerVideoTag().currentTime >= 15 ? \"pl-opacity-100\" : \"pl-opacity-30 pl-cursor-default hover:pl-scale-100\")\r\n }}`}\r\n onContextMenu={(event) => event.preventDefault()}\r\n >\r\n <Image\r\n alt={type === \"backward\" ? \"backward-icon\" : \"forward-icon\"}\r\n src={type === \"backward\" ? IMAGES.backward15 : IMAGES.forward15}\r\n width={24} \r\n height={24}\r\n onClick={() => handleBackwardForward(type, backwardForwardCount)}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n />\r\n </div>\r\n );\r\n } else if ([\"touchBackward\", \"touchForward\"].includes(type)) {\r\n component = (\r\n <div\r\n id={type}\r\n className={`pl-relative pl-flex pl-flex-col pl-justify-center pl-items-center pl-gap-2 pl-overflow-hidden ${\r\n type === \"touchBackward\" ? \"pl-rounded-r-full\" : \"pl-rounded-l-full\"\r\n }`}\r\n style={{ width: videoElementSizeInfo.width, height: videoElementSizeInfo.width }}\r\n {...doubleTouch}\r\n >\r\n {(isRightDoubleTouched || isLeftDoubleTouched) && (\r\n <div\r\n className={`pl-w-full pl-h-full pl-flex pl-flex-col pl-justify-center pl-items-center pl-gap-2 pl-p-5 pl-bg-secondary-100/[0.3]`}\r\n onTouchStart={handleTouchStart}\r\n >\r\n <div\r\n className={`${\r\n type === \"touchBackward\" ? \"pl-arrow-left\" : \"pl-arrow-right pl-gap-2\"\r\n } pl-flex pl-justify-center pl-items-center`}\r\n >\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n </div>\r\n <p className=\"pl-text-center pl-text-[14px] pl-font-normal pl-text-white\">{backwardForwardCount} ثانیه</p>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n\r\n return <>{component}</>;\r\n};\r\n\r\nexport default BackwardForward;\r\n"]}
|
package/chunk-A7MEJC4F.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/backwardForward/backwardForward.tsx"],"names":["init_esm_shims","hideTime","BackwardForward","type","isRightDoubleTouched","isLeftDoubleTouched","setIsRightDoubleTouched","setIsLeftDoubleTouched","backwardForwardCount","setBackwardForwardCount","useState","hide","setHide","backwardForwardCountRef","useRef","dispatch","useAppDispatch","duration","useAppSelector","currentTime","shallowEqual","videoElementSizeInfo","params","timeoutRef","useEffect","doubleTouch","useDoubleTap","event","setActiveElements","mainPlayerVideoTag","handleBackwardForward","handleTouchStart","prev","conditions","handleRippleCircle","component","jsx","Image","importImages_default","jsxs","Fragment","backwardForward_default"],"mappings":"2XAAAA,CAAA,EAAA,KAcMC,CAAW,CAAA,GAAA,CAEXC,CAAkB,CAAA,CAAC,CACrB,IAAA,CAAAC,CACA,CAAA,oBAAA,CAAAC,CACA,CAAA,mBAAA,CAAAC,CACA,CAAA,uBAAA,CAAAC,CACA,CAAA,sBAAA,CAAAC,CACJ,CAA6B,GAAA,CACzB,GAAM,CAACC,CAAsBC,CAAAA,GAAuB,CAAIC,CAAAA,QAAAA,CAAiB,EAAE,CAAA,CACrE,CAACC,CAAAA,C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,CAAcR,EAEd,QAAAQ,CAAAA,CAAAA,IAAAA,CAAC,KACG,CAAA,CAAA,SAAA,CAAW,CACPpC,EAAAA,CAAAA,GAAS,eAAkB,CAAA,eAAA,CAAkB,yBACjD,CAAA,0CAAA,CAAA,CAEA,QAAAiC,CAAAA,CAAAA,GAAAA,CAACC,CAAA,CAAA,CACG,IAAI,iBACJ,CAAA,GAAA,CAAKC,CAAO,CAAA,SAAA,CACZ,SAAW,CAAA,CAAA,EAAGnC,CAAS,GAAA,cAAA,EAAkB,eAAe,CAAA,CAAA,CACxD,KAAO,CAAA,EAAA,CACP,MAAQ,CAAA,EAAA,CACZ,EACAiC,GAACC,CAAAA,CAAAA,CAAA,CACG,GAAA,CAAI,iBACJ,CAAA,GAAA,CAAKC,EAAO,SACZ,CAAA,SAAA,CAAW,CAAGnC,EAAAA,CAAAA,GAAS,cAAkB,EAAA,eAAe,GACxD,KAAO,CAAA,EAAA,CACP,MAAQ,CAAA,EAAA,CACZ,CACAiC,CAAAA,GAAAA,CAACC,CAAA,CAAA,CACG,GAAI,CAAA,iBAAA,CACJ,GAAKC,CAAAA,CAAAA,CAAO,SACZ,CAAA,SAAA,CAAW,GAAGnC,CAAS,GAAA,cAAA,EAAkB,eAAe,CAAA,CAAA,CACxD,KAAO,CAAA,EAAA,CACP,MAAQ,CAAA,EAAA,CACZ,CACJ,CAAA,CAAA,CAAA,CACAoC,IAAC,CAAA,GAAA,CAAA,CAAE,SAAU,CAAA,4DAAA,CAA8D,UAAA/B,CAAqB,CAAA,iCAAA,CAAA,CAAM,CAC1G,CAAA,CAAA,CAAA,CAER,CAID4B,CAAAA,CAAAA,GAAAA,CAAAI,QAAA,CAAA,CAAG,QAAAL,CAAAA,CAAAA,CAAU,CACxB,CAAA,CAEOM,EAAQvC,CAAAA","file":"chunk-A7MEJC4F.mjs","sourcesContent":["import { useEffect, useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useDoubleTap } from \"use-double-tap\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { IBackwardForwardProps } from \"../../../helpers/interfaces/interfaces\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { handleBackwardForward } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { handleRippleCircle } from \"../../../helpers/helpers\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/legacy/image\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\n\r\nconst hideTime = 1000;\r\n\r\nconst BackwardForward = ({\r\n type,\r\n isRightDoubleTouched,\r\n isLeftDoubleTouched,\r\n setIsRightDoubleTouched,\r\n setIsLeftDoubleTouched\r\n}: IBackwardForwardProps) => {\r\n const [backwardForwardCount, setBackwardForwardCount] = useState<number>(15);\r\n const [hide, setHide] = useState<boolean>(false);\r\n const backwardForwardCountRef = useRef<number>(backwardForwardCount);\r\n\r\n const dispatch = useAppDispatch();\r\n const { duration } = useAppSelector(({ controller: { currentTime, duration } }) => ({ currentTime, duration }), shallowEqual);\r\n const { videoElementSizeInfo } = useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n const timeoutRef = useRef<any>(null);\r\n\r\n useEffect(() => {\r\n backwardForwardCountRef.current = backwardForwardCount;\r\n }, [backwardForwardCount]);\r\n\r\n let doubleTouch: any = undefined;\r\n\r\n doubleTouch = useDoubleTap((event) => {\r\n if ([\"touchBackward\", \"touchForward\"].includes(type)) {\r\n event.stopPropagation();\r\n if (type === \"touchBackward\" && setIsLeftDoubleTouched) setIsLeftDoubleTouched(true);\r\n else if (type === \"touchForward\" && setIsRightDoubleTouched) setIsRightDoubleTouched(true);\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n }, 200);\r\n\r\n useEffect(() => {\r\n if (hide) {\r\n setHide(false);\r\n dispatch(setActiveElements(false));\r\n if (isRightDoubleTouched && setIsRightDoubleTouched) {\r\n setIsRightDoubleTouched(false);\r\n if (mainPlayerVideoTag().duration - mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, mainPlayerVideoTag().duration);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(15);\r\n } else if (isLeftDoubleTouched && setIsLeftDoubleTouched) {\r\n setIsLeftDoubleTouched(false);\r\n if (mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, 0);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(15);\r\n }\r\n }\r\n }, [hide]);\r\n\r\n const handleTouchStart = (event: any) => {\r\n setBackwardForwardCount((prev) => prev + 15);\r\n if (conditions(ConditionName.isTouchScreenLandscape)) handleRippleCircle(event, type);\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n };\r\n\r\n let component;\r\n\r\n if ([\"backward\", \"forward\"].includes(type)) {\r\n component = (\r\n <div\r\n className={`${\r\n !conditions(ConditionName.isTouchScreen) && \"hover:pl-scale-125\"\r\n } pl-transition-transform pl-ease-in-out pl-cursor-pointer ${\r\n type === \"backward\" && (mainPlayerVideoTag().currentTime >= 15 ? \"pl-opacity-100\" : \"pl-opacity-30 pl-cursor-default hover:pl-scale-100\")\r\n } ${\r\n type === \"forward\" &&\r\n (duration - mainPlayerVideoTag().currentTime >= 15 ? \"pl-opacity-100\" : \"pl-opacity-30 pl-cursor-default hover:pl-scale-100\")\r\n }}`}\r\n onContextMenu={(event) => event.preventDefault()}\r\n >\r\n <Image\r\n alt={type === \"backward\" ? \"backward-icon\" : \"forward-icon\"}\r\n src={type === \"backward\" ? IMAGES.backward15 : IMAGES.forward15}\r\n width={24} \r\n height={24}\r\n onClick={() => handleBackwardForward(type, backwardForwardCount)}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n />\r\n </div>\r\n );\r\n } else if ([\"touchBackward\", \"touchForward\"].includes(type)) {\r\n component = (\r\n <div\r\n id={type}\r\n className={`pl-relative pl-flex pl-flex-col pl-justify-center pl-items-center pl-gap-2 pl-overflow-hidden ${\r\n type === \"touchBackward\" ? \"pl-rounded-r-full\" : \"pl-rounded-l-full\"\r\n }`}\r\n style={{ width: videoElementSizeInfo.width, height: videoElementSizeInfo.width }}\r\n {...doubleTouch}\r\n >\r\n {(isRightDoubleTouched || isLeftDoubleTouched) && (\r\n <div\r\n className={`pl-w-full pl-h-full pl-flex pl-flex-col pl-justify-center pl-items-center pl-gap-2 pl-p-5 pl-bg-secondary-100/[0.3]`}\r\n onTouchStart={handleTouchStart}\r\n >\r\n <div\r\n className={`${\r\n type === \"touchBackward\" ? \"pl-arrow-left\" : \"pl-arrow-right pl-gap-2\"\r\n } pl-flex pl-justify-center pl-items-center`}\r\n >\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n </div>\r\n <p className=\"pl-text-center pl-text-[14px] pl-font-normal pl-text-white\">{backwardForwardCount} ثانیه</p>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n\r\n return <>{component}</>;\r\n};\r\n\r\nexport default BackwardForward;\r\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/backwardForward/backwardForward.tsx"],"names":["init_esm_shims","hideTime","BackwardForward","type","isRightDoubleTouched","isLeftDoubleTouched","setIsRightDoubleTouched","setIsLeftDoubleTouched","backwardForwardCount","setBackwardForwardCount","useState","hide","setHide","backwardForwardCountRef","useRef","dispatch","useAppDispatch","duration","useAppSelector","currentTime","shallowEqual","videoElementSizeInfo","params","timeoutRef","useEffect","doubleTouch","useDoubleTap","event","setActiveElements","mainPlayerVideoTag","handleBackwardForward","handleTouchStart","prev","conditions","handleRippleCircle","component","jsx","Image","importImages_default","jsxs","Fragment","backwardForward_default"],"mappings":"2XAAAA,CAAAA,EAAAA,KAcMC,CAAAA,CAAW,GAAA,CAEXC,CAAAA,CAAkB,CAAC,CACrB,IAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,mBAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,CAAAA,CACA,sBAAA,CAAAC,CACJ,CAAA,GAA6B,CACzB,GAAM,CAACC,CAAAA,CAAsBC,GAAuB,CAAA,CAAIC,QAAAA,CAAiB,EAAE,CAAA,CACrE,CAACC,CAAAA,CAAMC,CAAO,CAAA,CAAIF,SAAkB,KAAK,CAAA,CACzCG,CAAAA,CAA0BC,MAAAA,CAAeN,CAAoB,CAAA,CAE7DO,EAAWC,EAAAA,EAAe,CAC1B,CAAE,QAAA,CAAAC,CAAS,CAAA,CAAIC,GAAe,CAAC,CAAE,UAAA,CAAY,CAAE,WAAA,CAAAC,CAAAA,CAAa,QAAA,CAAAF,CAAS,CAAE,CAAA,IAAO,CAAE,WAAA,CAAAE,CAAAA,CAAa,QAAA,CAAAF,CAAS,CAAA,CAAA,CAAIG,YAAY,CAAA,CACtH,CAAE,oBAAA,CAAAC,CAAqB,CAAA,CAAIH,EAAAA,CAC7B,CAAC,CAAE,SAAA,CAAW,CAAE,oBAAA,CAAAG,CAAAA,CAAsB,OAAAC,CAAO,CAAE,CAAA,IAAO,CAAE,oBAAA,CAAAD,CAAAA,CAAsB,MAAA,CAAAC,CAAO,CAAA,CA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Q,EAAA,CACZ,CAAA,CACAiC,GAAAA,CAACC,CAAAA,CAAA,CACG,GAAA,CAAI,iBAAA,CACJ,GAAA,CAAKC,CAAAA,CAAO,SAAA,CACZ,SAAA,CAAW,GAAGnC,CAAAA,GAAS,cAAA,EAAkB,eAAe,CAAA,CAAA,CACxD,KAAA,CAAO,EAAA,CACP,MAAA,CAAQ,EAAA,CACZ,CAAA,CAAA,CACJ,CAAA,CACAoC,IAAAA,CAAC,GAAA,CAAA,CAAE,SAAA,CAAU,4DAAA,CAA8D,UAAA/B,CAAAA,CAAqB,iCAAA,CAAA,CAAM,CAAA,CAAA,CAC1G,CAAA,CAER,CAAA,CAAA,CAID4B,GAAAA,CAAAI,QAAAA,CAAA,CAAG,QAAA,CAAAL,CAAAA,CAAU,CACxB,CAAA,CAEOM,EAAAA,CAAQvC","file":"chunk-A7MEJC4F.mjs","sourcesContent":["import { useEffect, useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useDoubleTap } from \"use-double-tap\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { IBackwardForwardProps } from \"../../../helpers/interfaces/interfaces\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { handleBackwardForward } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { handleRippleCircle } from \"../../../helpers/helpers\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/legacy/image\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\n\r\nconst hideTime = 1000;\r\n\r\nconst BackwardForward = ({\r\n type,\r\n isRightDoubleTouched,\r\n isLeftDoubleTouched,\r\n setIsRightDoubleTouched,\r\n setIsLeftDoubleTouched\r\n}: IBackwardForwardProps) => {\r\n const [backwardForwardCount, setBackwardForwardCount] = useState<number>(15);\r\n const [hide, setHide] = useState<boolean>(false);\r\n const backwardForwardCountRef = useRef<number>(backwardForwardCount);\r\n\r\n const dispatch = useAppDispatch();\r\n const { duration } = useAppSelector(({ controller: { currentTime, duration } }) => ({ currentTime, duration }), shallowEqual);\r\n const { videoElementSizeInfo } = useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n const timeoutRef = useRef<any>(null);\r\n\r\n useEffect(() => {\r\n backwardForwardCountRef.current = backwardForwardCount;\r\n }, [backwardForwardCount]);\r\n\r\n let doubleTouch: any = undefined;\r\n\r\n doubleTouch = useDoubleTap((event) => {\r\n if ([\"touchBackward\", \"touchForward\"].includes(type)) {\r\n event.stopPropagation();\r\n if (type === \"touchBackward\" && setIsLeftDoubleTouched) setIsLeftDoubleTouched(true);\r\n else if (type === \"touchForward\" && setIsRightDoubleTouched) setIsRightDoubleTouched(true);\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n }, 200);\r\n\r\n useEffect(() => {\r\n if (hide) {\r\n setHide(false);\r\n dispatch(setActiveElements(false));\r\n if (isRightDoubleTouched && setIsRightDoubleTouched) {\r\n setIsRightDoubleTouched(false);\r\n if (mainPlayerVideoTag().duration - mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, mainPlayerVideoTag().duration);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(15);\r\n } else if (isLeftDoubleTouched && setIsLeftDoubleTouched) {\r\n setIsLeftDoubleTouched(false);\r\n if (mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, 0);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(15);\r\n }\r\n }\r\n }, [hide]);\r\n\r\n const handleTouchStart = (event: any) => {\r\n setBackwardForwardCount((prev) => prev + 15);\r\n if (conditions(ConditionName.isTouchScreenLandscape)) handleRippleCircle(event, type);\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n };\r\n\r\n let component;\r\n\r\n if ([\"backward\", \"forward\"].includes(type)) {\r\n component = (\r\n <div\r\n className={`${\r\n !conditions(ConditionName.isTouchScreen) && \"hover:pl-scale-125\"\r\n } pl-transition-transform pl-ease-in-out pl-cursor-pointer ${\r\n type === \"backward\" && (mainPlayerVideoTag().currentTime >= 15 ? \"pl-opacity-100\" : \"pl-opacity-30 pl-cursor-default hover:pl-scale-100\")\r\n } ${\r\n type === \"forward\" &&\r\n (duration - mainPlayerVideoTag().currentTime >= 15 ? \"pl-opacity-100\" : \"pl-opacity-30 pl-cursor-default hover:pl-scale-100\")\r\n }}`}\r\n onContextMenu={(event) => event.preventDefault()}\r\n >\r\n <Image\r\n alt={type === \"backward\" ? \"backward-icon\" : \"forward-icon\"}\r\n src={type === \"backward\" ? IMAGES.backward15 : IMAGES.forward15}\r\n width={24} \r\n height={24}\r\n onClick={() => handleBackwardForward(type, backwardForwardCount)}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n />\r\n </div>\r\n );\r\n } else if ([\"touchBackward\", \"touchForward\"].includes(type)) {\r\n component = (\r\n <div\r\n id={type}\r\n className={`pl-relative pl-flex pl-flex-col pl-justify-center pl-items-center pl-gap-2 pl-overflow-hidden ${\r\n type === \"touchBackward\" ? \"pl-rounded-r-full\" : \"pl-rounded-l-full\"\r\n }`}\r\n style={{ width: videoElementSizeInfo.width, height: videoElementSizeInfo.width }}\r\n {...doubleTouch}\r\n >\r\n {(isRightDoubleTouched || isLeftDoubleTouched) && (\r\n <div\r\n className={`pl-w-full pl-h-full pl-flex pl-flex-col pl-justify-center pl-items-center pl-gap-2 pl-p-5 pl-bg-secondary-100/[0.3]`}\r\n onTouchStart={handleTouchStart}\r\n >\r\n <div\r\n className={`${\r\n type === \"touchBackward\" ? \"pl-arrow-left\" : \"pl-arrow-right pl-gap-2\"\r\n } pl-flex pl-justify-center pl-items-center`}\r\n >\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n <Image\r\n alt=\"arrow-left-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`${type === \"touchForward\" && \"pl-rotate-180\"}`}\r\n width={24}\r\n height={24}\r\n />\r\n </div>\r\n <p className=\"pl-text-center pl-text-[14px] pl-font-normal pl-text-white\">{backwardForwardCount} ثانیه</p>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n\r\n return <>{component}</>;\r\n};\r\n\r\nexport default BackwardForward;\r\n"]}
|
package/chunk-BOS4UPEA.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/hooks/useJumpToCurrentTime.tsx","../src/videoPlayerLibrary/helpers/hooks/useHideSubtitle.tsx"],"names":["init_cjs_shims","useJumpToCurrentTime","dispatch","useAppDispatch","params","useAppSelector","shallowEqual","useEffect","conditions","mainPlayerVideoTag","setCurrentTime","useJumpToCurrentTime_default","useHideSubtitle","details","tracks","i","event","track","activeCue","el","useHideSubtitle_default"],"mappings":"0KAAAA,kBAAAA,EAAAA,CAQA,IAAMC,CAAuB,
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/hooks/useJumpToCurrentTime.tsx","../src/videoPlayerLibrary/helpers/hooks/useHideSubtitle.tsx"],"names":["init_cjs_shims","useJumpToCurrentTime","dispatch","useAppDispatch","params","useAppSelector","shallowEqual","useEffect","conditions","mainPlayerVideoTag","setCurrentTime","useJumpToCurrentTime_default","useHideSubtitle","details","tracks","i","event","track","activeCue","el","useHideSubtitle_default"],"mappings":"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CA,CAAAA,GAAIA,CAAAA,CAAG,KAAA,CAAM,QAAU,OAAA,EAC/B,CAAA,CAAG,GAAG,CAAA,CAEND,CAAAA,CAAU,OAAS,IAAM,CACrB,IAAMC,CAAAA,CAAK,SAAS,cAAA,CAAe,aAAa,EAC5CA,CAAAA,GAAIA,CAAAA,CAAG,MAAM,OAAA,CAAU,MAAA,EAC/B,GAER,CAAC,EAET,EAAG,CAACN,CAAAA,CAAQ,SAAU,CAAC,EAC3B,EAEOO,CAAAA,CAAQR","file":"chunk-BOS4UPEA.js","sourcesContent":["import { useEffect } from \"react\";\r\nimport { conditions } from \"../conditions/conditions\";\r\nimport { ConditionName } from \"../interfaces/enums\";\r\nimport { mainPlayerVideoTag } from \"../constants\";\r\nimport { useAppDispatch, useAppSelector } from \"../redux/hooks\";\r\nimport { setCurrentTime } from \"../redux/slices/controllerSlice\";\r\nimport { shallowEqual } from \"react-redux\";\r\n\r\nconst useJumpToCurrentTime = () => {\r\n const dispatch = useAppDispatch();\r\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n\r\n useEffect(() => {\r\n if (conditions(ConditionName.hasCurrentTimeParams)) {\r\n mainPlayerVideoTag().currentTime = params.currentTime!;\r\n dispatch(setCurrentTime(params.currentTime!));\r\n }\r\n }, [params.currentTime]);\r\n}\r\n\r\nexport default useJumpToCurrentTime;","import { useEffect } from \"react\";\r\nimport { useAppSelector } from \"../redux/hooks\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { mainPlayerVideoTag } from \"../constants\";\r\n\r\nconst useHideSubtitle = () => {\r\n\r\n const { details } = useAppSelector(({ videoData: { details } }) => ({details}),shallowEqual);\r\n\r\n useEffect(() => {\r\n const tracks = mainPlayerVideoTag().getElementsByTagName(\"track\");\r\n for (let i = 0; i < tracks.length; i++) {\r\n tracks[i].addEventListener(\"cuechange\", (event) => {\r\n const track = (event.target! as any).track;\r\n let activeCue: any;\r\n if (track.activeCues) activeCue = track.activeCues[0];\r\n if (activeCue) {\r\n setTimeout(() => {\r\n const el = document.getElementById(\"subtitle-id\");\r\n if (el) el.style.display = \"block\";\r\n }, 300);\r\n\r\n activeCue.onexit = () => {\r\n const el = document.getElementById(\"subtitle-id\");\r\n if (el) el.style.display = \"none\";\r\n };\r\n }\r\n });\r\n }\r\n }, [details.subtitles!]);\r\n}\r\n\r\nexport default useHideSubtitle;"]}
|
package/chunk-D7CTAABP.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/redux/actions/user.actions.ts"],"names":["init_cjs_shims","handleContinuousPlayback","params","store_default","currentTime","mainPlayerVideoTag","duration","viewedVideo","viewedVideosInLocalStorage","viewedVideos","video","handleApplyContinuousPlayback","dispatch","setVideoSettings"],"mappings":"iHAAAA,kBAAAA,EAAAA,
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/redux/actions/user.actions.ts"],"names":["init_cjs_shims","handleContinuousPlayback","params","store_default","currentTime","mainPlayerVideoTag","duration","viewedVideo","viewedVideosInLocalStorage","viewedVideos","video","handleApplyContinuousPlayback","dispatch","setVideoSettings"],"mappings":"iHAAAA,kBAAAA,EAAAA,CAKO,IAAMC,CAAAA,CAA2B,IAAM,CAC1C,GAAM,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAIC,mBAAM,QAAA,EAAS,CAAE,SAAA,CAC9BC,CAAAA,CAAcC,qBAAmB,CAAE,WAAA,CACzC,GAAID,CAAAA,GAAgB,EAAG,CACnB,IAAME,CAAAA,CAAWD,mBAAAA,GAAqB,QAAA,CAChCE,CAAAA,CAA4B,CAC9B,QAAA,CAAU,CAACL,CAAAA,CAAO,EAAA,CAClB,UAAA,CAAY,CAAA,CACZ,KAAME,CAAAA,GAAgBE,CAAAA,CAAW,CAAA,CAAI,IAAA,CAAK,MAAMD,mBAAAA,EAAmB,CAAE,WAAW,CACpF,EACIG,CAAAA,CAA6B,YAAA,CAAa,OAAA,CAAQ,cAAc,EACpE,GAAIA,CAAAA,CAA4B,CAC5B,IAAIC,EAA+B,IAAA,CAAK,KAAA,CAAMD,CAA0B,CAAA,CACxEC,EAAeA,CAAAA,CAAa,MAAA,CACvBC,CAAAA,EAAwBA,CAAAA,CAAM,WAAaH,CAAAA,CAAY,QAAA,EAAYG,CAAAA,CAAM,UAAA,GAAeH,EAAY,UACzG,CAAA,CACIE,CAAAA,CAAa,MAAA,CAAS,IAEtBA,CAAAA,CAAa,KAAA,EAAM,CACnBA,CAAAA,CAAa,IAAA,CAAKF,CAAW,CAAA,CAEjC,YAAA,CAAa,QAAQ,cAAA,CAAgB,IAAA,CAAK,SAAA,CAAUE,CAAY,CAAC,EACrE,CAAA,KAAO,YAAA,CAAa,OAAA,CAAQ,eAAgB,IAAA,CAAK,SAAA,CAAU,CAACF,CAAW,CAAC,CAAC,EAC7E,CACJ,CAAA,CAEaI,EAAgC,IAAM,CAC/C,IAAMC,CAAAA,CAAWT,mBAAM,QAAA,CACjB,CAAE,MAAA,CAAAD,CAAO,EAAIC,kBAAAA,CAAM,QAAA,EAAS,CAAE,SAAA,CAChCK,EAA6B,YAAA,CAAa,OAAA,CAAQ,cAAc,CAAA,CACpE,GAAIA,CAAAA,CAA4B,CAE5B,IAAMD,CAAAA,CAD+B,KAAK,KAAA,CAAMC,CAA0B,CAAA,CACzC,IAAA,CAC5BE,GAAwBA,CAAAA,CAAM,QAAA,GAAa,MAAA,CAAOR,CAAAA,CAAO,EAAE,CAAA,EAAKQ,CAAAA,CAAM,UAAA,GAAe,CAC1F,EAEIH,CAAAA,EAAaK,CAAAA,CAASC,kBAAAA,CAAiB,CAAE,KAAMN,CAAAA,CAAY,IAAK,CAAC,CAAC,EAC1E,CACJ","file":"chunk-D7CTAABP.js","sourcesContent":["import { IViewedVideo } from \"../../interfaces/interfaces\";\r\nimport store from \"../store\";\r\nimport { setVideoSettings } from \"../slices/userSlice\";\r\nimport { mainPlayerVideoTag } from \"../../constants\";\r\n\r\nexport const handleContinuousPlayback = () => {\r\n const { params } = store.getState().videoData;\r\n const currentTime = mainPlayerVideoTag().currentTime;\r\n if (currentTime !== 0) {\r\n const duration = mainPlayerVideoTag().duration;\r\n const viewedVideo: IViewedVideo = {\r\n video_id: +params.id!,\r\n video_type: 2,\r\n time: currentTime === duration ? 0 : Math.floor(mainPlayerVideoTag().currentTime),\r\n };\r\n let viewedVideosInLocalStorage = localStorage.getItem(\"viewedVideos\");\r\n if (viewedVideosInLocalStorage) {\r\n let viewedVideos: IViewedVideo[] = JSON.parse(viewedVideosInLocalStorage);\r\n viewedVideos = viewedVideos.filter(\r\n (video: IViewedVideo) => video.video_id !== viewedVideo.video_id || video.video_type !== viewedVideo.video_type\r\n );\r\n if (viewedVideos.length < 10) viewedVideos.push(viewedVideo);\r\n else {\r\n viewedVideos.shift();\r\n viewedVideos.push(viewedVideo);\r\n }\r\n localStorage.setItem(\"viewedVideos\", JSON.stringify(viewedVideos));\r\n } else localStorage.setItem(\"viewedVideos\", JSON.stringify([viewedVideo]));\r\n }\r\n};\r\n\r\nexport const handleApplyContinuousPlayback = () => {\r\n const dispatch = store.dispatch;\r\n const { params } = store.getState().videoData;\r\n let viewedVideosInLocalStorage = localStorage.getItem(\"viewedVideos\");\r\n if (viewedVideosInLocalStorage) {\r\n const viewedVideos: IViewedVideo[] = JSON.parse(viewedVideosInLocalStorage);\r\n const viewedVideo = viewedVideos.find(\r\n (video: IViewedVideo) => video.video_id === Number(params.id) && video.video_type === 2\r\n );\r\n\r\n if (viewedVideo) dispatch(setVideoSettings({ time: viewedVideo.time }));\r\n }\r\n};\r\n\r\n"]}
|
package/chunk-EDQKSY4F.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/redux/actions/videoData.actions.ts","../src/videoPlayerLibrary/helpers/getDetailsConfigs.ts"],"names":["init_cjs_shims","detailAPI","id","params","store_default","API","detailsConfig","vodDetailsConfig","videoId","handleDetailsConfig","getVodDetails","dispatch","d","apiCaller","responseValidator","axios","weighted_random","setDetailsMiniPlayer","detailSetter","setIsFetchDetails","setIsValidAddress","data","setInfo","conditions","addUuidToSrc","handleSubtitle","subtitles","selectedSubtitle","faSubtitle","subtitle","mainPlayerVideoTag","textTrack","setSelectedSubtitle","sendFluentLog","subtitleLog"],"mappings":"oPAAAA,kBAAAA,EAAAA,CCAAA,
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/redux/actions/videoData.actions.ts","../src/videoPlayerLibrary/helpers/getDetailsConfigs.ts"],"names":["init_cjs_shims","detailAPI","id","params","store_default","API","detailsConfig","vodDetailsConfig","videoId","handleDetailsConfig","getVodDetails","dispatch","d","apiCaller","responseValidator","axios","weighted_random","setDetailsMiniPlayer","detailSetter","setIsFetchDetails","setIsValidAddress","data","setInfo","conditions","addUuidToSrc","handleSubtitle","subtitles","selectedSubtitle","faSubtitle","subtitle","mainPlayerVideoTag","textTrack","setSelectedSubtitle","sendFluentLog","subtitleLog"],"mappings":"oPAAAA,kBAAAA,EAAAA,CCAAA,kBAAAA,EAAAA,CAIO,IAAMC,EAAaC,CAAAA,EAAgB,CACtC,GAAM,CAAE,OAAAC,CAAO,CAAA,CAAIC,kBAAAA,CAAM,QAAA,GAAW,SAAA,CACpC,OAAOC,mBAAAA,EAAI,CAAE,IAAI,SAAA,EAAaH,CAAAA,EAAUC,CAAAA,CAAO,EAAA,CACnD,EAEMG,CAAAA,CAAgC,CAClC,GAAA,CAAK,EAAA,CACL,cAAe,CAAA,CACf,OAAA,CAAS,EAAC,CACV,WAAA,CAAa,EAAC,CACd,aAAA,CAAe,MACnB,CAAA,CAEMC,EAAoBC,CAAAA,GACtBF,CAAAA,CAAc,GAAA,CAAML,CAAAA,CAAUO,CAAO,CAAA,CACrCF,CAAAA,CAAc,aAAA,CAAgB,CAAA,CAC9BA,EAAc,WAAA,CAAc,CACxB,CACI,SAAA,CAAW,GAAA,CACX,UAAW,IAAA,CACX,YAAA,CAAc,EAAC,CAC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BAAoBF,mBAAAA,EAAmB,CAAE,UAAA,CAAW,CAAC,CAAC,CAAC,CAAA,CAChEG,mBAAAA,CAAcC,mBAAAA,CAAYJ,qBAAmB,CAAE,UAAA,CAAW,CAAC,CAAA,CAAE,QAAQ,CAAC,CAAA,EAG5E","file":"chunk-EDQKSY4F.js","sourcesContent":["import { apiCaller, getAll } from \"../../services/apiCaller\";\r\nimport { API } from \"../../services/services\";\r\nimport {\r\n setInfo,\r\n setIsFetchDetails,\r\n setIsValidAddress,\r\n setSelectedSubtitle,\r\n} from \"../slices/videoDataSlice\";\r\nimport store from \"../store\";\r\nimport {\r\n addUuidToSrc,\r\n getUUID,\r\n responseValidator,\r\n weighted_random,\r\n} from \"../../helpers\";\r\nimport axios from \"axios\";\r\nimport { handleDetailsConfig } from \"../../getDetailsConfigs\";\r\nimport { subtitleLog } from \"../../logs/logs\";\r\nimport { sendFluentLog } from \"../../logs/fluentdLogger\";\r\nimport { mainPlayerVideoTag } from \"../../constants\";\r\nimport { setDetailsMiniPlayer } from \"../slices/miniPlayerSlice\";\r\nimport { conditions } from \"../../conditions/conditions\";\r\nimport { ConditionName } from \"../../interfaces/enums\";\r\n\r\nexport const getVodDetails = async (videoId?: string) => {\r\n const dispatch = store.dispatch;\r\n try {\r\n const d = await apiCaller({ ...handleDetailsConfig(videoId) });\r\n if (responseValidator(d.status)) {\r\n await axios.head(\r\n \"https://\" + weighted_random(d.data.hls_links) + d.data.path\r\n );\r\n if (videoId) return dispatch(setDetailsMiniPlayer(d.data));\r\n detailSetter(d.data);\r\n } else\r\n throw new Error(JSON.stringify({ status: d.status, message: d.data }));\r\n } catch (error: any) {\r\n dispatch(setIsFetchDetails(true));\r\n dispatch(setIsValidAddress(false));\r\n }\r\n};\r\n\r\nexport const detailSetter = (data: any) => {\r\n const dispatch = store.dispatch;\r\n const {params} = store.getState().videoData;\r\n dispatch(\r\n setInfo({\r\n ...data,\r\n subtitles: conditions(ConditionName.hasSubtitlesInParams) ? params.subtitles : data.subtitles,\r\n stream_link:\r\n !!data.stream_link &&\r\n addUuidToSrc(\"https://\" + weighted_random(data.hls_links) + data.path),\r\n })\r\n );\r\n dispatch(setIsFetchDetails(true));\r\n dispatch(setIsValidAddress(true));\r\n};\r\n\r\nexport const handleSubtitle = () => {\r\n const dispatch = store.dispatch;\r\n const { subtitles, selectedSubtitle } = store.getState().videoData;\r\n\r\n const faSubtitle: any = subtitles.find(\r\n (subtitle: any) => subtitle.language === \"fa\"\r\n );\r\n if (selectedSubtitle) {\r\n Object.values(mainPlayerVideoTag().textTracks).find(\r\n (textTrack: any) => textTrack.mode === \"showing\"\r\n )!.mode = \"disabled\";\r\n dispatch(setSelectedSubtitle(undefined));\r\n sendFluentLog(subtitleLog(\"empty\"));\r\n } else {\r\n if (faSubtitle) {\r\n faSubtitle.mode = \"showing\";\r\n dispatch(setSelectedSubtitle(faSubtitle));\r\n sendFluentLog(subtitleLog(faSubtitle.language));\r\n } else {\r\n mainPlayerVideoTag().textTracks[0].mode = \"showing\";\r\n dispatch(setSelectedSubtitle(mainPlayerVideoTag().textTracks[0]));\r\n sendFluentLog(subtitleLog(mainPlayerVideoTag().textTracks[0].language));\r\n }\r\n }\r\n};\r\n\r\nexport const getAllGeneralMarker = async (url: string) => {\r\n const response: any = await getAll(url, [\r\n {\r\n codeAbove: 400,\r\n codeBelow: null,\r\n excludeCodes: [],\r\n includeCodes: [],\r\n delay: 2,\r\n count: 3\r\n }\r\n ]);\r\n return response;\r\n};\r\n","import { IDetailsConfig } from \"./interfaces/interfaces\";\r\nimport store from \"./redux/store\";\r\nimport { API } from \"./services/services\";\r\n\r\nexport const detailAPI = (id?: string) => {\r\n const { params } = store.getState().videoData;\r\n return API().vod.getVodUrl + (id ? id : params.id);\r\n};\r\n\r\nconst detailsConfig: IDetailsConfig = {\r\n url: \"\",\r\n maxRetryCount: 0,\r\n headers: {},\r\n retryPolicy: [],\r\n errorCallback: undefined\r\n};\r\n\r\nconst vodDetailsConfig = (videoId?:string) => {\r\n detailsConfig.url = detailAPI(videoId);\r\n detailsConfig.maxRetryCount = 3;\r\n detailsConfig.retryPolicy = [\r\n {\r\n codeAbove: 500,\r\n codeBelow: null,\r\n excludeCodes: [],\r\n includeCodes: [409],\r\n delay: 1,\r\n count: 3\r\n },\r\n {\r\n codeAbove: null,\r\n codeBelow: 404,\r\n excludeCodes: [403, 402, 401, 400],\r\n includeCodes: [],\r\n delay: 10,\r\n count: 6\r\n }\r\n ];\r\n return detailsConfig;\r\n};\r\n\r\n\r\nexport const handleDetailsConfig = (videoId?: string) => {\r\n vodDetailsConfig(videoId);\r\n return detailsConfig;\r\n};\r\n"]}
|