cafe-video-player 3.0.6 → 3.0.8
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-JWDCD6VE.js → VideoHighLighter-HVS4CP26.js} +2 -2
- package/{VideoHighLighter-JWDCD6VE.js.map → VideoHighLighter-HVS4CP26.js.map} +1 -1
- package/{VideoHighLighter-WUXAAIYV.mjs → VideoHighLighter-R2LX3ZCY.mjs} +2 -2
- package/{VideoHighLighter-WUXAAIYV.mjs.map → VideoHighLighter-R2LX3ZCY.mjs.map} +1 -1
- package/{backwardForward-AM6BGT56.mjs → backwardForward-R3CPRHJG.mjs} +2 -2
- package/{backwardForward-AM6BGT56.mjs.map → backwardForward-R3CPRHJG.mjs.map} +1 -1
- package/{backwardForward-V5X7EEQT.js → backwardForward-W3FUQG26.js} +2 -2
- package/{backwardForward-V5X7EEQT.js.map → backwardForward-W3FUQG26.js.map} +1 -1
- package/{chunk-HYXP7AJ2.js → chunk-45E54NWZ.js} +2 -2
- package/{chunk-HYXP7AJ2.js.map → chunk-45E54NWZ.js.map} +1 -1
- package/chunk-47X34WNZ.js +9 -0
- package/chunk-47X34WNZ.js.map +1 -0
- package/chunk-4KRYS3HT.mjs +2 -0
- package/{chunk-WZ2JPZIK.mjs.map → chunk-4KRYS3HT.mjs.map} +1 -1
- package/chunk-6GZHEQTZ.mjs +2 -0
- package/chunk-6GZHEQTZ.mjs.map +1 -0
- package/{chunk-JUMJIFA2.js → chunk-DOW3SWLS.js} +2 -2
- package/{chunk-JUMJIFA2.js.map → chunk-DOW3SWLS.js.map} +1 -1
- package/chunk-EBOPTQAJ.mjs +3 -0
- package/{chunk-YICJLHDR.mjs.map → chunk-EBOPTQAJ.mjs.map} +1 -1
- package/chunk-G2ZC7IJK.mjs +2 -0
- package/{chunk-KHJ3KDQ7.mjs.map → chunk-G2ZC7IJK.mjs.map} +1 -1
- package/chunk-GZLP6GZF.mjs +9 -0
- package/chunk-GZLP6GZF.mjs.map +1 -0
- package/chunk-IZP23D2I.mjs +3 -0
- package/chunk-IZP23D2I.mjs.map +1 -0
- package/{chunk-6FCFUQR2.mjs → chunk-MNUGCMYR.mjs} +2 -2
- package/{chunk-6FCFUQR2.mjs.map → chunk-MNUGCMYR.mjs.map} +1 -1
- package/chunk-MYPZGMHH.js +2 -0
- package/{chunk-FZT7TIJA.js.map → chunk-MYPZGMHH.js.map} +1 -1
- package/chunk-O4Z67S4F.js +2 -0
- package/chunk-O4Z67S4F.js.map +1 -0
- package/{chunk-IWMBVCR4.mjs → chunk-OYNS7P5H.mjs} +2 -2
- package/{chunk-IWMBVCR4.mjs.map → chunk-OYNS7P5H.mjs.map} +1 -1
- package/chunk-PJ5S2UP3.js +3 -0
- package/{chunk-OYLIU32Z.js.map → chunk-PJ5S2UP3.js.map} +1 -1
- package/chunk-QSFAQGRX.js +3 -0
- package/chunk-QSFAQGRX.js.map +1 -0
- package/{chunk-LZU3N6G5.js → chunk-S4UH5Q2F.js} +2 -2
- package/{chunk-LZU3N6G5.js.map → chunk-S4UH5Q2F.js.map} +1 -1
- package/chunk-YTI7MNTA.js +2 -0
- package/{chunk-KMPQCU4H.js.map → chunk-YTI7MNTA.js.map} +1 -1
- package/chunk-ZOZPPUR2.mjs +2 -0
- package/{chunk-NADMKBAD.mjs.map → chunk-ZOZPPUR2.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-5TAEJK6K.js +2 -0
- package/{nonStaticVideoTag-VYSANRWE.js.map → nonStaticVideoTag-5TAEJK6K.js.map} +1 -1
- package/nonStaticVideoTag-MZOIOJPM.mjs +2 -0
- package/{nonStaticVideoTag-BC77XQ44.mjs.map → nonStaticVideoTag-MZOIOJPM.mjs.map} +1 -1
- package/package.json +2 -2
- package/{staticPlayer-IA5VOOL7.mjs → staticPlayer-DTNPBH5A.mjs} +2 -2
- package/{staticPlayer-IA5VOOL7.mjs.map → staticPlayer-DTNPBH5A.mjs.map} +1 -1
- package/staticPlayer-HQ7LIMJX.js +2 -0
- package/{staticPlayer-CGRCNQY7.js.map → staticPlayer-HQ7LIMJX.js.map} +1 -1
- package/staticVideoTag-3LXMSPQU.js +2 -0
- package/staticVideoTag-3LXMSPQU.js.map +1 -0
- package/staticVideoTag-K5KF2NBH.mjs +2 -0
- package/staticVideoTag-K5KF2NBH.mjs.map +1 -0
- package/videoArea-2TECKTYP.js +2 -0
- package/{videoArea-PVF2OCNZ.js.map → videoArea-2TECKTYP.js.map} +1 -1
- package/videoArea-MX6NFDFD.mjs +2 -0
- package/{videoArea-Y3KAQU3N.mjs.map → videoArea-MX6NFDFD.mjs.map} +1 -1
- package/videoPlayerStyles.css +9 -9
- package/{vodPlayer-TD7ZODRU.js → vodPlayer-2CKPYYAR.js} +2 -2
- package/{vodPlayer-TD7ZODRU.js.map → vodPlayer-2CKPYYAR.js.map} +1 -1
- package/{vodPlayer-U4V3JCPD.mjs → vodPlayer-J7SNEV7Q.mjs} +2 -2
- package/{vodPlayer-U4V3JCPD.mjs.map → vodPlayer-J7SNEV7Q.mjs.map} +1 -1
- package/chunk-6HE62Y6M.js +0 -2
- package/chunk-6HE62Y6M.js.map +0 -1
- package/chunk-B6GRRAJN.js +0 -9
- package/chunk-B6GRRAJN.js.map +0 -1
- package/chunk-FZT7TIJA.js +0 -2
- package/chunk-HSLWBAU4.js +0 -3
- package/chunk-HSLWBAU4.js.map +0 -1
- package/chunk-KHJ3KDQ7.mjs +0 -2
- package/chunk-KMPQCU4H.js +0 -2
- package/chunk-NADMKBAD.mjs +0 -2
- package/chunk-OYLIU32Z.js +0 -3
- package/chunk-TQ5HPLRS.mjs +0 -3
- package/chunk-TQ5HPLRS.mjs.map +0 -1
- package/chunk-WZ2JPZIK.mjs +0 -2
- package/chunk-Y6ZGXHU4.mjs +0 -2
- package/chunk-Y6ZGXHU4.mjs.map +0 -1
- package/chunk-YICJLHDR.mjs +0 -3
- package/chunk-ZSYJPSBJ.mjs +0 -9
- package/chunk-ZSYJPSBJ.mjs.map +0 -1
- package/nonStaticVideoTag-BC77XQ44.mjs +0 -2
- package/nonStaticVideoTag-VYSANRWE.js +0 -2
- package/staticPlayer-CGRCNQY7.js +0 -2
- package/staticVideoTag-5MU3V4U7.mjs +0 -2
- package/staticVideoTag-5MU3V4U7.mjs.map +0 -1
- package/staticVideoTag-LJ6WHCFB.js +0 -2
- package/staticVideoTag-LJ6WHCFB.js.map +0 -1
- package/videoArea-PVF2OCNZ.js +0 -2
- package/videoArea-Y3KAQU3N.mjs +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
//# sourceMappingURL=VideoHighLighter-
|
|
1
|
+
'use strict';var chunkS4UH5Q2F_js=require('./chunk-S4UH5Q2F.js'),chunkYTI7MNTA_js=require('./chunk-YTI7MNTA.js'),chunkD54C47WZ_js=require('./chunk-D54C47WZ.js'),chunkQSFAQGRX_js=require('./chunk-QSFAQGRX.js'),chunkS7SXQ5YW_js=require('./chunk-S7SXQ5YW.js'),reactRedux=require('react-redux'),jsxRuntime=require('react/jsx-runtime'),reactCircularProgressbar=require('react-circular-progressbar'),r=require('next/legacy/image');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var r__default=/*#__PURE__*/_interopDefault(r);chunkS7SXQ5YW_js.e();chunkS7SXQ5YW_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 ${!chunkQSFAQGRX_js.t("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 y=()=>{let{params:e}=chunkS7SXQ5YW_js.A(({videoData:{params:f}})=>({params:f}),reactRedux.shallowEqual);return chunkS4UH5Q2F_js.a(),jsxRuntime.jsxs("div",{id:"video-area",className:`pl-relative pl-rounded-[12px] pl-w-full pl-h-full pl-aspect-video !pl-overflow-hidden ${chunkQSFAQGRX_js.t("isTouchScreen")&&"!pl-rounded-none"} ${chunkQSFAQGRX_js.t("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(r__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"})]}),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(r__default.default,{alt:"info-circle-icon",src:chunkD54C47WZ_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(r__default.default,{alt:"rotate-red-icon",src:chunkD54C47WZ_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 ${chunkQSFAQGRX_js.t("isTouchScreenPortrait")?"pl-flex-col":`pl-flex-col-reverse pl-mb-3 ${chunkQSFAQGRX_js.t("isFullScreen")&&"pl-mb-8"}`} pl-gap-[14.58px]`,children:[jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center pl-justify-between ${chunkQSFAQGRX_js.t("isFullScreen")?"pl-mx-8":"pl-mx-[14.58px]"}`,children:[jsxRuntime.jsx(chunkYTI7MNTA_js.c,{width:20,height:20}),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:chunkQSFAQGRX_js.ja(0)}),jsxRuntime.jsx("span",{children:"/"}),jsxRuntime.jsx("span",{children:chunkQSFAQGRX_js.ja(e.vhl_duration)})]}),jsxRuntime.jsx(chunkYTI7MNTA_js.b,{width:20,height:20})]})]}),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=y;module.exports=R;//# sourceMappingURL=VideoHighLighter-HVS4CP26.js.map
|
|
2
|
+
//# sourceMappingURL=VideoHighLighter-HVS4CP26.js.map
|
|
@@ -1 +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":"yhBAAAA,kBAAAA,EAAAA,CCAAA,kBAAAA,EAAAA,CAGA,IAAMC,EAAW,IAEbC,cAAAA,CAAC,OACC,IAAA,CAAK,QAAA,CACL,UAAW,CAAA,sEAAA,EACT,CAACC,kCAAsC,CAAA,EAAK,eAC9C,wCAEA,QAAA,CAAAD,cAAAA,CAAC,QAAK,SAAA,CAAU,YAAA,CAAa,sBAAU,CAAA,CACzC,CAAA,CAIGE,EAAQH,CAAAA,CDHf,IAAMI,EAAmB,IAAM,CAC7B,GAAM,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAIC,kBAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,MAAA,CAAAD,CAAO,CAAE,CAAA,IAAO,CAAE,OAAAA,CAAO,CAAA,CAAA,CAAIE,uBAAY,CAAA,CAC3F,OAAAC,oBAAc,CAGZC,eAAAA,CAAC,OACC,EAAA,CAAG,YAAA,CACH,UAAW,CAAA,sFAAA,EACTP,kBAAAA,CAAAA,eAAsC,GAAK,kBAC7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A,EAA8CP,iCAAqC,CAAA,CAAI,SAAA,CAAY,iBAAiB,CAAA,CAAA,CAClI,QAAA,CAAA,CAAAD,eAACc,kBAAAA,CAAA,CAAW,MAAO,EAAA,CAAI,MAAA,CAAQ,GAAI,CAAA,CACnCN,eAAAA,CAAC,OAAI,SAAA,CAAW,0CAAA,CACb,UAAAJ,CAAAA,CAAO,YAAA,EACNI,gBAAC,KAAA,CAAA,CAAI,SAAA,CAAU,oEACb,QAAA,CAAA,CAAAR,cAAAA,CAAC,MAAA,CAAA,CAAM,QAAA,CAAAe,oBAAa,CAAC,CAAA,CAAE,EACvBf,cAAAA,CAAC,MAAA,CAAA,CAAK,aAAC,CAAA,CACPA,cAAAA,CAAC,QAAM,QAAA,CAAAe,mBAAAA,CAAaX,EAAO,YAAY,CAAA,CAAE,GAC3C,CAAA,CAEFJ,cAAAA,CAACgB,mBAAA,CAAY,KAAA,CAAO,GAAI,MAAA,CAAQ,EAAA,CAAI,GACtC,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-JWDCD6VE.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\" />\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 width={20} height={20} />\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 width={20} height={20} />\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 ${\r\n !conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"\r\n } 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"]}
|
|
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":"yhBAAAA,kBAAAA,EAAAA,CCAAA,kBAAAA,EAAAA,CAGA,IAAMC,EAAW,IAEbC,cAAAA,CAAC,OACC,IAAA,CAAK,QAAA,CACL,UAAW,CAAA,sEAAA,EACT,CAACC,kCAAsC,CAAA,EAAK,eAC9C,wCAEA,QAAA,CAAAD,cAAAA,CAAC,QAAK,SAAA,CAAU,YAAA,CAAa,sBAAU,CAAA,CACzC,CAAA,CAIGE,EAAQH,CAAAA,CDHf,IAAMI,EAAmB,IAAM,CAC7B,GAAM,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAIC,kBA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CAC7E,CAAA,CAAA,CACF,CAAA,CAEFQ,gBAAC,KAAA,CAAA,CACC,SAAA,CAAW,WACRP,kBAAAA,CAAAA,uBAA8C,CAAA,CAE3C,cADA,CAAA,4BAAA,EAA+BA,kBAAAA,CAAAA,cAAqC,GAAK,SAAS,CAAA,CAExF,oBAEA,QAAA,CAAA,CAAAO,eAAAA,CAAC,OAAI,SAAA,CAAW,CAAA,2CAAA,EAA8CP,iCAAqC,CAAA,CAAI,SAAA,CAAY,iBAAiB,CAAA,CAAA,CAClI,QAAA,CAAA,CAAAD,eAACc,kBAAAA,CAAA,CAAW,MAAO,EAAA,CAAI,MAAA,CAAQ,GAAI,CAAA,CACnCN,eAAAA,CAAC,OAAI,SAAA,CAAW,0CAAA,CACb,UAAAJ,CAAAA,CAAO,YAAA,EACNI,gBAAC,KAAA,CAAA,CAAI,SAAA,CAAU,oEACb,QAAA,CAAA,CAAAR,cAAAA,CAAC,MAAA,CAAA,CAAM,QAAA,CAAAe,oBAAa,CAAC,CAAA,CAAE,EACvBf,cAAAA,CAAC,MAAA,CAAA,CAAK,aAAC,CAAA,CACPA,cAAAA,CAAC,QAAM,QAAA,CAAAe,mBAAAA,CAAaX,EAAO,YAAY,CAAA,CAAE,GAC3C,CAAA,CAEFJ,cAAAA,CAACgB,mBAAA,CAAY,KAAA,CAAO,GAAI,MAAA,CAAQ,EAAA,CAAI,GACtC,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-HVS4CP26.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\" />\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 width={20} height={20} />\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 width={20} height={20} />\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 ${\r\n !conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"\r\n } 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"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=VideoHighLighter-
|
|
1
|
+
import {a}from'./chunk-ZOZPPUR2.mjs';import {c,b}from'./chunk-4KRYS3HT.mjs';import {a as a$1}from'./chunk-X7ZT44GS.mjs';import {t,ja}from'./chunk-IZP23D2I.mjs';import {e,A}from'./chunk-SVD4N6WD.mjs';import {shallowEqual}from'react-redux';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {CircularProgressbarWithChildren,buildStyles}from'react-circular-progressbar';import r 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 ${!t("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}=A(({videoData:{params:f}})=>({params:f}),shallowEqual);return a(),jsxs("div",{id:"video-area",className:`pl-relative pl-rounded-[12px] pl-w-full pl-h-full pl-aspect-video !pl-overflow-hidden ${t("isTouchScreen")&&"!pl-rounded-none"} ${t("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(r,{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"})]}),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(r,{alt:"info-circle-icon",src:a$1.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(r,{alt:"rotate-red-icon",src:a$1.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 ${t("isTouchScreenPortrait")?"pl-flex-col":`pl-flex-col-reverse pl-mb-3 ${t("isFullScreen")&&"pl-mb-8"}`} pl-gap-[14.58px]`,children:[jsxs("div",{className:`pl-flex pl-items-center pl-justify-between ${t("isFullScreen")?"pl-mx-8":"pl-mx-[14.58px]"}`,children:[jsx(c,{width:20,height:20}),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:ja(0)}),jsx("span",{children:"/"}),jsx("span",{children:ja(e.vhl_duration)})]}),jsx(b,{width:20,height:20})]})]}),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-R2LX3ZCY.mjs.map
|
|
2
|
+
//# sourceMappingURL=VideoHighLighter-R2LX3ZCY.mjs.map
|
|
@@ -1 +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":"sZAAAA,CAAAA,EAAAA,CCAAA,CAAAA,EAAAA,CAGA,IAAMC,EAAW,IAEbC,GAAAA,CAAC,OACC,IAAA,CAAK,QAAA,CACL,UAAW,CAAA,sEAAA,EACT,CAACC,iBAAsC,CAAA,EAAK,eAC9C,wCAEA,QAAA,CAAAD,GAAAA,CAAC,QAAK,SAAA,CAAU,YAAA,CAAa,sBAAU,CAAA,CACzC,CAAA,CAIGE,EAAQH,CAAAA,CDHf,IAAMI,EAAmB,IAAM,CAC7B,GAAM,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAIC,CAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,MAAA,CAAAD,CAAO,CAAE,CAAA,IAAO,CAAE,OAAAA,CAAO,CAAA,CAAA,CAAIE,YAAY,CAAA,CAC3F,OAAAC,GAAc,CAGZC,IAAAA,CAAC,OACC,EAAA,CAAG,YAAA,CACH,UAAW,CAAA,sFAAA,EACTP,CAAAA,CAAAA,eAAsC,GAAK,kBAC7C,CAAA,CAAA,EAAIA,gBAAqC,CAAA,EAAK,6FAA6F,GAE1I,QAAA,CAAA,CAAAG,CAAAA,CAAO,UAAA,EAAcA,CAAAA,CAAO,aAAe,UAAA,EAC1CI,IAAAA,CAAC,OAAI,SAAA,CAAU,8DAAA,CACZ,UAAAJ,CAAAA,CAAO,MAAA,EACNI,KAAC,KAAA,CAAA,CAAI,SAAA,CAAU,wCACb,QAAA,CAAA,CAAAR,GAAAA,CAACS,EAAA,CA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AC,MAAA,CAAA,CAAM,QAAA,CAAAe,GAAa,CAAC,CAAA,CAAE,EACvBf,GAAAA,CAAC,MAAA,CAAA,CAAK,aAAC,CAAA,CACPA,GAAAA,CAAC,QAAM,QAAA,CAAAe,EAAAA,CAAaX,EAAO,YAAY,CAAA,CAAE,GAC3C,CAAA,CAEFJ,GAAAA,CAACgB,EAAA,CAAY,KAAA,CAAO,GAAI,MAAA,CAAQ,EAAA,CAAI,GACtC,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-WUXAAIYV.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\" />\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 width={20} height={20} />\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 width={20} height={20} />\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 ${\r\n !conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"\r\n } 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"]}
|
|
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":"sZAAAA,CAAAA,EAAAA,CCAAA,CAAAA,EAAAA,CAGA,IAAMC,EAAW,IAEbC,GAAAA,CAAC,OACC,IAAA,CAAK,QAAA,CACL,UAAW,CAAA,sEAAA,EACT,CAACC,iBAAsC,CAAA,EAAK,eAC9C,wCAEA,QAAA,CAAAD,GAAAA,CAAC,QAAK,SAAA,CAAU,YAAA,CAAa,sBAAU,CAAA,CACzC,CAAA,CAIGE,EAAQH,CAAAA,CDHf,IAAMI,EAAmB,IAAM,CAC7B,GAAM,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAIC,CAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,MAAA,CAAAD,CAAO,CAAE,CAAA,IAAO,CAAE,OAAAA,CAAO,CAAA,CAAA,CAAIE,YAAY,CAAA,CAC3F,OAAAC,GAAc,CAGZC,IAAAA,CAAC,OACC,EAAA,CAAG,YAAA,CACH,UAAW,CAAA,sFAAA,EACTP,CAAAA,CAAAA,eAAsC,GAAK,kBAC7C,CAAA,CAAA,EAAIA,gBAAqC,CAAA,EAAK,6FAA6F,GAE1I,QAAA,CA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,CAAAD,IAACc,CAAAA,CAAA,CAAW,MAAO,EAAA,CAAI,MAAA,CAAQ,GAAI,CAAA,CACnCN,IAAAA,CAAC,OAAI,SAAA,CAAW,0CAAA,CACb,UAAAJ,CAAAA,CAAO,YAAA,EACNI,KAAC,KAAA,CAAA,CAAI,SAAA,CAAU,oEACb,QAAA,CAAA,CAAAR,GAAAA,CAAC,MAAA,CAAA,CAAM,QAAA,CAAAe,GAAa,CAAC,CAAA,CAAE,EACvBf,GAAAA,CAAC,MAAA,CAAA,CAAK,aAAC,CAAA,CACPA,GAAAA,CAAC,QAAM,QAAA,CAAAe,EAAAA,CAAaX,EAAO,YAAY,CAAA,CAAE,GAC3C,CAAA,CAEFJ,GAAAA,CAACgB,EAAA,CAAY,KAAA,CAAO,GAAI,MAAA,CAAQ,EAAA,CAAI,GACtC,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-R2LX3ZCY.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\" />\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 width={20} height={20} />\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 width={20} height={20} />\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 ${\r\n !conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"\r\n } 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"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a}from'./chunk-TK36GS4S.mjs';import {a as a$1}from'./chunk-X7ZT44GS.mjs';import {t,u,
|
|
2
|
-
//# sourceMappingURL=backwardForward-
|
|
1
|
+
import {a}from'./chunk-TK36GS4S.mjs';import {a as a$1}from'./chunk-X7ZT44GS.mjs';import {t,u,_,fa,ga,na}from'./chunk-IZP23D2I.mjs';import {e,z,A,k}from'./chunk-SVD4N6WD.mjs';import {useState,useRef,useEffect}from'react';import {shallowEqual}from'react-redux';import {useDoubleTap}from'use-double-tap';import J from'next/legacy/image';import {jsx,jsxs}from'react/jsx-runtime';e();var w=1e3,x=10,v=t("isTouchScreen")?x:0,R=({type:e,isRightForward:g,isLeftBackward:P,setIsRightForward:c,setIsLeftBackward:i})=>{let[m,u$1]=useState(v),[A$1,n]=useState(false),a$2=useRef(m),o=useRef(null),f=z();A(({controller:{currentTime:r,duration:t}})=>({currentTime:r,duration:t}),shallowEqual);let {videoElementSizeInfo:N}=A(({videoData:{videoElementSizeInfo:r,params:t}})=>({videoElementSizeInfo:r,params:t}),shallowEqual),h=["touchBackward","backward"];useEffect(()=>{a$2.current=m;},[m]);let C;C=useDoubleTap(r=>{["touchBackward","touchForward"].includes(e)&&(r.stopPropagation(),e==="touchBackward"&&i?(i(true),f(k(false))):e==="touchForward"&&c&&(c(true),f(k(false))),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));},200),useEffect(()=>{A$1&&(n(false),g&&c?(c(false),u().duration-u().currentTime<=a$2.current?_(e,u().duration):_(e,a$2.current),u$1(v)):P&&i&&(i(false),u().currentTime<=a$2.current?_(e,0):_(e,a$2.current),u$1(v)));},[A$1,e]);let G=r=>{u$1(t=>t+x),t("isTouchScreenLandscape")&&na(r,e),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w);};if(a("ArrowRight",r=>{t("isPressKeyArrowRight")&&e==="forward"&&(r.stopPropagation(),u$1(t=>t+x),f(k(true)),c&&c(true),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));}),a("ArrowLeft",r=>{t("isPressKeyArrowLeft")&&e==="backward"&&(r.stopPropagation(),u$1(t=>t+x),f(k(true)),i&&i(true),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));}),e)return jsx("div",{id:e,className:`pl-relative pl-flex pl-flex-col pl-justify-center ${t("isTouchScreen")?"pl-px-[24px]":"pl-px-[48px]"} ${h.includes(e)?"pl-items-end":"pl-items-start"} pl-gap-2 pl-overflow-hidden`,style:{width:N.width,height:N.width},...C,children:(g||P)&&jsxs("div",{className:fa(`pl-rounded-full pl-flex pl-justify-center pl-items-center ${h.includes(e)?"":"pl-flex-row-reverse"}`,{desktop:"pl-gap-2",desktopFullScreen:"pl-gap-1",touch:"pl-gap-1",touchFullScreen:"pl-gap-1.5"}),onTouchStart:t("isTouchScreen")?G:void 0,children:[jsxs("p",{className:fa("pl-text-center pl-text-white ",{desktop:"pl-text-[16px] pl-font-extrabold pl-mt-0.5",desktopFullScreen:"pl-text-[32px] pl-font-bold",touch:"pl-text-base pl-font-extrabold pl-mt-0.5",touchFullScreen:"pl-text-[20px] pl-font-bold"}),children:[m,h.includes(e)?" - ":" + "]}),jsx("div",{className:"pl-flex pl-justify-center pl-items-center",children:jsx(J,{src:a$1.chevronLeft,width:ga({desktop:20,desktopFullScreen:40,touch:16,touchFullScreen:20}),height:ga({desktop:20,desktopFullScreen:40,touch:16,touchFullScreen:20}),alt:"",className:` pl-object-cover ${h.includes(e)?"":"pl-rotate-180"}`})})]})})},ce=R;export{ce as default};//# sourceMappingURL=backwardForward-R3CPRHJG.mjs.map
|
|
2
|
+
//# sourceMappingURL=backwardForward-R3CPRHJG.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/backwardForward/backwardForward.tsx"],"names":["init_esm_shims","hideTime","jump","initialJump","conditions","BackwardForward","type","isRightForward","isLeftBackward","setIsRightForward","setIsLeftBackward","backwardForwardCount","setBackwardForwardCount","useState","hide","setHide","backwardForwardCountRef","useRef","timeoutRef","dispatch","useAppDispatch","useAppSelector","currentTime","duration","shallowEqual","videoElementSizeInfo","params","isLeft","useEffect","doubleTouch","useDoubleTap","event","setActiveElements","mainPlayerVideoTag","handleBackwardForward","handleTouchStart","prev","handleRippleCircle","useKeyPress_default","jsx","jsxs","tw","Image","importImages_default","styleMerge","backwardForward_default"],"mappings":"uXAAAA,CAAAA,EAAAA,CAeA,IAAMC,CAAAA,CAAW,GAAA,CACXC,CAAAA,CAAO,EAAA,CACPC,CAAAA,CAAcC,CAAAA,CAAAA,eAAsC,CAAA,CAAIF,CAAAA,CAAO,CAAA,CAE/DG,CAAAA,CAAkB,CAAC,CAAE,IAAA,CAAAC,CAAAA,CAAM,cAAA,CAAAC,CAAAA,CAAgB,cAAA,CAAAC,CAAAA,CAAgB,iBAAA,CAAAC,CAAAA,CAAmB,iBAAA,CAAAC,CAAkB,CAAA,GAA6B,CACjI,GAAM,CAACC,CAAAA,CAAsBC,GAAuB,CAAA,CAAIC,QAAAA,CAAiBV,CAAW,CAAA,CAC9E,CAACW,GAAAA,CAAMC,CAAO,CAAA,CAAIF,QAAAA,CAAkB,KAAK,CAAA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I,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACzF,GAAA,CAAI,EAAA,CACJ,SAAA,CAAW,CAAA,iBAAA,EAAoBjB,CAAAA,CAAO,QAAA,CAASrB,CAAI,CAAA,CAAI,EAAA,CAAK,eAAe,CAAA,CAAA,CAC7E,CAAA,CAuBF,CAAA,CAAA,CACF,CAAA,CAEJ,CAEN,CAAA,CAEOuC,EAAAA,CAAQxC","file":"backwardForward-AM6BGT56.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, styleMerge, tw } from \"../../../helpers/helpers\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\nimport useKeyPress from \"../../../helpers/hooks/useKeyPress\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/legacy/image\";\r\n\r\nconst hideTime = 1000;\r\nconst jump = 10;\r\nconst initialJump = conditions(ConditionName.isTouchScreen) ? jump : 0;\r\n\r\nconst BackwardForward = ({ type, isRightForward, isLeftBackward, setIsRightForward, setIsLeftBackward }: IBackwardForwardProps) => {\r\n const [backwardForwardCount, setBackwardForwardCount] = useState<number>(initialJump);\r\n const [hide, setHide] = useState<boolean>(false);\r\n\r\n const backwardForwardCountRef = useRef<number>(backwardForwardCount);\r\n const timeoutRef = useRef<any>(null);\r\n\r\n const dispatch = useAppDispatch();\r\n\r\n useAppSelector(({ controller: { currentTime, duration } }) => ({ currentTime, duration }), shallowEqual);\r\n\r\n const { videoElementSizeInfo } = useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n const isRight = [\"touchForward\", \"forward\"];\r\n const isLeft = [\"touchBackward\", \"backward\"];\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\" && setIsLeftBackward) {\r\n setIsLeftBackward(true);\r\n dispatch(setActiveElements(false));\r\n } else if (type === \"touchForward\" && setIsRightForward) {\r\n setIsRightForward(true);\r\n dispatch(setActiveElements(false));\r\n }\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 if (isRightForward && setIsRightForward) {\r\n setIsRightForward(false);\r\n if (mainPlayerVideoTag().duration - mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current)\r\n handleBackwardForward(type, mainPlayerVideoTag().duration);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n } else if (isLeftBackward && setIsLeftBackward) {\r\n setIsLeftBackward(false);\r\n if (mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, 0);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n }\r\n }\r\n }, [hide, type]);\r\n\r\n const handleTouchStart = (event: any) => {\r\n setBackwardForwardCount((prev) => prev + jump);\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 useKeyPress(\"ArrowRight\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowRight) && type === \"forward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsRightForward) setIsRightForward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n useKeyPress(\"ArrowLeft\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowLeft) && type === \"backward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsLeftBackward) setIsLeftBackward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n if (type)\r\n return (\r\n <div\r\n id={type}\r\n className={`pl-relative pl-flex pl-flex-col pl-justify-center ${conditions(ConditionName.isTouchScreen) ? \"pl-px-[24px]\" : \"pl-px-[48px]\"} ${\r\n isLeft.includes(type) ? \"pl-items-end\" : \"pl-items-start\"\r\n } pl-gap-2 pl-overflow-hidden`}\r\n style={{ width: videoElementSizeInfo.width, height: videoElementSizeInfo.width }}\r\n {...doubleTouch}\r\n >\r\n {(isRightForward || isLeftBackward) && (\r\n <div\r\n className={tw(`pl-rounded-full pl-flex pl-justify-center pl-items-center ${isLeft.includes(type) ? \"\" : \"pl-flex-row-reverse\"}`, {\r\n desktop: \"pl-gap-2\",\r\n desktopFullScreen: \"pl-gap-1\",\r\n touch: \"pl-gap-1\",\r\n touchFullScreen: \"pl-gap-1.5\",\r\n })}\r\n onTouchStart={conditions(ConditionName.isTouchScreen) ? handleTouchStart : undefined}\r\n >\r\n <p\r\n className={tw(`pl-text-center pl-text-white `, {\r\n desktop: \"pl-text-[16px] pl-font-extrabold pl-mt-0.5\",\r\n desktopFullScreen: \"pl-text-[32px] pl-font-bold\",\r\n touch: \"pl-text-base pl-font-extrabold pl-mt-0.5\",\r\n touchFullScreen: \"pl-text-[20px] pl-font-bold\",\r\n })}\r\n >\r\n {backwardForwardCount}\r\n {isLeft.includes(type) ? \" - \" : \" + \"}\r\n </p>\r\n <div className={`pl-flex pl-justify-center pl-items-center`}>\r\n <Image\r\n src={IMAGES.chevronLeft}\r\n width={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n height={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n alt=\"\"\r\n className={` pl-object-cover ${isLeft.includes(type) ? \"\" : \"pl-rotate-180\"}`}\r\n />\r\n\r\n {/* <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n /> */}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\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","jump","initialJump","conditions","BackwardForward","type","isRightForward","isLeftBackward","setIsRightForward","setIsLeftBackward","backwardForwardCount","setBackwardForwardCount","useState","hide","setHide","backwardForwardCountRef","useRef","timeoutRef","dispatch","useAppDispatch","useAppSelector","currentTime","duration","shallowEqual","videoElementSizeInfo","params","isLeft","useEffect","doubleTouch","useDoubleTap","event","setActiveElements","mainPlayerVideoTag","handleBackwardForward","handleTouchStart","prev","handleRippleCircle","useKeyPress_default","jsx","jsxs","tw","Image","importImages_default","styleMerge","backwardForward_default"],"mappings":"uXAAAA,CAAAA,EAAAA,CAeA,IAAMC,CAAAA,CAAW,GAAA,CACXC,CAAAA,CAAO,EAAA,CACPC,CAAAA,CAAcC,CAAAA,CAAAA,eAAsC,CAAA,CAAIF,CAAAA,CAAO,CAAA,CAE/DG,CAAAA,CAAkB,CAAC,CAAE,IAAA,CAAAC,CAAAA,CAAM,cAAA,CAAAC,CAAAA,CAAgB,cAAA,CAAAC,CAAAA,CAAgB,iBAAA,CAAAC,CAAAA,CAAmB,iBAAA,CAAAC,CAAkB,CAAA,GAA6B,CACjI,GAAM,CAACC,CAAAA,CAAsBC,GAAuB,CAAA,CAAIC,QAAAA,CAAiBV,CAAW,CAAA,CAC9E,CAACW,GAAAA,CAAMC,CAAO,CAAA,CAAIF,QAAAA,CAAkB,KAAK,CAAA,CAEzCG,GAAAA,CAA0BC,MAAAA,CAAeN,CAAoB,CAAA,CAC7DO,CAAAA,CAAaD,MAAAA,CAAY,IAAI,CAAA,CAE7BE,CAAAA,CAAWC,CAAAA,EAAe,CAEhCC,CAAAA,CAAe,CAAC,CAAE,UAAA,CAAY,CAAE,WAAA,CAAAC,CAAAA,CAAa,QAAA,CAAAC,CAAS,CAAE,CAAA,IAAO,CAAE,WAAA,CAAAD,CAAAA,CAAa,QAAA,CAAAC,CAAS,CAAA,CAAA,CAAIC,YAAY,CAAA,CAEvG,IAAM,CAAE,oBAAA,CAAAC,CAAqB,CAAA,CAAIJ,CAAAA,CAC/B,CAAC,CAAE,SAAA,CAAW,CAAE,oBAAA,CAAAI,CAAAA,CAAsB,MAA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AC,CAAA,CACD,YAAA,CAAcF,CAAAA,CAAAA,eAAsC,CAAA,CAAI+B,CAAAA,CAAmB,MAAA,CAE3E,QAAA,CAAA,CAAAK,IAAAA,CAAC,GAAA,CAAA,CACC,SAAA,CAAWC,EAAAA,CAAG,gCAAA,CAAkC,CAC9C,OAAA,CAAS,4CAAA,CACT,iBAAA,CAAmB,6BAAA,CACnB,KAAA,CAAO,0CAAA,CACP,eAAA,CAAiB,6BACnB,CAAC,CAAA,CAEA,QAAA,CAAA,CAAA9B,CAAAA,CACAgB,CAAAA,CAAO,QAAA,CAASrB,CAAI,CAAA,CAAI,KAAA,CAAQ,KAAA,CAAA,CACnC,CAAA,CACAiC,GAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAW,2CAAA,CACd,QAAA,CAAAA,GAAAA,CAACG,CAAAA,CAAA,CACC,GAAA,CAAKC,GAAAA,CAAO,WAAA,CACZ,KAAA,CAAOC,EAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACxF,MAAA,CAAQA,EAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACzF,GAAA,CAAI,EAAA,CACJ,SAAA,CAAW,CAAA,iBAAA,EAAoBjB,CAAAA,CAAO,QAAA,CAASrB,CAAI,CAAA,CAAI,EAAA,CAAK,eAAe,CAAA,CAAA,CAC7E,CAAA,CAuBF,CAAA,CAAA,CACF,CAAA,CAEJ,CAEN,CAAA,CAEOuC,EAAAA,CAAQxC","file":"backwardForward-R3CPRHJG.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, styleMerge, tw } from \"../../../helpers/helpers\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\nimport useKeyPress from \"../../../helpers/hooks/useKeyPress\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/legacy/image\";\r\n\r\nconst hideTime = 1000;\r\nconst jump = 10;\r\nconst initialJump = conditions(ConditionName.isTouchScreen) ? jump : 0;\r\n\r\nconst BackwardForward = ({ type, isRightForward, isLeftBackward, setIsRightForward, setIsLeftBackward }: IBackwardForwardProps) => {\r\n const [backwardForwardCount, setBackwardForwardCount] = useState<number>(initialJump);\r\n const [hide, setHide] = useState<boolean>(false);\r\n\r\n const backwardForwardCountRef = useRef<number>(backwardForwardCount);\r\n const timeoutRef = useRef<any>(null);\r\n\r\n const dispatch = useAppDispatch();\r\n\r\n useAppSelector(({ controller: { currentTime, duration } }) => ({ currentTime, duration }), shallowEqual);\r\n\r\n const { videoElementSizeInfo } = useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n const isRight = [\"touchForward\", \"forward\"];\r\n const isLeft = [\"touchBackward\", \"backward\"];\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\" && setIsLeftBackward) {\r\n setIsLeftBackward(true);\r\n dispatch(setActiveElements(false));\r\n } else if (type === \"touchForward\" && setIsRightForward) {\r\n setIsRightForward(true);\r\n dispatch(setActiveElements(false));\r\n }\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 if (isRightForward && setIsRightForward) {\r\n setIsRightForward(false);\r\n if (mainPlayerVideoTag().duration - mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current)\r\n handleBackwardForward(type, mainPlayerVideoTag().duration);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n } else if (isLeftBackward && setIsLeftBackward) {\r\n setIsLeftBackward(false);\r\n if (mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, 0);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n }\r\n }\r\n }, [hide, type]);\r\n\r\n const handleTouchStart = (event: any) => {\r\n setBackwardForwardCount((prev) => prev + jump);\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 useKeyPress(\"ArrowRight\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowRight) && type === \"forward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsRightForward) setIsRightForward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n useKeyPress(\"ArrowLeft\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowLeft) && type === \"backward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsLeftBackward) setIsLeftBackward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n if (type)\r\n return (\r\n <div\r\n id={type}\r\n className={`pl-relative pl-flex pl-flex-col pl-justify-center ${conditions(ConditionName.isTouchScreen) ? \"pl-px-[24px]\" : \"pl-px-[48px]\"} ${\r\n isLeft.includes(type) ? \"pl-items-end\" : \"pl-items-start\"\r\n } pl-gap-2 pl-overflow-hidden`}\r\n style={{ width: videoElementSizeInfo.width, height: videoElementSizeInfo.width }}\r\n {...doubleTouch}\r\n >\r\n {(isRightForward || isLeftBackward) && (\r\n <div\r\n className={tw(`pl-rounded-full pl-flex pl-justify-center pl-items-center ${isLeft.includes(type) ? \"\" : \"pl-flex-row-reverse\"}`, {\r\n desktop: \"pl-gap-2\",\r\n desktopFullScreen: \"pl-gap-1\",\r\n touch: \"pl-gap-1\",\r\n touchFullScreen: \"pl-gap-1.5\",\r\n })}\r\n onTouchStart={conditions(ConditionName.isTouchScreen) ? handleTouchStart : undefined}\r\n >\r\n <p\r\n className={tw(`pl-text-center pl-text-white `, {\r\n desktop: \"pl-text-[16px] pl-font-extrabold pl-mt-0.5\",\r\n desktopFullScreen: \"pl-text-[32px] pl-font-bold\",\r\n touch: \"pl-text-base pl-font-extrabold pl-mt-0.5\",\r\n touchFullScreen: \"pl-text-[20px] pl-font-bold\",\r\n })}\r\n >\r\n {backwardForwardCount}\r\n {isLeft.includes(type) ? \" - \" : \" + \"}\r\n </p>\r\n <div className={`pl-flex pl-justify-center pl-items-center`}>\r\n <Image\r\n src={IMAGES.chevronLeft}\r\n width={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n height={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n alt=\"\"\r\n className={` pl-object-cover ${isLeft.includes(type) ? \"\" : \"pl-rotate-180\"}`}\r\n />\r\n\r\n {/* <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n /> */}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default BackwardForward;\r\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkVLK44HNO_js=require('./chunk-VLK44HNO.js'),chunkD54C47WZ_js=require('./chunk-D54C47WZ.js'),
|
|
2
|
-
//# sourceMappingURL=backwardForward-
|
|
1
|
+
'use strict';var chunkVLK44HNO_js=require('./chunk-VLK44HNO.js'),chunkD54C47WZ_js=require('./chunk-D54C47WZ.js'),chunkQSFAQGRX_js=require('./chunk-QSFAQGRX.js'),chunkS7SXQ5YW_js=require('./chunk-S7SXQ5YW.js'),react=require('react'),reactRedux=require('react-redux'),useDoubleTap=require('use-double-tap'),J=require('next/legacy/image'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var J__default=/*#__PURE__*/_interopDefault(J);chunkS7SXQ5YW_js.e();var w=1e3,x=10,v=chunkQSFAQGRX_js.t("isTouchScreen")?x:0,R=({type:e,isRightForward:g,isLeftBackward:P,setIsRightForward:c,setIsLeftBackward:i})=>{let[m,u]=react.useState(v),[A,n]=react.useState(false),a=react.useRef(m),o=react.useRef(null),f=chunkS7SXQ5YW_js.z();chunkS7SXQ5YW_js.A(({controller:{currentTime:r,duration:t}})=>({currentTime:r,duration:t}),reactRedux.shallowEqual);let {videoElementSizeInfo:N}=chunkS7SXQ5YW_js.A(({videoData:{videoElementSizeInfo:r,params:t}})=>({videoElementSizeInfo:r,params:t}),reactRedux.shallowEqual),h=["touchBackward","backward"];react.useEffect(()=>{a.current=m;},[m]);let C;C=useDoubleTap.useDoubleTap(r=>{["touchBackward","touchForward"].includes(e)&&(r.stopPropagation(),e==="touchBackward"&&i?(i(true),f(chunkS7SXQ5YW_js.k(false))):e==="touchForward"&&c&&(c(true),f(chunkS7SXQ5YW_js.k(false))),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));},200),react.useEffect(()=>{A&&(n(false),g&&c?(c(false),chunkQSFAQGRX_js.u().duration-chunkQSFAQGRX_js.u().currentTime<=a.current?chunkQSFAQGRX_js._(e,chunkQSFAQGRX_js.u().duration):chunkQSFAQGRX_js._(e,a.current),u(v)):P&&i&&(i(false),chunkQSFAQGRX_js.u().currentTime<=a.current?chunkQSFAQGRX_js._(e,0):chunkQSFAQGRX_js._(e,a.current),u(v)));},[A,e]);let G=r=>{u(t=>t+x),chunkQSFAQGRX_js.t("isTouchScreenLandscape")&&chunkQSFAQGRX_js.na(r,e),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w);};if(chunkVLK44HNO_js.a("ArrowRight",r=>{chunkQSFAQGRX_js.t("isPressKeyArrowRight")&&e==="forward"&&(r.stopPropagation(),u(t=>t+x),f(chunkS7SXQ5YW_js.k(true)),c&&c(true),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));}),chunkVLK44HNO_js.a("ArrowLeft",r=>{chunkQSFAQGRX_js.t("isPressKeyArrowLeft")&&e==="backward"&&(r.stopPropagation(),u(t=>t+x),f(chunkS7SXQ5YW_js.k(true)),i&&i(true),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));}),e)return jsxRuntime.jsx("div",{id:e,className:`pl-relative pl-flex pl-flex-col pl-justify-center ${chunkQSFAQGRX_js.t("isTouchScreen")?"pl-px-[24px]":"pl-px-[48px]"} ${h.includes(e)?"pl-items-end":"pl-items-start"} pl-gap-2 pl-overflow-hidden`,style:{width:N.width,height:N.width},...C,children:(g||P)&&jsxRuntime.jsxs("div",{className:chunkQSFAQGRX_js.fa(`pl-rounded-full pl-flex pl-justify-center pl-items-center ${h.includes(e)?"":"pl-flex-row-reverse"}`,{desktop:"pl-gap-2",desktopFullScreen:"pl-gap-1",touch:"pl-gap-1",touchFullScreen:"pl-gap-1.5"}),onTouchStart:chunkQSFAQGRX_js.t("isTouchScreen")?G:void 0,children:[jsxRuntime.jsxs("p",{className:chunkQSFAQGRX_js.fa("pl-text-center pl-text-white ",{desktop:"pl-text-[16px] pl-font-extrabold pl-mt-0.5",desktopFullScreen:"pl-text-[32px] pl-font-bold",touch:"pl-text-base pl-font-extrabold pl-mt-0.5",touchFullScreen:"pl-text-[20px] pl-font-bold"}),children:[m,h.includes(e)?" - ":" + "]}),jsxRuntime.jsx("div",{className:"pl-flex pl-justify-center pl-items-center",children:jsxRuntime.jsx(J__default.default,{src:chunkD54C47WZ_js.a.chevronLeft,width:chunkQSFAQGRX_js.ga({desktop:20,desktopFullScreen:40,touch:16,touchFullScreen:20}),height:chunkQSFAQGRX_js.ga({desktop:20,desktopFullScreen:40,touch:16,touchFullScreen:20}),alt:"",className:` pl-object-cover ${h.includes(e)?"":"pl-rotate-180"}`})})]})})},le=R;module.exports=le;//# sourceMappingURL=backwardForward-W3FUQG26.js.map
|
|
2
|
+
//# sourceMappingURL=backwardForward-W3FUQG26.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/backwardForward/backwardForward.tsx"],"names":["init_cjs_shims","hideTime","jump","initialJump","conditions","BackwardForward","type","isRightForward","isLeftBackward","setIsRightForward","setIsLeftBackward","backwardForwardCount","setBackwardForwardCount","useState","hide","setHide","backwardForwardCountRef","useRef","timeoutRef","dispatch","useAppDispatch","useAppSelector","currentTime","duration","shallowEqual","videoElementSizeInfo","params","isLeft","useEffect","doubleTouch","useDoubleTap","event","setActiveElements","mainPlayerVideoTag","handleBackwardForward","handleTouchStart","prev","handleRippleCircle","useKeyPress_default","jsx","jsxs","tw","Image","importImages_default","styleMerge","backwardForward_default"],"mappings":"weAAAA,kBAAAA,EAAAA,CAeA,IAAMC,CAAAA,CAAW,GAAA,CACXC,CAAAA,CAAO,EAAA,CACPC,CAAAA,CAAcC,kBAAAA,CAAAA,eAAsC,CAAA,CAAIF,CAAAA,CAAO,CAAA,CAE/DG,CAAAA,CAAkB,CAAC,CAAE,IAAA,CAAAC,CAAAA,CAAM,cAAA,CAAAC,CAAAA,CAAgB,cAAA,CAAAC,CAAAA,CAAgB,iBAAA,CAAAC,CAAAA,CAAmB,iBAAA,CAAAC,CAAkB,CAAA,GAA6B,CACjI,GAAM,CAACC,CAAAA,CAAsBC,CAAuB,CAAA,CAAIC,cAAAA,CAAiBV,CAAW,CAAA,CAC9E,CAACW,CAAAA,CAAMC,CAAO,CAAA,CAAIF,cAAAA,CAAkB,KAAK,CAAA,CAEzCG,CAAAA,CAA0BC,YAAAA,CAAeN,CAAoB,CAAA,CAC7DO,CAAAA,CAAaD,YAAAA,CAAY,IAAI,CAAA,CAE7BE,CAAAA,CAAWC,kBAAAA,EAAe,CAEhCC,kBAAAA,CAAe,CAAC,CAAE,UAAA,CAAY,CAAE,WAAA,CAAAC,CAAAA,CAAa,QAAA,CAAAC,CAAS,CAAE,CAAA,IAAO,CAAE,WAAA,CAAAD,CAAAA,CAAa,QAAA,CAAAC,CAAS,CAAA,CAAA,CAAIC,uBAAY,CAAA,CAEvG,IAAM,CAAE,oBAAA,CAAAC,CAAqB,CAAA,CAAIJ,kBAAAA,CAC/B,CAAC,CAAE,SAAA,CAAW,CAAE,oBAAA,CAAAI,CAAAA,CA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O,UAAA,CACP,eAAA,CAAiB,YACnB,CAAC,CAAA,CACD,YAAA,CAAcF,kBAAAA,CAAAA,eAAsC,CAAA,CAAI+B,CAAAA,CAAmB,MAAA,CAE3E,QAAA,CAAA,CAAAK,eAAAA,CAAC,GAAA,CAAA,CACC,SAAA,CAAWC,mBAAAA,CAAG,gCAAA,CAAkC,CAC9C,OAAA,CAAS,4CAAA,CACT,iBAAA,CAAmB,6BAAA,CACnB,KAAA,CAAO,0CAAA,CACP,eAAA,CAAiB,6BACnB,CAAC,CAAA,CAEA,QAAA,CAAA,CAAA9B,CAAAA,CACAgB,CAAAA,CAAO,QAAA,CAASrB,CAAI,CAAA,CAAI,KAAA,CAAQ,KAAA,CAAA,CACnC,CAAA,CACAiC,cAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAW,2CAAA,CACd,QAAA,CAAAA,cAAAA,CAACG,kBAAAA,CAAA,CACC,GAAA,CAAKC,kBAAAA,CAAO,WAAA,CACZ,KAAA,CAAOC,mBAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACxF,MAAA,CAAQA,mBAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACzF,GAAA,CAAI,EAAA,CACJ,SAAA,CAAW,CAAA,iBAAA,EAAoBjB,CAAAA,CAAO,QAAA,CAASrB,CAAI,CAAA,CAAI,EAAA,CAAK,eAAe,CAAA,CAAA,CAC7E,CAAA,CAuBF,CAAA,CAAA,CACF,CAAA,CAEJ,CAEN,CAAA,CAEOuC,EAAAA,CAAQxC","file":"backwardForward-V5X7EEQT.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, styleMerge, tw } from \"../../../helpers/helpers\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\nimport useKeyPress from \"../../../helpers/hooks/useKeyPress\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/legacy/image\";\r\n\r\nconst hideTime = 1000;\r\nconst jump = 10;\r\nconst initialJump = conditions(ConditionName.isTouchScreen) ? jump : 0;\r\n\r\nconst BackwardForward = ({ type, isRightForward, isLeftBackward, setIsRightForward, setIsLeftBackward }: IBackwardForwardProps) => {\r\n const [backwardForwardCount, setBackwardForwardCount] = useState<number>(initialJump);\r\n const [hide, setHide] = useState<boolean>(false);\r\n\r\n const backwardForwardCountRef = useRef<number>(backwardForwardCount);\r\n const timeoutRef = useRef<any>(null);\r\n\r\n const dispatch = useAppDispatch();\r\n\r\n useAppSelector(({ controller: { currentTime, duration } }) => ({ currentTime, duration }), shallowEqual);\r\n\r\n const { videoElementSizeInfo } = useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n const isRight = [\"touchForward\", \"forward\"];\r\n const isLeft = [\"touchBackward\", \"backward\"];\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\" && setIsLeftBackward) {\r\n setIsLeftBackward(true);\r\n dispatch(setActiveElements(false));\r\n } else if (type === \"touchForward\" && setIsRightForward) {\r\n setIsRightForward(true);\r\n dispatch(setActiveElements(false));\r\n }\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 if (isRightForward && setIsRightForward) {\r\n setIsRightForward(false);\r\n if (mainPlayerVideoTag().duration - mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current)\r\n handleBackwardForward(type, mainPlayerVideoTag().duration);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n } else if (isLeftBackward && setIsLeftBackward) {\r\n setIsLeftBackward(false);\r\n if (mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, 0);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n }\r\n }\r\n }, [hide, type]);\r\n\r\n const handleTouchStart = (event: any) => {\r\n setBackwardForwardCount((prev) => prev + jump);\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 useKeyPress(\"ArrowRight\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowRight) && type === \"forward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsRightForward) setIsRightForward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n useKeyPress(\"ArrowLeft\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowLeft) && type === \"backward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsLeftBackward) setIsLeftBackward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n if (type)\r\n return (\r\n <div\r\n id={type}\r\n className={`pl-relative pl-flex pl-flex-col pl-justify-center ${conditions(ConditionName.isTouchScreen) ? \"pl-px-[24px]\" : \"pl-px-[48px]\"} ${\r\n isLeft.includes(type) ? \"pl-items-end\" : \"pl-items-start\"\r\n } pl-gap-2 pl-overflow-hidden`}\r\n style={{ width: videoElementSizeInfo.width, height: videoElementSizeInfo.width }}\r\n {...doubleTouch}\r\n >\r\n {(isRightForward || isLeftBackward) && (\r\n <div\r\n className={tw(`pl-rounded-full pl-flex pl-justify-center pl-items-center ${isLeft.includes(type) ? \"\" : \"pl-flex-row-reverse\"}`, {\r\n desktop: \"pl-gap-2\",\r\n desktopFullScreen: \"pl-gap-1\",\r\n touch: \"pl-gap-1\",\r\n touchFullScreen: \"pl-gap-1.5\",\r\n })}\r\n onTouchStart={conditions(ConditionName.isTouchScreen) ? handleTouchStart : undefined}\r\n >\r\n <p\r\n className={tw(`pl-text-center pl-text-white `, {\r\n desktop: \"pl-text-[16px] pl-font-extrabold pl-mt-0.5\",\r\n desktopFullScreen: \"pl-text-[32px] pl-font-bold\",\r\n touch: \"pl-text-base pl-font-extrabold pl-mt-0.5\",\r\n touchFullScreen: \"pl-text-[20px] pl-font-bold\",\r\n })}\r\n >\r\n {backwardForwardCount}\r\n {isLeft.includes(type) ? \" - \" : \" + \"}\r\n </p>\r\n <div className={`pl-flex pl-justify-center pl-items-center`}>\r\n <Image\r\n src={IMAGES.chevronLeft}\r\n width={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n height={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n alt=\"\"\r\n className={` pl-object-cover ${isLeft.includes(type) ? \"\" : \"pl-rotate-180\"}`}\r\n />\r\n\r\n {/* <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n /> */}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\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","jump","initialJump","conditions","BackwardForward","type","isRightForward","isLeftBackward","setIsRightForward","setIsLeftBackward","backwardForwardCount","setBackwardForwardCount","useState","hide","setHide","backwardForwardCountRef","useRef","timeoutRef","dispatch","useAppDispatch","useAppSelector","currentTime","duration","shallowEqual","videoElementSizeInfo","params","isLeft","useEffect","doubleTouch","useDoubleTap","event","setActiveElements","mainPlayerVideoTag","handleBackwardForward","handleTouchStart","prev","handleRippleCircle","useKeyPress_default","jsx","jsxs","tw","Image","importImages_default","styleMerge","backwardForward_default"],"mappings":"weAAAA,kBAAAA,EAAAA,CAeA,IAAMC,CAAAA,CAAW,GAAA,CACXC,CAAAA,CAAO,EAAA,CACPC,CAAAA,CAAcC,kBAAAA,CAAAA,eAAsC,CAAA,CAAIF,CAAAA,CAAO,C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AQ,KAAA,CAAA,CACnC,CAAA,CACAiC,cAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAW,2CAAA,CACd,QAAA,CAAAA,cAAAA,CAACG,kBAAAA,CAAA,CACC,GAAA,CAAKC,kBAAAA,CAAO,WAAA,CACZ,KAAA,CAAOC,mBAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACxF,MAAA,CAAQA,mBAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACzF,GAAA,CAAI,EAAA,CACJ,SAAA,CAAW,CAAA,iBAAA,EAAoBjB,CAAAA,CAAO,QAAA,CAASrB,CAAI,CAAA,CAAI,EAAA,CAAK,eAAe,CAAA,CAAA,CAC7E,CAAA,CAuBF,CAAA,CAAA,CACF,CAAA,CAEJ,CAEN,CAAA,CAEOuC,EAAAA,CAAQxC","file":"backwardForward-W3FUQG26.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, styleMerge, tw } from \"../../../helpers/helpers\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\nimport useKeyPress from \"../../../helpers/hooks/useKeyPress\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/legacy/image\";\r\n\r\nconst hideTime = 1000;\r\nconst jump = 10;\r\nconst initialJump = conditions(ConditionName.isTouchScreen) ? jump : 0;\r\n\r\nconst BackwardForward = ({ type, isRightForward, isLeftBackward, setIsRightForward, setIsLeftBackward }: IBackwardForwardProps) => {\r\n const [backwardForwardCount, setBackwardForwardCount] = useState<number>(initialJump);\r\n const [hide, setHide] = useState<boolean>(false);\r\n\r\n const backwardForwardCountRef = useRef<number>(backwardForwardCount);\r\n const timeoutRef = useRef<any>(null);\r\n\r\n const dispatch = useAppDispatch();\r\n\r\n useAppSelector(({ controller: { currentTime, duration } }) => ({ currentTime, duration }), shallowEqual);\r\n\r\n const { videoElementSizeInfo } = useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n const isRight = [\"touchForward\", \"forward\"];\r\n const isLeft = [\"touchBackward\", \"backward\"];\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\" && setIsLeftBackward) {\r\n setIsLeftBackward(true);\r\n dispatch(setActiveElements(false));\r\n } else if (type === \"touchForward\" && setIsRightForward) {\r\n setIsRightForward(true);\r\n dispatch(setActiveElements(false));\r\n }\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 if (isRightForward && setIsRightForward) {\r\n setIsRightForward(false);\r\n if (mainPlayerVideoTag().duration - mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current)\r\n handleBackwardForward(type, mainPlayerVideoTag().duration);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n } else if (isLeftBackward && setIsLeftBackward) {\r\n setIsLeftBackward(false);\r\n if (mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, 0);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n }\r\n }\r\n }, [hide, type]);\r\n\r\n const handleTouchStart = (event: any) => {\r\n setBackwardForwardCount((prev) => prev + jump);\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 useKeyPress(\"ArrowRight\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowRight) && type === \"forward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsRightForward) setIsRightForward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n useKeyPress(\"ArrowLeft\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowLeft) && type === \"backward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsLeftBackward) setIsLeftBackward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n if (type)\r\n return (\r\n <div\r\n id={type}\r\n className={`pl-relative pl-flex pl-flex-col pl-justify-center ${conditions(ConditionName.isTouchScreen) ? \"pl-px-[24px]\" : \"pl-px-[48px]\"} ${\r\n isLeft.includes(type) ? \"pl-items-end\" : \"pl-items-start\"\r\n } pl-gap-2 pl-overflow-hidden`}\r\n style={{ width: videoElementSizeInfo.width, height: videoElementSizeInfo.width }}\r\n {...doubleTouch}\r\n >\r\n {(isRightForward || isLeftBackward) && (\r\n <div\r\n className={tw(`pl-rounded-full pl-flex pl-justify-center pl-items-center ${isLeft.includes(type) ? \"\" : \"pl-flex-row-reverse\"}`, {\r\n desktop: \"pl-gap-2\",\r\n desktopFullScreen: \"pl-gap-1\",\r\n touch: \"pl-gap-1\",\r\n touchFullScreen: \"pl-gap-1.5\",\r\n })}\r\n onTouchStart={conditions(ConditionName.isTouchScreen) ? handleTouchStart : undefined}\r\n >\r\n <p\r\n className={tw(`pl-text-center pl-text-white `, {\r\n desktop: \"pl-text-[16px] pl-font-extrabold pl-mt-0.5\",\r\n desktopFullScreen: \"pl-text-[32px] pl-font-bold\",\r\n touch: \"pl-text-base pl-font-extrabold pl-mt-0.5\",\r\n touchFullScreen: \"pl-text-[20px] pl-font-bold\",\r\n })}\r\n >\r\n {backwardForwardCount}\r\n {isLeft.includes(type) ? \" - \" : \" + \"}\r\n </p>\r\n <div className={`pl-flex pl-justify-center pl-items-center`}>\r\n <Image\r\n src={IMAGES.chevronLeft}\r\n width={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n height={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n alt=\"\"\r\n className={` pl-object-cover ${isLeft.includes(type) ? \"\" : \"pl-rotate-180\"}`}\r\n />\r\n\r\n {/* <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n /> */}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default BackwardForward;\r\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
'use strict';var chunkPJ5S2UP3_js=require('./chunk-PJ5S2UP3.js'),chunkQSFAQGRX_js=require('./chunk-QSFAQGRX.js'),chunkS7SXQ5YW_js=require('./chunk-S7SXQ5YW.js'),react=require('react'),reactRedux=require('react-redux');chunkS7SXQ5YW_js.e();var x=()=>{let a=chunkS7SXQ5YW_js.z(),{params:r}=chunkS7SXQ5YW_js.A(({videoData:{params:o}})=>({params:o}),reactRedux.shallowEqual);react.useEffect(()=>{chunkQSFAQGRX_js.t("hasCurrentTimeParams")&&(chunkQSFAQGRX_js.u().currentTime=r.currentTime,a(chunkS7SXQ5YW_js.h(r.currentTime)));},[r.currentTime]);},j=x;chunkS7SXQ5YW_js.e();var w=()=>{let{rawSubtitles:a}=chunkS7SXQ5YW_js.A(({videoData:{rawSubtitles:r}})=>({rawSubtitles:r}),reactRedux.shallowEqual);react.useEffect(()=>{let r=chunkQSFAQGRX_js.u().getElementsByTagName("track");for(let o=0;o<r.length;o++)r[o].addEventListener("cuechange",u=>{let c=u.target.track,l;c.activeCues&&(l=c.activeCues[0]),l&&(setTimeout(()=>{let n=document.getElementById("subtitle-id");n&&(n.style.display="block");},300),l.onexit=()=>{let n=document.getElementById("subtitle-id");n&&(n.style.display="none");});});},[a]);},R=w;chunkS7SXQ5YW_js.e();var P=()=>{let a=chunkS7SXQ5YW_js.z(),{rawSubtitles:r}=chunkS7SXQ5YW_js.A(({videoData:{rawSubtitles:o}})=>({rawSubtitles:o}),reactRedux.shallowEqual);react.useEffect(()=>{let o=chunkQSFAQGRX_js.u();if(!o)return;let u=chunkQSFAQGRX_js.ta(r||[]),c=Array.from(o.querySelectorAll("track")),l=new Map(c.map(t=>[t.srclang,t]));c.forEach(t=>{!u.some(e=>e.lang===t.srclang)&&t.isConnected&&t.remove();}),u.forEach(t=>{let p=l.get(t.lang);if(!p){let e=document.createElement("track");e.kind="subtitles",e.src=t.url,e.srclang=t.lang,e.label=t.title||chunkQSFAQGRX_js.ua(t.lang),e.default=!!t.is_default,o.appendChild(e);return}if(p.src!==t.url){let e=document.createElement("track");e.kind="subtitles",e.src=t.url,e.srclang=t.lang,e.label=t.title||chunkQSFAQGRX_js.ua(t.lang),e.default=!!t.is_default,p.replaceWith(e);}});let n=setTimeout(()=>{let t=Array.from(o.textTracks);a(chunkQSFAQGRX_js.i(t));},200);return ()=>clearTimeout(n)},[r,a]);},ot=P;chunkS7SXQ5YW_js.e();var L=()=>{let{activeSubtitle:a}=chunkS7SXQ5YW_js.A(({videoData:r})=>({activeSubtitle:r.params?.activeSubtitle}),reactRedux.shallowEqual);react.useEffect(()=>{chunkQSFAQGRX_js.t("hasActiveSubtitleInParams")&&setTimeout(()=>chunkPJ5S2UP3_js.b(a),500);},[a]);},pt=L;exports.a=j;exports.b=R;exports.c=ot;exports.d=pt;//# sourceMappingURL=chunk-45E54NWZ.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-45E54NWZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/hooks/useJumpToCurrentTime.tsx","../src/videoPlayerLibrary/helpers/hooks/useHideSubtitle.tsx","../src/videoPlayerLibrary/helpers/hooks/useAppendSubtitle.tsx","../src/videoPlayerLibrary/helpers/hooks/useActiveSubtitleAutomatic.tsx"],"names":["init_cjs_shims","useJumpToCurrentTime","dispatch","useAppDispatch","params","useAppSelector","shallowEqual","useEffect","conditions","mainPlayerVideoTag","setCurrentTime","useJumpToCurrentTime_default","useHideSubtitle","rawSubtitles","tracks","i","event","track","activeCue","el","useHideSubtitle_default","useAppendSubtitle","videoEl","newSubtitles","sortLanguages","existingTracks","existingMap","s","subtitle","existing","trackEl","getSubtitleLabel","newTrack","timeoutId","setSubtitles","useAppendSubtitle_default","useActiveSubtitleAutomatic","activeSubtitle","videoData","handleSubtitle","useActiveSubtitleAutomatic_default"],"mappings":"0NAAAA,kBAAAA,EAAAA,CAQA,IAAMC,CAAAA,CAAuB,IAAM,CAC/B,IAAMC,CAAAA,CAAWC,kBAAAA,EAAe,CAC1B,CAAE,MAAA,CAAAC,CAAO,EAAIC,kBAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,MAAA,CAAAD,CAAO,CAAE,CAAA,IAAO,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAA,CAAIE,uBAAY,CAAA,CAE3FC,eAAAA,CAAU,IAAM,CACRC,kBAAAA,CAAAA,sBAA6C,CAAA,GAC/CC,oBAAmB,CAAE,WAAA,CAAcL,CAAAA,CAAO,WAAA,CAC1CF,CAAAA,CAASQ,kBAAAA,CAAeN,EAAO,WAAY,CAAC,CAAA,EAElD,CAAA,CAAG,CAACA,CAAAA,CAAO,WAAW,CAAC,EAC3B,CAAA,CAEOO,CAAAA,CAAQV,ECpBfD,kBAAAA,EAAAA,CAKA,IAAMY,CAAAA,CAAkB,IAAM,CAC5B,GAAM,CAAE,aAAAC,CAAa,CAAA,CAAIR,kBAAAA,CACvB,CAAC,CAAE,SAAA,CAAW,CAAE,YAAA,CAAAQ,CAAa,CAAE,CAAA,IAAO,CAAE,YAAA,CAAAA,CAAa,CAAA,CAAA,CACrDP,uBACF,CAAA,CAEAC,eAAAA,CAAU,IAAM,CACd,IAAMO,CAAAA,CAASL,kBAAAA,EAAmB,CAAE,oBAAA,CAAqB,OAAO,CAAA,CAChE,IAAA,IAASM,CAAAA,CAAI,CAAA,CAAGA,CAAAA,CAAID,CAAAA,CAAO,MAAA,CAAQC,CAAAA,EAAAA,CACjCD,CAAAA,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J,CAAAA,CAAS,UAAA,CAE9BC,EAAS,WAAA,CAAYG,CAAQ,EAC/B,CACF,CAAC,CAAA,CAED,IAAMC,CAAAA,CAAY,UAAA,CAAW,IAAM,CACjC,IAAMnB,CAAAA,CAAS,MAAM,IAAA,CAAKQ,CAAAA,CAAQ,UAAU,CAAA,CAC5CpB,CAAAA,CAASgC,kBAAAA,CAAapB,CAAM,CAAC,EAC/B,CAAA,CAAG,GAAG,CAAA,CAEN,OAAO,IAAM,YAAA,CAAamB,CAAS,CACrC,CAAA,CAAG,CAACpB,CAAAA,CAAcX,CAAQ,CAAC,EAC7B,CAAA,CAEOiC,EAAAA,CAAQd,EC3DfrB,kBAAAA,EAAAA,KAOMoC,CAAAA,CAA6B,IAAM,CACvC,GAAM,CAAE,cAAA,CAAAC,CAAe,CAAA,CAAIhC,kBAAAA,CACzB,CAAC,CAAE,SAAA,CAAAiC,CAAU,KAAO,CAClB,cAAA,CAAgBA,CAAAA,CAAU,MAAA,EAAQ,cACpC,CAAA,CAAA,CACAhC,uBACF,CAAA,CAEAC,eAAAA,CAAU,IAAM,CACVC,kBAAAA,CAAAA,2BAAkD,CAAA,EACpD,WAAW,IAAM+B,kBAAAA,CAAeF,CAAc,CAAA,CAAG,GAAG,EACxD,CAAA,CAAG,CAACA,CAAc,CAAC,EACrB,CAAA,CAEOG,EAAAA,CAAQJ","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/hooks/useJumpToCurrentTime.tsx","../src/videoPlayerLibrary/helpers/hooks/useHideSubtitle.tsx","../src/videoPlayerLibrary/helpers/hooks/useAppendSubtitle.tsx","../src/videoPlayerLibrary/helpers/hooks/useActiveSubtitleAutomatic.tsx"],"names":["init_cjs_shims","useJumpToCurrentTime","dispatch","useAppDispatch","params","useAppSelector","shallowEqual","useEffect","conditions","mainPlayerVideoTag","setCurrentTime","useJumpToCurrentTime_default","useHideSubtitle","rawSubtitles","tracks","i","event","track","activeCue","el","useHideSubtitle_default","useAppendSubtitle","videoEl","newSubtitles","sortLanguages","existingTracks","existingMap","s","subtitle","existing","trackEl","getSubtitleLabel","newTrack","timeoutId","setSubtitles","useAppendSubtitle_default","useActiveSubtitleAutomatic","activeSubtitle","videoData","handleSubtitle","useActiveSubtitleAutomatic_default"],"mappings":"0NAAAA,kBAAAA,EAAAA,CAQA,IAAMC,CAAAA,CAAuB,IAAM,CAC/B,IAAMC,CAAAA,CAAWC,kBAAAA,EAAe,CAC1B,CAAE,MAAA,CAAAC,CAAO,EAAIC,kBAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,MAAA,CAAAD,CAAO,CAAE,CAAA,IAAO,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAA,CAAIE,uBAAY,CAAA,CAE3FC,eAAAA,CAAU,IAAM,CACRC,kBAAAA,CAAAA,sBAA6C,CAAA,GAC/CC,oBAAmB,CAAE,WAAA,CAAcL,CAAAA,CAAO,WAAA,CAC1CF,CAAAA,CAASQ,kBAAAA,CAAeN,EAAO,WAAY,CAAC,CAAA,EAElD,CAAA,CAAG,CAACA,CAAAA,CAAO,WAAW,CAAC,EAC3B,CAAA,CAEOO,CAAAA,CAAQV,ECpBfD,kBAAAA,EAAAA,CAKA,IAAMY,CAAAA,CAAkB,IAAM,CAC5B,GAAM,CAAE,aAAAC,CAAa,CAAA,CAAIR,kBAAAA,CACvB,CAAC,CAAE,SAAA,CAAW,CAAE,YAAA,CAAAQ,CAAa,CAAE,CAAA,IAAO,CAAE,YAAA,CAAAA,CAAa,CAAA,CAAA,CACrDP,uBACF,CAAA,CAEAC,eAAAA,CAAU,IAAM,CACd,IAAMO,CAAAA,CAASL,kBAAAA,EAAmB,CAAE,oBAAA,CAAqB,OAAO,CAAA,CAChE,IAAA,IAASM,CAAAA,CAAI,CAAA,CAAGA,CAAAA,CAAID,CAAAA,CAAO,MAAA,CAAQC,CAAAA,EAAAA,CACjCD,CAAAA,CAAOC,CAAC,CAAA,CAAE,gBAAA,CAAiB,WAA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CAAYG,CAAQ,EAC/B,CACF,CAAC,CAAA,CAED,IAAMC,CAAAA,CAAY,UAAA,CAAW,IAAM,CACjC,IAAMnB,CAAAA,CAAS,MAAM,IAAA,CAAKQ,CAAAA,CAAQ,UAAU,CAAA,CAC5CpB,CAAAA,CAASgC,kBAAAA,CAAapB,CAAM,CAAC,EAC/B,CAAA,CAAG,GAAG,CAAA,CAEN,OAAO,IAAM,YAAA,CAAamB,CAAS,CACrC,CAAA,CAAG,CAACpB,CAAAA,CAAcX,CAAQ,CAAC,EAC7B,CAAA,CAEOiC,EAAAA,CAAQd,EC3DfrB,kBAAAA,EAAAA,KAOMoC,CAAAA,CAA6B,IAAM,CACvC,GAAM,CAAE,cAAA,CAAAC,CAAe,CAAA,CAAIhC,kBAAAA,CACzB,CAAC,CAAE,SAAA,CAAAiC,CAAU,KAAO,CAClB,cAAA,CAAgBA,CAAAA,CAAU,MAAA,EAAQ,cACpC,CAAA,CAAA,CACAhC,uBACF,CAAA,CAEAC,eAAAA,CAAU,IAAM,CACVC,kBAAAA,CAAAA,2BAAkD,CAAA,EACpD,WAAW,IAAM+B,kBAAAA,CAAeF,CAAc,CAAA,CAAG,GAAG,EACxD,CAAA,CAAG,CAACA,CAAc,CAAC,EACrB,CAAA,CAEOG,EAAAA,CAAQJ","file":"chunk-45E54NWZ.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 const { rawSubtitles } = useAppSelector(\r\n ({ videoData: { rawSubtitles } }) => ({ rawSubtitles }),\r\n shallowEqual\r\n );\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 }, [rawSubtitles]);\r\n};\r\n\r\nexport default useHideSubtitle;\r\n","import { useEffect } from \"react\";\r\nimport { mainPlayerVideoTag } from \"../constants\";\r\nimport { useAppDispatch, useAppSelector } from \"../redux/hooks\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { getSubtitleLabel, sortLanguages } from \"../helpers\";\r\nimport { setSubtitles } from \"../redux/slices/videoDataSlice\";\r\n\r\nconst useAppendSubtitle = () => {\r\n const dispatch = useAppDispatch();\r\n const { rawSubtitles } = useAppSelector(({ videoData: { rawSubtitles } }) => ({ rawSubtitles }), shallowEqual);\r\n\r\n useEffect(() => {\r\n const videoEl = mainPlayerVideoTag();\r\n if (!videoEl) return;\r\n\r\n const newSubtitles = sortLanguages(rawSubtitles || []);\r\n const existingTracks = Array.from(videoEl.querySelectorAll(\"track\"));\r\n const existingMap = new Map(existingTracks.map((t) => [t.srclang, t]));\r\n existingTracks.forEach((track) => {\r\n const stillExists = newSubtitles.some((s: any) => s.lang === track.srclang);\r\n if (!stillExists && track.isConnected) track.remove();\r\n });\r\n\r\n newSubtitles.forEach((subtitle: any) => {\r\n const existing = existingMap.get(subtitle.lang);\r\n\r\n if (!existing) {\r\n const trackEl = document.createElement(\"track\");\r\n trackEl.kind = \"subtitles\";\r\n trackEl.src = subtitle.url;\r\n trackEl.srclang = subtitle.lang;\r\n trackEl.label = subtitle.title || (getSubtitleLabel(subtitle.lang) as any);\r\n trackEl.default = !!subtitle.is_default;\r\n videoEl.appendChild(trackEl);\r\n return;\r\n }\r\n\r\n if (existing.src !== subtitle.url) {\r\n const newTrack = document.createElement(\"track\");\r\n newTrack.kind = \"subtitles\";\r\n newTrack.src = subtitle.url;\r\n newTrack.srclang = subtitle.lang;\r\n\r\n newTrack.label = subtitle.title || (getSubtitleLabel(subtitle.lang) as any);\r\n newTrack.default = !!subtitle.is_default;\r\n\r\n existing.replaceWith(newTrack);\r\n }\r\n });\r\n\r\n const timeoutId = setTimeout(() => {\r\n const tracks = Array.from(videoEl.textTracks);\r\n dispatch(setSubtitles(tracks));\r\n }, 200);\r\n\r\n return () => clearTimeout(timeoutId);\r\n }, [rawSubtitles, dispatch]);\r\n};\r\n\r\nexport default useAppendSubtitle;\r\n","import { useEffect } from \"react\";\r\nimport { useAppSelector } from \"../redux/hooks\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { handleSubtitle } from \"../redux/actions/videoData.actions\";\r\nimport { conditions } from \"../conditions/conditions\";\r\nimport { ConditionName } from \"../interfaces/enums\";\r\n\r\nconst useActiveSubtitleAutomatic = () => {\r\n const { activeSubtitle } = useAppSelector(\r\n ({ videoData }) => ({\r\n activeSubtitle: videoData.params?.activeSubtitle,\r\n }),\r\n shallowEqual\r\n );\r\n\r\n useEffect(() => {\r\n if (conditions(ConditionName.hasActiveSubtitleInParams))\r\n setTimeout(() => handleSubtitle(activeSubtitle), 500);\r\n }, [activeSubtitle]);\r\n};\r\n\r\nexport default useActiveSubtitleAutomatic;\r\n"]}
|