cafe-video-player 3.0.13 → 3.0.15
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-T2LVURER.mjs → VideoHighLighter-JYEEHSUY.mjs} +2 -2
- package/{VideoHighLighter-T2LVURER.mjs.map → VideoHighLighter-JYEEHSUY.mjs.map} +1 -1
- package/{VideoHighLighter-OBD2IGA6.js → VideoHighLighter-SIOPEIR2.js} +2 -2
- package/{VideoHighLighter-OBD2IGA6.js.map → VideoHighLighter-SIOPEIR2.js.map} +1 -1
- package/{backwardForward-ZUVULGGJ.mjs → backwardForward-3X63XNNJ.mjs} +2 -2
- package/{backwardForward-ZUVULGGJ.mjs.map → backwardForward-3X63XNNJ.mjs.map} +1 -1
- package/{backwardForward-S6ZHVC75.js → backwardForward-HTLSZBXC.js} +2 -2
- package/{backwardForward-S6ZHVC75.js.map → backwardForward-HTLSZBXC.js.map} +1 -1
- package/chunk-3TPEXSZV.js +2 -0
- package/{chunk-ZWGZGWEB.js.map → chunk-3TPEXSZV.js.map} +1 -1
- package/{chunk-SKRDEKL2.mjs → chunk-4NYDCAYH.mjs} +4 -4
- package/{chunk-SKRDEKL2.mjs.map → chunk-4NYDCAYH.mjs.map} +1 -1
- package/chunk-5UGSCO4K.js +3 -0
- package/{chunk-BFE2RKVK.js.map → chunk-5UGSCO4K.js.map} +1 -1
- package/{chunk-4XKL6TLO.mjs → chunk-6LGS5W4B.mjs} +2 -2
- package/{chunk-4XKL6TLO.mjs.map → chunk-6LGS5W4B.mjs.map} +1 -1
- package/chunk-7FHLAPSR.js +2 -0
- package/chunk-7FHLAPSR.js.map +1 -0
- package/{chunk-CCO6GDG2.mjs → chunk-HOAJ3EFI.mjs} +3 -3
- package/{chunk-CCO6GDG2.mjs.map → chunk-HOAJ3EFI.mjs.map} +1 -1
- package/chunk-HZASW2B2.js +2 -0
- package/{chunk-DJ6KVZRK.js.map → chunk-HZASW2B2.js.map} +1 -1
- package/{chunk-WFHA2FPC.js → chunk-IKMA6LUH.js} +5 -5
- package/{chunk-WFHA2FPC.js.map → chunk-IKMA6LUH.js.map} +1 -1
- package/chunk-JU5IQH3S.mjs +2 -0
- package/chunk-JU5IQH3S.mjs.map +1 -0
- package/{chunk-IBV5SFIT.js → chunk-K4YPVDEE.js} +2 -2
- package/{chunk-IBV5SFIT.js.map → chunk-K4YPVDEE.js.map} +1 -1
- package/{chunk-QM3W7EYS.js → chunk-KSZ35TPK.js} +2 -2
- package/{chunk-QM3W7EYS.js.map → chunk-KSZ35TPK.js.map} +1 -1
- package/{chunk-BC4366GN.mjs → chunk-NLCBOGTI.mjs} +2 -2
- package/{chunk-BC4366GN.mjs.map → chunk-NLCBOGTI.mjs.map} +1 -1
- package/{chunk-GYUGYOVP.mjs → chunk-P4O3IKAQ.mjs} +2 -2
- package/{chunk-GYUGYOVP.mjs.map → chunk-P4O3IKAQ.mjs.map} +1 -1
- package/{chunk-73KLK4QU.mjs → chunk-QFADUEGX.mjs} +2 -2
- package/{chunk-73KLK4QU.mjs.map → chunk-QFADUEGX.mjs.map} +1 -1
- package/{chunk-PKXJEXKI.mjs → chunk-UL5LQB3G.mjs} +2 -2
- package/{chunk-PKXJEXKI.mjs.map → chunk-UL5LQB3G.mjs.map} +1 -1
- package/{chunk-U3VFRU6R.js → chunk-VUHZVVMS.js} +2 -2
- package/{chunk-U3VFRU6R.js.map → chunk-VUHZVVMS.js.map} +1 -1
- package/chunk-XCFESDIY.js +2 -0
- package/chunk-XCFESDIY.js.map +1 -0
- package/chunk-ZI6O72OM.mjs +2 -0
- package/chunk-ZI6O72OM.mjs.map +1 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/{nonStaticVideoTag-6OHMSJEH.js → nonStaticVideoTag-5HEUBWAN.js} +2 -2
- package/{nonStaticVideoTag-6OHMSJEH.js.map → nonStaticVideoTag-5HEUBWAN.js.map} +1 -1
- package/{nonStaticVideoTag-J6JNATM6.mjs → nonStaticVideoTag-P47FI6UV.mjs} +2 -2
- package/{nonStaticVideoTag-J6JNATM6.mjs.map → nonStaticVideoTag-P47FI6UV.mjs.map} +1 -1
- package/package.json +1 -1
- package/staticPlayer-JLBPTEWE.js +2 -0
- package/{staticPlayer-TNS4JFRP.js.map → staticPlayer-JLBPTEWE.js.map} +1 -1
- package/{staticPlayer-2IO6XEKM.mjs → staticPlayer-W6TBVD5A.mjs} +2 -2
- package/{staticPlayer-2IO6XEKM.mjs.map → staticPlayer-W6TBVD5A.mjs.map} +1 -1
- package/{staticVideoTag-2YYZBRPY.mjs → staticVideoTag-JOPHGL3R.mjs} +2 -2
- package/{staticVideoTag-2YYZBRPY.mjs.map → staticVideoTag-JOPHGL3R.mjs.map} +1 -1
- package/{staticVideoTag-VLNCYNKV.js → staticVideoTag-OZZU5MWF.js} +2 -2
- package/{staticVideoTag-VLNCYNKV.js.map → staticVideoTag-OZZU5MWF.js.map} +1 -1
- package/videoArea-6UF3GOX7.mjs +2 -0
- package/{videoArea-2F2NDD76.mjs.map → videoArea-6UF3GOX7.mjs.map} +1 -1
- package/videoArea-J6ITRRDQ.js +2 -0
- package/{videoArea-35ABV3CM.js.map → videoArea-J6ITRRDQ.js.map} +1 -1
- package/videoPlayerStyles.css +0 -8
- package/{vodPlayer-JTS4WVOB.mjs → vodPlayer-BJ7FLFUB.mjs} +2 -2
- package/{vodPlayer-JTS4WVOB.mjs.map → vodPlayer-BJ7FLFUB.mjs.map} +1 -1
- package/{vodPlayer-337TYSU4.js → vodPlayer-PFFEBJFX.js} +2 -2
- package/{vodPlayer-337TYSU4.js.map → vodPlayer-PFFEBJFX.js.map} +1 -1
- package/chunk-BFE2RKVK.js +0 -3
- package/chunk-DJ6KVZRK.js +0 -2
- package/chunk-OGCKLRYP.js +0 -2
- package/chunk-OGCKLRYP.js.map +0 -1
- package/chunk-WU4GN63P.mjs +0 -2
- package/chunk-WU4GN63P.mjs.map +0 -1
- package/chunk-Y7BIYTQP.mjs +0 -2
- package/chunk-Y7BIYTQP.mjs.map +0 -1
- package/chunk-ZSSCZTW3.js +0 -2
- package/chunk-ZSSCZTW3.js.map +0 -1
- package/chunk-ZWGZGWEB.js +0 -2
- package/staticPlayer-TNS4JFRP.js +0 -2
- package/videoArea-2F2NDD76.mjs +0 -2
- package/videoArea-35ABV3CM.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=VideoHighLighter-
|
|
1
|
+
import {a}from'./chunk-P4O3IKAQ.mjs';import {c,b}from'./chunk-JU5IQH3S.mjs';import {a as a$1}from'./chunk-XKRBXZUB.mjs';import {ia,t}from'./chunk-NLCBOGTI.mjs';import {e,A}from'./chunk-4QMWBTB5.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/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..."})}),f=g;var N=()=>{let{params:e}=A(({videoData:{params:u}})=>({params:u}),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",fill:true,style:{objectFit:"cover"},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:ia(0)}),jsx("span",{children:"/"}),jsx("span",{children:ia(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(f,{})]})},R=N;export{R as default};//# sourceMappingURL=VideoHighLighter-JYEEHSUY.mjs.map
|
|
2
|
+
//# sourceMappingURL=VideoHighLighter-JYEEHSUY.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":"+YAAAA,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,CAAAA,C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ux\";\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/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\" fill style={{ objectFit: \"cover\" }} 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\";\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\n\nconst Skeleton = () => {\n return (\n <div\n role=\"status\"\n className={`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${\n !conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"\n } pl-animate-pulse dark:pl-bg-gray-700`}\n >\n <span className=\"pl-sr-only\">Loading...</span>\n </div>\n );\n};\n\nexport default Skeleton;\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":"+YAAAA,CAAAA,EAAAA,CCAAA,CAAAA,EAAAA,CAGA,IAAMC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A,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-JYEEHSUY.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/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\" fill style={{ objectFit: \"cover\" }} 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\";\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\n\nconst Skeleton = () => {\n return (\n <div\n role=\"status\"\n className={`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${\n !conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"\n } pl-animate-pulse dark:pl-bg-gray-700`}\n >\n <span className=\"pl-sr-only\">Loading...</span>\n </div>\n );\n};\n\nexport default Skeleton;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
//# sourceMappingURL=VideoHighLighter-
|
|
1
|
+
'use strict';var chunkK4YPVDEE_js=require('./chunk-K4YPVDEE.js'),chunk7FHLAPSR_js=require('./chunk-7FHLAPSR.js'),chunkCOYFW7R4_js=require('./chunk-COYFW7R4.js'),chunkVUHZVVMS_js=require('./chunk-VUHZVVMS.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),reactRedux=require('react-redux'),jsxRuntime=require('react/jsx-runtime'),reactCircularProgressbar=require('react-circular-progressbar'),r=require('next/image');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var r__default=/*#__PURE__*/_interopDefault(r);chunkAN6JAJSI_js.e();chunkAN6JAJSI_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 ${!chunkVUHZVVMS_js.t("isTouchScreen")&&"pl-rounded-lg"} pl-animate-pulse dark:pl-bg-gray-700`,children:jsxRuntime.jsx("span",{className:"pl-sr-only",children:"Loading..."})}),f=h;var y=()=>{let{params:e}=chunkAN6JAJSI_js.A(({videoData:{params:u}})=>({params:u}),reactRedux.shallowEqual);return chunkK4YPVDEE_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 ${chunkVUHZVVMS_js.t("isTouchScreen")&&"!pl-rounded-none"} ${chunkVUHZVVMS_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",fill:true,style:{objectFit:"cover"},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:chunkCOYFW7R4_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:chunkCOYFW7R4_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 ${chunkVUHZVVMS_js.t("isTouchScreenPortrait")?"pl-flex-col":`pl-flex-col-reverse pl-mb-3 ${chunkVUHZVVMS_js.t("isFullScreen")&&"pl-mb-8"}`} pl-gap-[14.58px]`,children:[jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center pl-justify-between ${chunkVUHZVVMS_js.t("isFullScreen")?"pl-mx-8":"pl-mx-[14.58px]"}`,children:[jsxRuntime.jsx(chunk7FHLAPSR_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:chunkVUHZVVMS_js.ia(0)}),jsxRuntime.jsx("span",{children:"/"}),jsxRuntime.jsx("span",{children:chunkVUHZVVMS_js.ia(e.vhl_duration)})]}),jsxRuntime.jsx(chunk7FHLAPSR_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(f,{})]})},M=y;module.exports=M;//# sourceMappingURL=VideoHighLighter-SIOPEIR2.js.map
|
|
2
|
+
//# sourceMappingURL=VideoHighLighter-SIOPEIR2.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":"khBAAAA,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,CAAAA,CAAmB,IAAM,CAC7B,GAAM,CAAE,MAAA,CAAAC,CAAO,EAAIC,kBAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,OAAAD,CAAO,CAAE,KAAO,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAA,CAAIE,uBAAY,EAC3F,OAAAC,kBAAAA,GAGEC,eAAAA,CAAC,KAAA,CAAA,CACC,GAAG,YAAA,CACH,SAAA,CAAW,yFACTP,kBAAAA,CAAAA,eAAsC,CAAA,EAAK,kBAC7C,CAAA,CAAA,EAAIA,kBAAAA,CAAAA,cAAqC,GAAK,6FAA6F,CAAA,CAAA,CAE1I,UAAAG,CAAAA,CAAO,UAAA,EAAcA,CAAAA,CAAO,UAAA,GAAe,YAC1CI,eAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,8DAAA,CACZ,QAAA,CAAA,CAAAJ,EAAO,MAAA,EACNI,eAAAA,CAAC,OAAI,SAAA,CAAU,uCAAA,CACb,UAAAR,cAAAA,CAACS,kBAAAA,CAAA,CAAM,GAAA,CAAKL,CAAAA,CAAO,OAAQ,GAAA,CAAI,QAAA,CAAS,KAAI,IAAA,CAAC,KAAA,CAAO,CAAE,SAAA,CAAW,OAAQ,EAAG,SAAA,CAAU,2BAAA,CAA4B,EAClHJ,cAAAA,CA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PA,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-OBD2IGA6.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/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\" fill style={{ objectFit: \"cover\" }} 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\";\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\n\nconst Skeleton = () => {\n return (\n <div\n role=\"status\"\n className={`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${\n !conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"\n } pl-animate-pulse dark:pl-bg-gray-700`}\n >\n <span className=\"pl-sr-only\">Loading...</span>\n </div>\n );\n};\n\nexport default Skeleton;\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":"khBAAAA,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,CAAAA,CAAmB,IAAM,CAC7B,GAAM,CAAE,MAAA,CAAAC,CAAO,EAAIC,kBAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,OAAAD,CAAO,CAAE,KAAO,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAA,CAAIE,uBAAY,EAC3F,OAAAC,kBAAAA,GAGEC,eAAAA,CAAC,KAAA,CAAA,CACC,GAAG,YAAA,CACH,SAAA,CAAW,yFACTP,kBAAAA,CAAAA,eAAsC,CAAA,EAAK,kBAC7C,CAAA,CAAA,EAAIA,kBAAAA,CAAAA,cAAqC,GAAK,6FAA6F,CAAA,CAAA,CAE1I,UAAAG,CAAAA,CAAO,UAAA,EAAcA,CAAAA,CAAO,UAAA,GAAe,YAC1CI,eAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,8DAAA,CACZ,QAAA,CAAA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,CACnCN,gBAAC,KAAA,CAAA,CAAI,SAAA,CAAW,2CACb,QAAA,CAAA,CAAAJ,CAAAA,CAAO,cACNI,eAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,mEAAA,CACb,QAAA,CAAA,CAAAR,eAAC,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-SIOPEIR2.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/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\" fill style={{ objectFit: \"cover\" }} 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\";\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\n\nconst Skeleton = () => {\n return (\n <div\n role=\"status\"\n className={`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${\n !conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"\n } pl-animate-pulse dark:pl-bg-gray-700`}\n >\n <span className=\"pl-sr-only\">Loading...</span>\n </div>\n );\n};\n\nexport default Skeleton;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a}from'./chunk-FXAWDALE.mjs';import {a as a$1}from'./chunk-XKRBXZUB.mjs';import {t,x as x$1,Z,ea,fa,ma}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=backwardForward-
|
|
1
|
+
import {a}from'./chunk-FXAWDALE.mjs';import {a as a$1}from'./chunk-XKRBXZUB.mjs';import {t,x as x$1,Z,ea,fa,ma}from'./chunk-NLCBOGTI.mjs';import {e,z,A,k}from'./chunk-4QMWBTB5.mjs';import {useState,useRef,useEffect}from'react';import {shallowEqual}from'react-redux';import {useDoubleTap}from'use-double-tap';import J from'next/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]=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),x$1().duration-x$1().currentTime<=a$2.current?Z(e,x$1().duration):Z(e,a$2.current),u(v)):P&&i&&(i(false),x$1().currentTime<=a$2.current?Z(e,0):Z(e,a$2.current),u(v)));},[A$1,e]);let G=r=>{u(t=>t+x),t("isTouchScreenLandscape")&&ma(r,e),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w);};if(a("ArrowRight",r=>{t("isPressKeyArrowRight")&&e==="forward"&&(r.stopPropagation(),u(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(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:ea(`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:ea("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:fa({desktop:20,desktopFullScreen:40,touch:16,touchFullScreen:20}),height:fa({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-3X63XNNJ.mjs.map
|
|
2
|
+
//# sourceMappingURL=backwardForward-3X63XNNJ.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,CAAuB,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,CA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,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-ZUVULGGJ.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/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 // eslint-disable-next-line react-hooks/exhaustive-deps\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,CAAuB,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,MAAA,CAAAC,CAAO,CAAE,CAAA,IAAO,CAAE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AA,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-3X63XNNJ.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/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 // eslint-disable-next-line react-hooks/exhaustive-deps\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 chunkBNVNO5NH_js=require('./chunk-BNVNO5NH.js'),chunkCOYFW7R4_js=require('./chunk-COYFW7R4.js'),
|
|
2
|
-
//# sourceMappingURL=backwardForward-
|
|
1
|
+
'use strict';var chunkBNVNO5NH_js=require('./chunk-BNVNO5NH.js'),chunkCOYFW7R4_js=require('./chunk-COYFW7R4.js'),chunkVUHZVVMS_js=require('./chunk-VUHZVVMS.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),react=require('react'),reactRedux=require('react-redux'),useDoubleTap=require('use-double-tap'),J=require('next/image'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var J__default=/*#__PURE__*/_interopDefault(J);chunkAN6JAJSI_js.e();var w=1e3,x=10,v=chunkVUHZVVMS_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=chunkAN6JAJSI_js.z();chunkAN6JAJSI_js.A(({controller:{currentTime:r,duration:t}})=>({currentTime:r,duration:t}),reactRedux.shallowEqual);let {videoElementSizeInfo:N}=chunkAN6JAJSI_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(chunkAN6JAJSI_js.k(false))):e==="touchForward"&&c&&(c(true),f(chunkAN6JAJSI_js.k(false))),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));},200),react.useEffect(()=>{A&&(n(false),g&&c?(c(false),chunkVUHZVVMS_js.x().duration-chunkVUHZVVMS_js.x().currentTime<=a.current?chunkVUHZVVMS_js.Z(e,chunkVUHZVVMS_js.x().duration):chunkVUHZVVMS_js.Z(e,a.current),u(v)):P&&i&&(i(false),chunkVUHZVVMS_js.x().currentTime<=a.current?chunkVUHZVVMS_js.Z(e,0):chunkVUHZVVMS_js.Z(e,a.current),u(v)));},[A,e]);let G=r=>{u(t=>t+x),chunkVUHZVVMS_js.t("isTouchScreenLandscape")&&chunkVUHZVVMS_js.ma(r,e),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w);};if(chunkBNVNO5NH_js.a("ArrowRight",r=>{chunkVUHZVVMS_js.t("isPressKeyArrowRight")&&e==="forward"&&(r.stopPropagation(),u(t=>t+x),f(chunkAN6JAJSI_js.k(true)),c&&c(true),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));}),chunkBNVNO5NH_js.a("ArrowLeft",r=>{chunkVUHZVVMS_js.t("isPressKeyArrowLeft")&&e==="backward"&&(r.stopPropagation(),u(t=>t+x),f(chunkAN6JAJSI_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 ${chunkVUHZVVMS_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:chunkVUHZVVMS_js.ea(`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:chunkVUHZVVMS_js.t("isTouchScreen")?G:void 0,children:[jsxRuntime.jsxs("p",{className:chunkVUHZVVMS_js.ea("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:chunkCOYFW7R4_js.a.chevronLeft,width:chunkVUHZVVMS_js.fa({desktop:20,desktopFullScreen:40,touch:16,touchFullScreen:20}),height:chunkVUHZVVMS_js.fa({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-HTLSZBXC.js.map
|
|
2
|
+
//# sourceMappingURL=backwardForward-HTLSZBXC.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":"ieAAAA,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-S6ZHVC75.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/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 // eslint-disable-next-line react-hooks/exhaustive-deps\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":"ieAAAA,kBAAAA,EAAAA,CAeA,IAAMC,CAAAA,CAAW,GAAA,CACXC,CAAAA,CAAO,EAAA,CACPC,CAAAA,CAAcC,kBAAAA,CAAAA,eAA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ASrB,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-HTLSZBXC.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/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 // eslint-disable-next-line react-hooks/exhaustive-deps\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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkVUHZVVMS_js=require('./chunk-VUHZVVMS.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js');chunkAN6JAJSI_js.e();var w=()=>{let{params:r}=chunkVUHZVVMS_js.Aa.getState().videoData,t=chunkVUHZVVMS_js.x().currentTime;if(t!==0){let d=chunkVUHZVVMS_js.x().duration,i={video_id:+r.id,video_type:2,time:t===d?0:Math.floor(chunkVUHZVVMS_js.x().currentTime)},o=localStorage.getItem("viewedVideos");if(o){let e=JSON.parse(o);e=e.filter(n=>n.video_id!==i.video_id||n.video_type!==i.video_type),e.length<10||e.shift(),e.push(i),localStorage.setItem("viewedVideos",JSON.stringify(e));}else localStorage.setItem("viewedVideos",JSON.stringify([i]));}},f=()=>{let r=chunkVUHZVVMS_js.Aa.dispatch,{params:t}=chunkVUHZVVMS_js.Aa.getState().videoData,d=localStorage.getItem("viewedVideos");if(d){let o=JSON.parse(d).find(e=>e.video_id===Number(t.id)&&e.video_type===2);o&&r(chunkVUHZVVMS_js.za({time:o.time}));}};exports.a=w;exports.b=f;//# sourceMappingURL=chunk-3TPEXSZV.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-3TPEXSZV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/redux/actions/user.actions.ts"],"names":["init_cjs_shims","handleContinuousPlayback","params","store_default","currentTime","mainPlayerVideoTag","duration","viewedVideo","viewedVideosInLocalStorage","vi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CAAE,SAAA,CAChCK,EAA6B,YAAA,CAAa,OAAA,CAAQ,cAAc,CAAA,CACpE,GAAIA,CAAAA,CAA4B,CAE5B,IAAMD,CAAAA,CAD+B,KAAK,KAAA,CAAMC,CAA0B,CAAA,CACzC,IAAA,CAC5BE,GAAwBA,CAAAA,CAAM,QAAA,GAAa,MAAA,CAAOR,CAAAA,CAAO,EAAE,CAAA,EAAKQ,CAAAA,CAAM,UAAA,GAAe,CAC1F,EAEIH,CAAAA,EAAaK,CAAAA,CAASC,mBAAAA,CAAiB,CAAE,KAAMN,CAAAA,CAAY,IAAK,CAAC,CAAC,EAC1E,CACJ","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/redux/actions/user.actions.ts"],"names":["init_cjs_shims","handleContinuousPlayback","params","store_default","currentTime","mainPlayerVideoTag","duration","viewedVideo","viewedVideosInLocalStorage","viewedVideos","video","handleApplyContinuousPlayback","dispatch","setVideoSettings"],"mappings":"iHAAAA,kBAAAA,EAAAA,CAKO,IAAMC,CAAAA,CAA2B,IAAM,CAC1C,GAAM,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAIC,oBAAM,QAAA,EAAS,CAAE,SAAA,CAC9BC,CAAAA,CAAcC,oBAAmB,CAAE,WAAA,CACzC,GAAID,CAAAA,GAAgB,EAAG,CACnB,IAAME,CAAAA,CAAWD,kBAAAA,GAAqB,QAAA,CAChCE,CAAAA,CAA4B,CAC9B,QAAA,CAAU,CAACL,CAAAA,CAAO,EAAA,CAClB,UAAA,CAAY,CAAA,CACZ,KAAME,CAAAA,GAAgBE,CAAAA,CAAW,CAAA,CAAI,IAAA,CAAK,MAAMD,kBAAAA,EAAmB,CAAE,WAAW,CACpF,EACIG,CAAAA,CAA6B,YAAA,CAAa,OAAA,CAAQ,cAAc,EACpE,GAAIA,CAAAA,CAA4B,CAC5B,IAAIC,EAA+B,IAAA,CAAK,KAAA,CAAMD,CAA0B,CAAA,CACxEC,EAAeA,CAAAA,CAAa,MAAA,CACvBC,CAAAA,EAAwBA,CAAAA,CAAM,WAAaH,CAAAA,CAAY,QAAA,EAAYG,CAAAA,CAAM,UAAA,GAAeH,EAAY,UACzG,CAAA,CACIE,CAAAA,CAAa,MAAA,CAAS,IAEtBA,CAAAA,CAAa,KAAA,EAAM,CACnBA,CAAAA,CAAa,IAAA,CAAKF,CAAW,CAAA,CAEjC,YAAA,CAAa,QAAQ,cAAA,CAAgB,IAAA,CAAK,SAAA,CAAUE,CAAY,CAAC,EACrE,CAAA,KAAO,YAAA,CAAa,OAAA,CAAQ,eAAgB,IAAA,CAAK,SAAA,CAAU,CAACF,CAAW,CAAC,CAAC,EAC7E,CACJ,CAAA,CAEaI,EAAgC,IAAM,CAC/C,IAAMC,CAAAA,CAAWT,oBAAM,QAAA,CACjB,CAAE,MAAA,CAAAD,CAAO,EAAIC,mBAAAA,CAAM,QAAA,EAAS,CAAE,SAAA,CAChCK,EAA6B,YAAA,CAAa,OAAA,CAAQ,cAAc,CAAA,CACpE,GAAIA,CAAAA,CAA4B,CAE5B,IAAMD,CAAAA,CAD+B,KAAK,KAAA,CAAMC,CAA0B,CAAA,CACzC,IAAA,CAC5BE,GAAwBA,CAAAA,CAAM,QAAA,GAAa,MAAA,CAAOR,CAAAA,CAAO,EAAE,CAAA,EAAKQ,CAAAA,CAAM,UAAA,GAAe,CAC1F,EAEIH,CAAAA,EAAaK,CAAAA,CAASC,mBAAAA,CAAiB,CAAE,KAAMN,CAAAA,CAAY,IAAK,CAAC,CAAC,EAC1E,CACJ","file":"chunk-3TPEXSZV.js","sourcesContent":["import { IViewedVideo } from \"../../interfaces/interfaces\";\nimport store from \"../store\";\nimport { setVideoSettings } from \"../slices/userSlice\";\nimport { mainPlayerVideoTag } from \"../../constants\";\n\nexport const handleContinuousPlayback = () => {\n const { params } = store.getState().videoData;\n const currentTime = mainPlayerVideoTag().currentTime;\n if (currentTime !== 0) {\n const duration = mainPlayerVideoTag().duration;\n const viewedVideo: IViewedVideo = {\n video_id: +params.id!,\n video_type: 2,\n time: currentTime === duration ? 0 : Math.floor(mainPlayerVideoTag().currentTime),\n };\n let viewedVideosInLocalStorage = localStorage.getItem(\"viewedVideos\");\n if (viewedVideosInLocalStorage) {\n let viewedVideos: IViewedVideo[] = JSON.parse(viewedVideosInLocalStorage);\n viewedVideos = viewedVideos.filter(\n (video: IViewedVideo) => video.video_id !== viewedVideo.video_id || video.video_type !== viewedVideo.video_type\n );\n if (viewedVideos.length < 10) viewedVideos.push(viewedVideo);\n else {\n viewedVideos.shift();\n viewedVideos.push(viewedVideo);\n }\n localStorage.setItem(\"viewedVideos\", JSON.stringify(viewedVideos));\n } else localStorage.setItem(\"viewedVideos\", JSON.stringify([viewedVideo]));\n }\n};\n\nexport const handleApplyContinuousPlayback = () => {\n const dispatch = store.dispatch;\n const { params } = store.getState().videoData;\n let viewedVideosInLocalStorage = localStorage.getItem(\"viewedVideos\");\n if (viewedVideosInLocalStorage) {\n const viewedVideos: IViewedVideo[] = JSON.parse(viewedVideosInLocalStorage);\n const viewedVideo = viewedVideos.find(\n (video: IViewedVideo) => video.video_id === Number(params.id) && video.video_type === 2\n );\n\n if (viewedVideo) dispatch(setVideoSettings({ time: viewedVideo.time }));\n }\n};\n\n"]}
|