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.
Files changed (82) hide show
  1. package/{VideoHighLighter-T2LVURER.mjs → VideoHighLighter-JYEEHSUY.mjs} +2 -2
  2. package/{VideoHighLighter-T2LVURER.mjs.map → VideoHighLighter-JYEEHSUY.mjs.map} +1 -1
  3. package/{VideoHighLighter-OBD2IGA6.js → VideoHighLighter-SIOPEIR2.js} +2 -2
  4. package/{VideoHighLighter-OBD2IGA6.js.map → VideoHighLighter-SIOPEIR2.js.map} +1 -1
  5. package/{backwardForward-ZUVULGGJ.mjs → backwardForward-3X63XNNJ.mjs} +2 -2
  6. package/{backwardForward-ZUVULGGJ.mjs.map → backwardForward-3X63XNNJ.mjs.map} +1 -1
  7. package/{backwardForward-S6ZHVC75.js → backwardForward-HTLSZBXC.js} +2 -2
  8. package/{backwardForward-S6ZHVC75.js.map → backwardForward-HTLSZBXC.js.map} +1 -1
  9. package/chunk-3TPEXSZV.js +2 -0
  10. package/{chunk-ZWGZGWEB.js.map → chunk-3TPEXSZV.js.map} +1 -1
  11. package/{chunk-SKRDEKL2.mjs → chunk-4NYDCAYH.mjs} +4 -4
  12. package/{chunk-SKRDEKL2.mjs.map → chunk-4NYDCAYH.mjs.map} +1 -1
  13. package/chunk-5UGSCO4K.js +3 -0
  14. package/{chunk-BFE2RKVK.js.map → chunk-5UGSCO4K.js.map} +1 -1
  15. package/{chunk-4XKL6TLO.mjs → chunk-6LGS5W4B.mjs} +2 -2
  16. package/{chunk-4XKL6TLO.mjs.map → chunk-6LGS5W4B.mjs.map} +1 -1
  17. package/chunk-7FHLAPSR.js +2 -0
  18. package/chunk-7FHLAPSR.js.map +1 -0
  19. package/{chunk-CCO6GDG2.mjs → chunk-HOAJ3EFI.mjs} +3 -3
  20. package/{chunk-CCO6GDG2.mjs.map → chunk-HOAJ3EFI.mjs.map} +1 -1
  21. package/chunk-HZASW2B2.js +2 -0
  22. package/{chunk-DJ6KVZRK.js.map → chunk-HZASW2B2.js.map} +1 -1
  23. package/{chunk-WFHA2FPC.js → chunk-IKMA6LUH.js} +5 -5
  24. package/{chunk-WFHA2FPC.js.map → chunk-IKMA6LUH.js.map} +1 -1
  25. package/chunk-JU5IQH3S.mjs +2 -0
  26. package/chunk-JU5IQH3S.mjs.map +1 -0
  27. package/{chunk-IBV5SFIT.js → chunk-K4YPVDEE.js} +2 -2
  28. package/{chunk-IBV5SFIT.js.map → chunk-K4YPVDEE.js.map} +1 -1
  29. package/{chunk-QM3W7EYS.js → chunk-KSZ35TPK.js} +2 -2
  30. package/{chunk-QM3W7EYS.js.map → chunk-KSZ35TPK.js.map} +1 -1
  31. package/{chunk-BC4366GN.mjs → chunk-NLCBOGTI.mjs} +2 -2
  32. package/{chunk-BC4366GN.mjs.map → chunk-NLCBOGTI.mjs.map} +1 -1
  33. package/{chunk-GYUGYOVP.mjs → chunk-P4O3IKAQ.mjs} +2 -2
  34. package/{chunk-GYUGYOVP.mjs.map → chunk-P4O3IKAQ.mjs.map} +1 -1
  35. package/{chunk-73KLK4QU.mjs → chunk-QFADUEGX.mjs} +2 -2
  36. package/{chunk-73KLK4QU.mjs.map → chunk-QFADUEGX.mjs.map} +1 -1
  37. package/{chunk-PKXJEXKI.mjs → chunk-UL5LQB3G.mjs} +2 -2
  38. package/{chunk-PKXJEXKI.mjs.map → chunk-UL5LQB3G.mjs.map} +1 -1
  39. package/{chunk-U3VFRU6R.js → chunk-VUHZVVMS.js} +2 -2
  40. package/{chunk-U3VFRU6R.js.map → chunk-VUHZVVMS.js.map} +1 -1
  41. package/chunk-XCFESDIY.js +2 -0
  42. package/chunk-XCFESDIY.js.map +1 -0
  43. package/chunk-ZI6O72OM.mjs +2 -0
  44. package/chunk-ZI6O72OM.mjs.map +1 -0
  45. package/index.js +1 -1
  46. package/index.mjs +1 -1
  47. package/{nonStaticVideoTag-6OHMSJEH.js → nonStaticVideoTag-5HEUBWAN.js} +2 -2
  48. package/{nonStaticVideoTag-6OHMSJEH.js.map → nonStaticVideoTag-5HEUBWAN.js.map} +1 -1
  49. package/{nonStaticVideoTag-J6JNATM6.mjs → nonStaticVideoTag-P47FI6UV.mjs} +2 -2
  50. package/{nonStaticVideoTag-J6JNATM6.mjs.map → nonStaticVideoTag-P47FI6UV.mjs.map} +1 -1
  51. package/package.json +1 -1
  52. package/staticPlayer-JLBPTEWE.js +2 -0
  53. package/{staticPlayer-TNS4JFRP.js.map → staticPlayer-JLBPTEWE.js.map} +1 -1
  54. package/{staticPlayer-2IO6XEKM.mjs → staticPlayer-W6TBVD5A.mjs} +2 -2
  55. package/{staticPlayer-2IO6XEKM.mjs.map → staticPlayer-W6TBVD5A.mjs.map} +1 -1
  56. package/{staticVideoTag-2YYZBRPY.mjs → staticVideoTag-JOPHGL3R.mjs} +2 -2
  57. package/{staticVideoTag-2YYZBRPY.mjs.map → staticVideoTag-JOPHGL3R.mjs.map} +1 -1
  58. package/{staticVideoTag-VLNCYNKV.js → staticVideoTag-OZZU5MWF.js} +2 -2
  59. package/{staticVideoTag-VLNCYNKV.js.map → staticVideoTag-OZZU5MWF.js.map} +1 -1
  60. package/videoArea-6UF3GOX7.mjs +2 -0
  61. package/{videoArea-2F2NDD76.mjs.map → videoArea-6UF3GOX7.mjs.map} +1 -1
  62. package/videoArea-J6ITRRDQ.js +2 -0
  63. package/{videoArea-35ABV3CM.js.map → videoArea-J6ITRRDQ.js.map} +1 -1
  64. package/videoPlayerStyles.css +0 -8
  65. package/{vodPlayer-JTS4WVOB.mjs → vodPlayer-BJ7FLFUB.mjs} +2 -2
  66. package/{vodPlayer-JTS4WVOB.mjs.map → vodPlayer-BJ7FLFUB.mjs.map} +1 -1
  67. package/{vodPlayer-337TYSU4.js → vodPlayer-PFFEBJFX.js} +2 -2
  68. package/{vodPlayer-337TYSU4.js.map → vodPlayer-PFFEBJFX.js.map} +1 -1
  69. package/chunk-BFE2RKVK.js +0 -3
  70. package/chunk-DJ6KVZRK.js +0 -2
  71. package/chunk-OGCKLRYP.js +0 -2
  72. package/chunk-OGCKLRYP.js.map +0 -1
  73. package/chunk-WU4GN63P.mjs +0 -2
  74. package/chunk-WU4GN63P.mjs.map +0 -1
  75. package/chunk-Y7BIYTQP.mjs +0 -2
  76. package/chunk-Y7BIYTQP.mjs.map +0 -1
  77. package/chunk-ZSSCZTW3.js +0 -2
  78. package/chunk-ZSSCZTW3.js.map +0 -1
  79. package/chunk-ZWGZGWEB.js +0 -2
  80. package/staticPlayer-TNS4JFRP.js +0 -2
  81. package/videoArea-2F2NDD76.mjs +0 -2
  82. package/videoArea-35ABV3CM.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/videoTag/staticVideoTag.tsx"],"names":["init_esm_shims","StaticVideoTag","dispatch","useAppDispatch","params","useAppSelector","shallowEqual","firstPlay","loadingDurationRef","useRef","initialWaitingRef","timerRef","intervalRef","videoRef","useEffect","video","onLoadedData","handleStaticVideoLoadedData","onCanPlay","handleStaticVideoCanPlay","handlePageLoadTime","handleResize","element","setVideoElementSizeInfo","conditions","useJumpToCurrentTime_default","setPlayerParams","currentTime","handleCanPlay","setupAutoplayBehavior","useAppendSubtitle_default","useHideSubtitle_default","useActiveSubtitleAutomatic_default","jsxs","jsx","Image","handleVideoError","handleStaticVideoPause","handleStaticVideoEnded","handleStaticVideoTimeUpdate","handleStaticVideoPlay","handleStaticVideoPlaying","staticVideoTag_default"],"mappings":"qYAAAA,CAAAA,EAAAA,CA0BA,IAAMC,CAAAA,CAAiB,IAAM,CAC3B,IAAMC,IAAWC,CAAAA,EAAe,CAC1B,CAAE,MAAA,CAAAC,GAAO,EAAIC,CAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,MAAA,CAAAD,CAAO,CAAE,CAAA,IAAO,CAAE,MAAA,CAAAA,CAAO,GAAIE,YAAY,CAAA,CAC3FD,CAAAA,CAAe,CAAC,CAAE,UAAA,CAAY,CAA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import { useEffect, useRef } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { handlePageLoadTime, setupAutoplayBehavior } from \"../../../helpers/helpers\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\nimport { setPlayerParams, setVideoElementSizeInfo } from \"../../../helpers/redux/slices/videoDataSlice\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport {\r\n handleStaticVideoCanPlay,\r\n handleStaticVideoEnded,\r\n handleStaticVideoLoadedData,\r\n handleStaticVideoPause,\r\n handleStaticVideoPlay,\r\n handleStaticVideoPlaying,\r\n handleStaticVideoTimeUpdate,\r\n handleVideoError,\r\n} from \"../../../helpers/redux/actions/playerCore.actions\";\r\nimport useJumpToCurrentTime from \"../../../helpers/hooks/useJumpToCurrentTime\";\r\nimport useHideSubtitle from \"../../../helpers/hooks/useHideSubtitle\";\r\nimport Image from \"next/image\";\r\nimport useAppendSubtitle from \"../../../helpers/hooks/useAppendSubtitle\";\r\nimport useActiveSubtitleAutomatic from \"../../../helpers/hooks/useActiveSubtitleAutomatic\";\r\n\r\nconst StaticVideoTag = () => {\r\n const dispatch = useAppDispatch();\r\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n useAppSelector(({ controller: { firstPlay } }) => ({ firstPlay }), shallowEqual);\r\n\r\n const loadingDurationRef = useRef<any>(0);\r\n const initialWaitingRef = useRef<any>(0);\r\n const timerRef = useRef<any>(null);\r\n const intervalRef = useRef<any>(null);\r\n const videoRef = useRef<HTMLVideoElement | null>(null);\r\n\r\n useEffect(() => {\r\n const video = videoRef.current;\r\n if (!video) return;\r\n\r\n const onLoadedData = () => handleStaticVideoLoadedData(intervalRef, video);\r\n const onCanPlay = () => handleStaticVideoCanPlay();\r\n\r\n video.addEventListener(\"loadeddata\", onLoadedData);\r\n video.addEventListener(\"canplay\", onCanPlay);\r\n\r\n if (video.readyState >= 2) onLoadedData();\r\n if (video.readyState >= 3) onCanPlay();\r\n\r\n return () => {\r\n video.removeEventListener(\"loadeddata\", onLoadedData);\r\n video.removeEventListener(\"canplay\", onCanPlay);\r\n };\r\n }, []);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(() => {\r\n handlePageLoadTime(loadingDurationRef);\r\n initialWaitingRef.current = Date.now();\r\n }, []);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(() => {\r\n const handleResize = () => {\r\n const element: any = videoRef.current?.getBoundingClientRect();\r\n if (element) dispatch(setVideoElementSizeInfo(element));\r\n };\r\n\r\n if (conditions(ConditionName.isFirstPlay)) handleResize();\r\n window.addEventListener(\"resize\", handleResize);\r\n return () => window.removeEventListener(\"resize\", handleResize);\r\n }, [params.id]);\r\n\r\n useJumpToCurrentTime();\r\n\r\n useEffect(() => {\r\n const video = videoRef.current;\r\n\r\n if (!params.vhl_mainVideoSrc || !video) return;\r\n\r\n dispatch(setPlayerParams({ ...params, id: params.vhl_mainVideoSrc }));\r\n const currentTime = video.currentTime;\r\n\r\n const handleCanPlay = () => {\r\n video.currentTime = currentTime;\r\n video.play().catch(() => {\r\n video.muted = true;\r\n video.play();\r\n });\r\n video.removeEventListener(\"canplay\", handleCanPlay);\r\n };\r\n\r\n video.addEventListener(\"canplay\", handleCanPlay);\r\n\r\n video.src = params.vhl_mainVideoSrc + `?date=${Date.now()}`;\r\n video.load();\r\n\r\n setupAutoplayBehavior(video);\r\n\r\n return () => {\r\n video.removeEventListener(\"canplay\", handleCanPlay);\r\n };\r\n }, [params.vhl_mainVideoSrc]);\r\n\r\n useAppendSubtitle();\r\n useHideSubtitle();\r\n useActiveSubtitleAutomatic();\r\n\r\n return (\r\n <div style={{ position: \"relative\", width: \"100%\", height: \"100%\" }}>\r\n {params.banner && (\r\n <Image fill src={params.banner} alt={params.bannerAlt ?? \"بنر ویدیو پلیر\"} style={{ objectFit: \"cover\", pointerEvents: \"none\" }} />\r\n )}\r\n\r\n <video\r\n playsInline\r\n ref={videoRef}\r\n id=\"player-tag\"\r\n preload=\"metadata\"\r\n crossOrigin=\"anonymous\"\r\n poster={params.banner ?? undefined}\r\n style={{ width: \"100%\", height: \"100%\" }}\r\n autoPlay={!!conditions(ConditionName.hasAutoPlay) || !!params.advertisement}\r\n className={`pl-w-full pl-h-full pl-items-center pl-flex-1 ${\r\n !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"\r\n }`}\r\n onError={handleVideoError}\r\n onPause={handleStaticVideoPause}\r\n onEnded={handleStaticVideoEnded}\r\n onTimeUpdate={handleStaticVideoTimeUpdate}\r\n onPlay={(e) => handleStaticVideoPlay(e, timerRef)}\r\n onPlaying={(e) => handleStaticVideoPlaying(loadingDurationRef, initialWaitingRef, timerRef, e.currentTarget)}\r\n >\r\n <source src={params.id + `?date=${Date.now()}`} />\r\n </video>\r\n </div>\r\n );\r\n};\r\n\r\nexport default StaticVideoTag;\r\n"]}
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/videoTag/staticVideoTag.tsx"],"names":["init_esm_shims","StaticVideoTag","dispatch","useAppDispatch","params","useAppSelector","shallowEqual","firstPlay","loadingDurationRef","useRef","initialWaitingRef","timerRef","intervalRef","videoRef","useEffect","video","onLoadedData","handleStaticVideoLoadedData","onCanPlay","handleStaticVideoCanPlay","handlePageLoadTime","handleResize","element","setVideoElementSizeInfo","conditions","useJumpToCurrentTime_default","setPlayerParams","currentTime","handleCanPlay","setupAutoplayBehavior","useAppendSubtitle_default","useHideSubtitle_default","useActiveSubtitleAutomatic_default","jsxs","jsx","Image","handleVideoError","handleStaticVideoPause","handleStaticVideoEnded","handleStaticVideoTimeUpdate","handleStaticVideoPlay","handleStaticVideoPlaying","staticVideoTag_default"],"mappings":"qYAAAA,CAAAA,EAAAA,CA0BA,IAAMC,CAAAA,CAAiB,IA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AA,CAE3G,QAAA,CAAAuB,GAAAA,CAAC,QAAA,CAAA,CAAO,GAAA,CAAK9B,IAAO,EAAA,CAAK,CAAA,MAAA,EAAS,KAAK,GAAA,EAAK,GAAI,CAAA,CAClD,CAAA,CAAA,CACF,CAEJ,CAAA,CAEOsC,CAAAA,CAAQzC","file":"staticVideoTag-JOPHGL3R.mjs","sourcesContent":["\"use client\";\r\n\r\nimport { useEffect, useRef } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { handlePageLoadTime, setupAutoplayBehavior } from \"../../../helpers/helpers\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\nimport { setPlayerParams, setVideoElementSizeInfo } from \"../../../helpers/redux/slices/videoDataSlice\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport {\r\n handleStaticVideoCanPlay,\r\n handleStaticVideoEnded,\r\n handleStaticVideoLoadedData,\r\n handleStaticVideoPause,\r\n handleStaticVideoPlay,\r\n handleStaticVideoPlaying,\r\n handleStaticVideoTimeUpdate,\r\n handleVideoError,\r\n} from \"../../../helpers/redux/actions/playerCore.actions\";\r\nimport useJumpToCurrentTime from \"../../../helpers/hooks/useJumpToCurrentTime\";\r\nimport useHideSubtitle from \"../../../helpers/hooks/useHideSubtitle\";\r\nimport Image from \"next/image\";\r\nimport useAppendSubtitle from \"../../../helpers/hooks/useAppendSubtitle\";\r\nimport useActiveSubtitleAutomatic from \"../../../helpers/hooks/useActiveSubtitleAutomatic\";\r\n\r\nconst StaticVideoTag = () => {\r\n const dispatch = useAppDispatch();\r\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n useAppSelector(({ controller: { firstPlay } }) => ({ firstPlay }), shallowEqual);\r\n\r\n const loadingDurationRef = useRef<any>(0);\r\n const initialWaitingRef = useRef<any>(0);\r\n const timerRef = useRef<any>(null);\r\n const intervalRef = useRef<any>(null);\r\n const videoRef = useRef<HTMLVideoElement | null>(null);\r\n\r\n useEffect(() => {\r\n const video = videoRef.current;\r\n if (!video) return;\r\n\r\n const onLoadedData = () => handleStaticVideoLoadedData(intervalRef, video);\r\n const onCanPlay = () => handleStaticVideoCanPlay();\r\n\r\n video.addEventListener(\"loadeddata\", onLoadedData);\r\n video.addEventListener(\"canplay\", onCanPlay);\r\n\r\n if (video.readyState >= 2) onLoadedData();\r\n if (video.readyState >= 3) onCanPlay();\r\n\r\n return () => {\r\n video.removeEventListener(\"loadeddata\", onLoadedData);\r\n video.removeEventListener(\"canplay\", onCanPlay);\r\n };\r\n }, []);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(() => {\r\n handlePageLoadTime(loadingDurationRef);\r\n initialWaitingRef.current = Date.now();\r\n }, []);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(() => {\r\n const handleResize = () => {\r\n const element: any = videoRef.current?.getBoundingClientRect();\r\n if (element) dispatch(setVideoElementSizeInfo(element));\r\n };\r\n\r\n if (conditions(ConditionName.isFirstPlay)) handleResize();\r\n window.addEventListener(\"resize\", handleResize);\r\n return () => window.removeEventListener(\"resize\", handleResize);\r\n }, [params.id]);\r\n\r\n useJumpToCurrentTime();\r\n\r\n useEffect(() => {\r\n const video = videoRef.current;\r\n\r\n if (!params.vhl_mainVideoSrc || !video) return;\r\n\r\n dispatch(setPlayerParams({ ...params, id: params.vhl_mainVideoSrc }));\r\n const currentTime = video.currentTime;\r\n\r\n const handleCanPlay = () => {\r\n video.currentTime = currentTime;\r\n video.play().catch(() => {\r\n video.muted = true;\r\n video.play();\r\n });\r\n video.removeEventListener(\"canplay\", handleCanPlay);\r\n };\r\n\r\n video.addEventListener(\"canplay\", handleCanPlay);\r\n\r\n video.src = params.vhl_mainVideoSrc + `?date=${Date.now()}`;\r\n video.load();\r\n\r\n setupAutoplayBehavior(video);\r\n\r\n return () => {\r\n video.removeEventListener(\"canplay\", handleCanPlay);\r\n };\r\n }, [params.vhl_mainVideoSrc]);\r\n\r\n useAppendSubtitle();\r\n useHideSubtitle();\r\n useActiveSubtitleAutomatic();\r\n\r\n return (\r\n <div style={{ position: \"relative\", width: \"100%\", height: \"100%\" }}>\r\n {params.banner && (\r\n <Image fill src={params.banner} alt={params.bannerAlt ?? \"بنر ویدیو پلیر\"} style={{ objectFit: \"cover\", pointerEvents: \"none\" }} />\r\n )}\r\n\r\n <video\r\n playsInline\r\n ref={videoRef}\r\n id=\"player-tag\"\r\n preload=\"metadata\"\r\n crossOrigin=\"anonymous\"\r\n poster={params.banner ?? undefined}\r\n style={{ width: \"100%\", height: \"100%\" }}\r\n autoPlay={!!conditions(ConditionName.hasAutoPlay) || !!params.advertisement}\r\n className={`pl-w-full pl-h-full pl-items-center pl-flex-1 ${\r\n !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"\r\n }`}\r\n onError={handleVideoError}\r\n onPause={handleStaticVideoPause}\r\n onEnded={handleStaticVideoEnded}\r\n onTimeUpdate={handleStaticVideoTimeUpdate}\r\n onPlay={(e) => handleStaticVideoPlay(e, timerRef)}\r\n onPlaying={(e) => handleStaticVideoPlaying(loadingDurationRef, initialWaitingRef, timerRef, e.currentTarget)}\r\n >\r\n <source src={params.id + `?date=${Date.now()}`} />\r\n </video>\r\n </div>\r\n );\r\n};\r\n\r\nexport default StaticVideoTag;\r\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkQM3W7EYS_js=require('./chunk-QM3W7EYS.js'),chunkDJ6KVZRK_js=require('./chunk-DJ6KVZRK.js');require('./chunk-BFE2RKVK.js');var chunkU3VFRU6R_js=require('./chunk-U3VFRU6R.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),react=require('react'),reactRedux=require('react-redux'),I=require('next/image'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var I__default=/*#__PURE__*/_interopDefault(I);chunkAN6JAJSI_js.e();var $=()=>{let c=chunkAN6JAJSI_js.z(),{params:t}=chunkAN6JAJSI_js.A(({videoData:{params:e}})=>({params:e}),reactRedux.shallowEqual);chunkAN6JAJSI_js.A(({controller:{firstPlay:e}})=>({firstPlay:e}),reactRedux.shallowEqual);let m=react.useRef(0),u=react.useRef(0),p=react.useRef(null),F=react.useRef(null),r=react.useRef(null);return react.useEffect(()=>{let e=r.current;if(!e)return;let n=()=>chunkDJ6KVZRK_js.A(F,e),a=()=>chunkDJ6KVZRK_js.z();return e.addEventListener("loadeddata",n),e.addEventListener("canplay",a),e.readyState>=2&&n(),e.readyState>=3&&a(),()=>{e.removeEventListener("loadeddata",n),e.removeEventListener("canplay",a);}},[]),react.useEffect(()=>{chunkU3VFRU6R_js.qa(m),u.current=Date.now();},[]),react.useEffect(()=>{let e=()=>{let n=r.current?.getBoundingClientRect();n&&c(chunkU3VFRU6R_js.c(n));};return chunkU3VFRU6R_js.t("isFirstPlay")&&e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[t.id]),chunkQM3W7EYS_js.a(),react.useEffect(()=>{let e=r.current;if(!t.vhl_mainVideoSrc||!e)return;c(chunkU3VFRU6R_js.b({...t,id:t.vhl_mainVideoSrc}));let n=e.currentTime,a=()=>{e.currentTime=n,e.play().catch(()=>{e.muted=true,e.play();}),e.removeEventListener("canplay",a);};return e.addEventListener("canplay",a),e.src=t.vhl_mainVideoSrc+`?date=${Date.now()}`,e.load(),chunkU3VFRU6R_js.xa(e),()=>{e.removeEventListener("canplay",a);}},[t.vhl_mainVideoSrc]),chunkQM3W7EYS_js.c(),chunkQM3W7EYS_js.b(),chunkQM3W7EYS_js.d(),jsxRuntime.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[t.banner&&jsxRuntime.jsx(I__default.default,{fill:true,src:t.banner,alt:t.bannerAlt??"\u0628\u0646\u0631 \u0648\u06CC\u062F\u06CC\u0648 \u067E\u0644\u06CC\u0631",style:{objectFit:"cover",pointerEvents:"none"}}),jsxRuntime.jsx("video",{playsInline:true,ref:r,id:"player-tag",preload:"metadata",crossOrigin:"anonymous",poster:t.banner??void 0,style:{width:"100%",height:"100%"},autoPlay:!!chunkU3VFRU6R_js.t("hasAutoPlay")||!!t.advertisement,className:`pl-w-full pl-h-full pl-items-center pl-flex-1 ${!chunkU3VFRU6R_js.t("isTouchScreen")&&!chunkU3VFRU6R_js.t("isFullScreen")&&"!pl-rounded-[12px]"}`,onError:chunkDJ6KVZRK_js.a,onPause:chunkDJ6KVZRK_js.v,onEnded:chunkDJ6KVZRK_js.B,onTimeUpdate:chunkDJ6KVZRK_js.y,onPlay:e=>chunkDJ6KVZRK_js.w(e,p),onPlaying:e=>chunkDJ6KVZRK_js.x(m,u,p,e.currentTarget),children:jsxRuntime.jsx("source",{src:t.id+`?date=${Date.now()}`})})]})},Y=$;module.exports=Y;//# sourceMappingURL=staticVideoTag-VLNCYNKV.js.map
2
- //# sourceMappingURL=staticVideoTag-VLNCYNKV.js.map
1
+ 'use strict';var chunkKSZ35TPK_js=require('./chunk-KSZ35TPK.js'),chunkHZASW2B2_js=require('./chunk-HZASW2B2.js');require('./chunk-5UGSCO4K.js');var chunkVUHZVVMS_js=require('./chunk-VUHZVVMS.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),react=require('react'),reactRedux=require('react-redux'),I=require('next/image'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var I__default=/*#__PURE__*/_interopDefault(I);chunkAN6JAJSI_js.e();var $=()=>{let c=chunkAN6JAJSI_js.z(),{params:t}=chunkAN6JAJSI_js.A(({videoData:{params:e}})=>({params:e}),reactRedux.shallowEqual);chunkAN6JAJSI_js.A(({controller:{firstPlay:e}})=>({firstPlay:e}),reactRedux.shallowEqual);let m=react.useRef(0),u=react.useRef(0),p=react.useRef(null),F=react.useRef(null),r=react.useRef(null);return react.useEffect(()=>{let e=r.current;if(!e)return;let n=()=>chunkHZASW2B2_js.A(F,e),a=()=>chunkHZASW2B2_js.z();return e.addEventListener("loadeddata",n),e.addEventListener("canplay",a),e.readyState>=2&&n(),e.readyState>=3&&a(),()=>{e.removeEventListener("loadeddata",n),e.removeEventListener("canplay",a);}},[]),react.useEffect(()=>{chunkVUHZVVMS_js.qa(m),u.current=Date.now();},[]),react.useEffect(()=>{let e=()=>{let n=r.current?.getBoundingClientRect();n&&c(chunkVUHZVVMS_js.c(n));};return chunkVUHZVVMS_js.t("isFirstPlay")&&e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[t.id]),chunkKSZ35TPK_js.a(),react.useEffect(()=>{let e=r.current;if(!t.vhl_mainVideoSrc||!e)return;c(chunkVUHZVVMS_js.b({...t,id:t.vhl_mainVideoSrc}));let n=e.currentTime,a=()=>{e.currentTime=n,e.play().catch(()=>{e.muted=true,e.play();}),e.removeEventListener("canplay",a);};return e.addEventListener("canplay",a),e.src=t.vhl_mainVideoSrc+`?date=${Date.now()}`,e.load(),chunkVUHZVVMS_js.xa(e),()=>{e.removeEventListener("canplay",a);}},[t.vhl_mainVideoSrc]),chunkKSZ35TPK_js.c(),chunkKSZ35TPK_js.b(),chunkKSZ35TPK_js.d(),jsxRuntime.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[t.banner&&jsxRuntime.jsx(I__default.default,{fill:true,src:t.banner,alt:t.bannerAlt??"\u0628\u0646\u0631 \u0648\u06CC\u062F\u06CC\u0648 \u067E\u0644\u06CC\u0631",style:{objectFit:"cover",pointerEvents:"none"}}),jsxRuntime.jsx("video",{playsInline:true,ref:r,id:"player-tag",preload:"metadata",crossOrigin:"anonymous",poster:t.banner??void 0,style:{width:"100%",height:"100%"},autoPlay:!!chunkVUHZVVMS_js.t("hasAutoPlay")||!!t.advertisement,className:`pl-w-full pl-h-full pl-items-center pl-flex-1 ${!chunkVUHZVVMS_js.t("isTouchScreen")&&!chunkVUHZVVMS_js.t("isFullScreen")&&"!pl-rounded-[12px]"}`,onError:chunkHZASW2B2_js.a,onPause:chunkHZASW2B2_js.v,onEnded:chunkHZASW2B2_js.B,onTimeUpdate:chunkHZASW2B2_js.y,onPlay:e=>chunkHZASW2B2_js.w(e,p),onPlaying:e=>chunkHZASW2B2_js.x(m,u,p,e.currentTarget),children:jsxRuntime.jsx("source",{src:t.id+`?date=${Date.now()}`})})]})},Y=$;module.exports=Y;//# sourceMappingURL=staticVideoTag-OZZU5MWF.js.map
2
+ //# sourceMappingURL=staticVideoTag-OZZU5MWF.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/videoTag/staticVideoTag.tsx"],"names":["init_cjs_shims","StaticVideoTag","dispatch","useAppDispatch","params","useAppSelector","shallowEqual","firstPlay","loadingDurationRef","useRef","initialWaitingRef","timerRef","intervalRef","videoRef","useEffect","video","onLoadedData","handleStaticVideoLoadedData","onCanPlay","handleStaticVideoCanPlay","handlePageLoadTime","handleResize","element","setVideoElementSizeInfo","conditions","useJumpToCurrentTime_default","setPlayerParams","currentTime","handleCanPlay","setupAutoplayBehavior","useAppendSubtitle_default","useHideSubtitle_default","useActiveSubtitleAutomatic_default","jsxs","jsx","Image","handleVideoError","handleStaticVideoPause","handleStaticVideoEnded","handleStaticVideoTimeUpdate","handleStaticVideoPlay","handleStaticVideoPlaying","staticVideoTag_default"],"mappings":"6dAAAA,kBAAAA,EAAAA,CA0BA,IAAMC,CAAAA,CAAiB,IAAM,CAC3B,IAAMC,EAAWC,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,GAAIE,uBAAY,CAAA,CAC3FD,kBAAAA,CAAe,CAAC,CAAE,UAAA,CAAY,CAAE,SAAA,CAAAE,CAAU,CAAE,CAAA,IAAO,CAAE,UAAAA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port { shallowEqual } from \"react-redux\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { handlePageLoadTime, setupAutoplayBehavior } from \"../../../helpers/helpers\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\nimport { setPlayerParams, setVideoElementSizeInfo } from \"../../../helpers/redux/slices/videoDataSlice\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport {\r\n handleStaticVideoCanPlay,\r\n handleStaticVideoEnded,\r\n handleStaticVideoLoadedData,\r\n handleStaticVideoPause,\r\n handleStaticVideoPlay,\r\n handleStaticVideoPlaying,\r\n handleStaticVideoTimeUpdate,\r\n handleVideoError,\r\n} from \"../../../helpers/redux/actions/playerCore.actions\";\r\nimport useJumpToCurrentTime from \"../../../helpers/hooks/useJumpToCurrentTime\";\r\nimport useHideSubtitle from \"../../../helpers/hooks/useHideSubtitle\";\r\nimport Image from \"next/image\";\r\nimport useAppendSubtitle from \"../../../helpers/hooks/useAppendSubtitle\";\r\nimport useActiveSubtitleAutomatic from \"../../../helpers/hooks/useActiveSubtitleAutomatic\";\r\n\r\nconst StaticVideoTag = () => {\r\n const dispatch = useAppDispatch();\r\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n useAppSelector(({ controller: { firstPlay } }) => ({ firstPlay }), shallowEqual);\r\n\r\n const loadingDurationRef = useRef<any>(0);\r\n const initialWaitingRef = useRef<any>(0);\r\n const timerRef = useRef<any>(null);\r\n const intervalRef = useRef<any>(null);\r\n const videoRef = useRef<HTMLVideoElement | null>(null);\r\n\r\n useEffect(() => {\r\n const video = videoRef.current;\r\n if (!video) return;\r\n\r\n const onLoadedData = () => handleStaticVideoLoadedData(intervalRef, video);\r\n const onCanPlay = () => handleStaticVideoCanPlay();\r\n\r\n video.addEventListener(\"loadeddata\", onLoadedData);\r\n video.addEventListener(\"canplay\", onCanPlay);\r\n\r\n if (video.readyState >= 2) onLoadedData();\r\n if (video.readyState >= 3) onCanPlay();\r\n\r\n return () => {\r\n video.removeEventListener(\"loadeddata\", onLoadedData);\r\n video.removeEventListener(\"canplay\", onCanPlay);\r\n };\r\n }, []);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(() => {\r\n handlePageLoadTime(loadingDurationRef);\r\n initialWaitingRef.current = Date.now();\r\n }, []);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(() => {\r\n const handleResize = () => {\r\n const element: any = videoRef.current?.getBoundingClientRect();\r\n if (element) dispatch(setVideoElementSizeInfo(element));\r\n };\r\n\r\n if (conditions(ConditionName.isFirstPlay)) handleResize();\r\n window.addEventListener(\"resize\", handleResize);\r\n return () => window.removeEventListener(\"resize\", handleResize);\r\n }, [params.id]);\r\n\r\n useJumpToCurrentTime();\r\n\r\n useEffect(() => {\r\n const video = videoRef.current;\r\n\r\n if (!params.vhl_mainVideoSrc || !video) return;\r\n\r\n dispatch(setPlayerParams({ ...params, id: params.vhl_mainVideoSrc }));\r\n const currentTime = video.currentTime;\r\n\r\n const handleCanPlay = () => {\r\n video.currentTime = currentTime;\r\n video.play().catch(() => {\r\n video.muted = true;\r\n video.play();\r\n });\r\n video.removeEventListener(\"canplay\", handleCanPlay);\r\n };\r\n\r\n video.addEventListener(\"canplay\", handleCanPlay);\r\n\r\n video.src = params.vhl_mainVideoSrc + `?date=${Date.now()}`;\r\n video.load();\r\n\r\n setupAutoplayBehavior(video);\r\n\r\n return () => {\r\n video.removeEventListener(\"canplay\", handleCanPlay);\r\n };\r\n }, [params.vhl_mainVideoSrc]);\r\n\r\n useAppendSubtitle();\r\n useHideSubtitle();\r\n useActiveSubtitleAutomatic();\r\n\r\n return (\r\n <div style={{ position: \"relative\", width: \"100%\", height: \"100%\" }}>\r\n {params.banner && (\r\n <Image fill src={params.banner} alt={params.bannerAlt ?? \"بنر ویدیو پلیر\"} style={{ objectFit: \"cover\", pointerEvents: \"none\" }} />\r\n )}\r\n\r\n <video\r\n playsInline\r\n ref={videoRef}\r\n id=\"player-tag\"\r\n preload=\"metadata\"\r\n crossOrigin=\"anonymous\"\r\n poster={params.banner ?? undefined}\r\n style={{ width: \"100%\", height: \"100%\" }}\r\n autoPlay={!!conditions(ConditionName.hasAutoPlay) || !!params.advertisement}\r\n className={`pl-w-full pl-h-full pl-items-center pl-flex-1 ${\r\n !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"\r\n }`}\r\n onError={handleVideoError}\r\n onPause={handleStaticVideoPause}\r\n onEnded={handleStaticVideoEnded}\r\n onTimeUpdate={handleStaticVideoTimeUpdate}\r\n onPlay={(e) => handleStaticVideoPlay(e, timerRef)}\r\n onPlaying={(e) => handleStaticVideoPlaying(loadingDurationRef, initialWaitingRef, timerRef, e.currentTarget)}\r\n >\r\n <source src={params.id + `?date=${Date.now()}`} />\r\n </video>\r\n </div>\r\n );\r\n};\r\n\r\nexport default StaticVideoTag;\r\n"]}
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/videoTag/staticVideoTag.tsx"],"names":["init_cjs_shims","StaticVideoTag","dispatch","useAppDispatch","params","useAppSelector","shallowEqual","firstPlay","loadingDurationRef","useRef","initialWaitingRef","timerRef","intervalRef","videoRef","useEffect","video","onLoadedData","handleStaticVideoLoadedData","onCanPlay","handleStaticVideoCanPlay","handlePageLoadTime","handleResize","element","setVideoElementSizeInfo","conditions","useJumpToCurrentTime_default","setPlayerParams","currentTime","handleCanPlay","setupAutoplayBehavior","useAppendSubtitle_default","useHideSubtitle_default","useActiveSubtitleAutomatic_default","jsxs","jsx","Image","handleVideoError","handleStaticVideoPause","handleStaticVideoEnded","handleStaticVideoTimeUpdate","handleStaticVideoPlay","handleStaticVideoPlaying","staticVideoTag_default"],"mappings":"6dAAAA,kBAAAA,EAAAA,CA0BA,IAAMC,CAAAA,CAAiB,IAAM,CAC3B,IAAMC,EAAWC,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Aa,CAAA,CAE3G,QAAA,CAAAuB,cAAAA,CAAC,QAAA,CAAA,CAAO,GAAA,CAAK9B,EAAO,EAAA,CAAK,CAAA,MAAA,EAAS,KAAK,GAAA,EAAK,GAAI,CAAA,CAClD,CAAA,CAAA,CACF,CAEJ,CAAA,CAEOsC,CAAAA,CAAQzC","file":"staticVideoTag-OZZU5MWF.js","sourcesContent":["\"use client\";\r\n\r\nimport { useEffect, useRef } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { handlePageLoadTime, setupAutoplayBehavior } from \"../../../helpers/helpers\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\nimport { setPlayerParams, setVideoElementSizeInfo } from \"../../../helpers/redux/slices/videoDataSlice\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport {\r\n handleStaticVideoCanPlay,\r\n handleStaticVideoEnded,\r\n handleStaticVideoLoadedData,\r\n handleStaticVideoPause,\r\n handleStaticVideoPlay,\r\n handleStaticVideoPlaying,\r\n handleStaticVideoTimeUpdate,\r\n handleVideoError,\r\n} from \"../../../helpers/redux/actions/playerCore.actions\";\r\nimport useJumpToCurrentTime from \"../../../helpers/hooks/useJumpToCurrentTime\";\r\nimport useHideSubtitle from \"../../../helpers/hooks/useHideSubtitle\";\r\nimport Image from \"next/image\";\r\nimport useAppendSubtitle from \"../../../helpers/hooks/useAppendSubtitle\";\r\nimport useActiveSubtitleAutomatic from \"../../../helpers/hooks/useActiveSubtitleAutomatic\";\r\n\r\nconst StaticVideoTag = () => {\r\n const dispatch = useAppDispatch();\r\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n useAppSelector(({ controller: { firstPlay } }) => ({ firstPlay }), shallowEqual);\r\n\r\n const loadingDurationRef = useRef<any>(0);\r\n const initialWaitingRef = useRef<any>(0);\r\n const timerRef = useRef<any>(null);\r\n const intervalRef = useRef<any>(null);\r\n const videoRef = useRef<HTMLVideoElement | null>(null);\r\n\r\n useEffect(() => {\r\n const video = videoRef.current;\r\n if (!video) return;\r\n\r\n const onLoadedData = () => handleStaticVideoLoadedData(intervalRef, video);\r\n const onCanPlay = () => handleStaticVideoCanPlay();\r\n\r\n video.addEventListener(\"loadeddata\", onLoadedData);\r\n video.addEventListener(\"canplay\", onCanPlay);\r\n\r\n if (video.readyState >= 2) onLoadedData();\r\n if (video.readyState >= 3) onCanPlay();\r\n\r\n return () => {\r\n video.removeEventListener(\"loadeddata\", onLoadedData);\r\n video.removeEventListener(\"canplay\", onCanPlay);\r\n };\r\n }, []);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(() => {\r\n handlePageLoadTime(loadingDurationRef);\r\n initialWaitingRef.current = Date.now();\r\n }, []);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(() => {\r\n const handleResize = () => {\r\n const element: any = videoRef.current?.getBoundingClientRect();\r\n if (element) dispatch(setVideoElementSizeInfo(element));\r\n };\r\n\r\n if (conditions(ConditionName.isFirstPlay)) handleResize();\r\n window.addEventListener(\"resize\", handleResize);\r\n return () => window.removeEventListener(\"resize\", handleResize);\r\n }, [params.id]);\r\n\r\n useJumpToCurrentTime();\r\n\r\n useEffect(() => {\r\n const video = videoRef.current;\r\n\r\n if (!params.vhl_mainVideoSrc || !video) return;\r\n\r\n dispatch(setPlayerParams({ ...params, id: params.vhl_mainVideoSrc }));\r\n const currentTime = video.currentTime;\r\n\r\n const handleCanPlay = () => {\r\n video.currentTime = currentTime;\r\n video.play().catch(() => {\r\n video.muted = true;\r\n video.play();\r\n });\r\n video.removeEventListener(\"canplay\", handleCanPlay);\r\n };\r\n\r\n video.addEventListener(\"canplay\", handleCanPlay);\r\n\r\n video.src = params.vhl_mainVideoSrc + `?date=${Date.now()}`;\r\n video.load();\r\n\r\n setupAutoplayBehavior(video);\r\n\r\n return () => {\r\n video.removeEventListener(\"canplay\", handleCanPlay);\r\n };\r\n }, [params.vhl_mainVideoSrc]);\r\n\r\n useAppendSubtitle();\r\n useHideSubtitle();\r\n useActiveSubtitleAutomatic();\r\n\r\n return (\r\n <div style={{ position: \"relative\", width: \"100%\", height: \"100%\" }}>\r\n {params.banner && (\r\n <Image fill src={params.banner} alt={params.bannerAlt ?? \"بنر ویدیو پلیر\"} style={{ objectFit: \"cover\", pointerEvents: \"none\" }} />\r\n )}\r\n\r\n <video\r\n playsInline\r\n ref={videoRef}\r\n id=\"player-tag\"\r\n preload=\"metadata\"\r\n crossOrigin=\"anonymous\"\r\n poster={params.banner ?? undefined}\r\n style={{ width: \"100%\", height: \"100%\" }}\r\n autoPlay={!!conditions(ConditionName.hasAutoPlay) || !!params.advertisement}\r\n className={`pl-w-full pl-h-full pl-items-center pl-flex-1 ${\r\n !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"\r\n }`}\r\n onError={handleVideoError}\r\n onPause={handleStaticVideoPause}\r\n onEnded={handleStaticVideoEnded}\r\n onTimeUpdate={handleStaticVideoTimeUpdate}\r\n onPlay={(e) => handleStaticVideoPlay(e, timerRef)}\r\n onPlaying={(e) => handleStaticVideoPlaying(loadingDurationRef, initialWaitingRef, timerRef, e.currentTarget)}\r\n >\r\n <source src={params.id + `?date=${Date.now()}`} />\r\n </video>\r\n </div>\r\n );\r\n};\r\n\r\nexport default StaticVideoTag;\r\n"]}
@@ -0,0 +1,2 @@
1
+ export{a as default}from'./chunk-4NYDCAYH.mjs';import'./chunk-P4O3IKAQ.mjs';import'./chunk-ZI6O72OM.mjs';import'./chunk-JU5IQH3S.mjs';import'./chunk-2DV7FRU5.mjs';import'./chunk-XKRBXZUB.mjs';import'./chunk-HOAJ3EFI.mjs';import'./chunk-NLCBOGTI.mjs';import'./chunk-4QMWBTB5.mjs';//# sourceMappingURL=videoArea-6UF3GOX7.mjs.map
2
+ //# sourceMappingURL=videoArea-6UF3GOX7.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"videoArea-2F2NDD76.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"videoArea-6UF3GOX7.mjs"}
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkIKMA6LUH_js=require('./chunk-IKMA6LUH.js');require('./chunk-K4YPVDEE.js'),require('./chunk-XCFESDIY.js'),require('./chunk-7FHLAPSR.js'),require('./chunk-AK5TFAW3.js'),require('./chunk-COYFW7R4.js'),require('./chunk-5UGSCO4K.js'),require('./chunk-VUHZVVMS.js'),require('./chunk-AN6JAJSI.js');module.exports=chunkIKMA6LUH_js.a;//# sourceMappingURL=videoArea-J6ITRRDQ.js.map
2
+ //# sourceMappingURL=videoArea-J6ITRRDQ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"videoArea-35ABV3CM.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"videoArea-J6ITRRDQ.js"}
@@ -3491,10 +3491,6 @@ video {
3491
3491
  margin-bottom: 7px;
3492
3492
  }
3493
3493
 
3494
- .pl-me-\[5px\]{
3495
- margin-inline-end: 5px;
3496
- }
3497
-
3498
3494
  .pl-ml-0\.5{
3499
3495
  margin-left: 0.125rem;
3500
3496
  }
@@ -5015,10 +5011,6 @@ video {
5015
5011
  padding-inline-start: 0.25rem;
5016
5012
  }
5017
5013
 
5018
- .pl-group:hover .group-hover\:pl-ps-1\.5{
5019
- padding-inline-start: 0.375rem;
5020
- }
5021
-
5022
5014
  @media (min-width: 600px){
5023
5015
  .tablet\:\!pl-mx-auto{
5024
5016
  margin-left: auto !important;
@@ -1,2 +1,2 @@
1
- import {b}from'./chunk-PKXJEXKI.mjs';import {a}from'./chunk-CCO6GDG2.mjs';import {t}from'./chunk-BC4366GN.mjs';import {e,A as A$1}from'./chunk-4QMWBTB5.mjs';import {shallowEqual}from'react-redux';import {useEffect}from'react';import n from'next/dynamic';import {jsx,Fragment}from'react/jsx-runtime';e();e();e();var A=()=>{let{params:m}=A$1(({videoData:{params:e}})=>({params:e}),shallowEqual);A$1(({controller:{isEnded:e}})=>({isEnded:e}),shallowEqual),useEffect(()=>{t("getDetails")&&a();},[m.id,m.type]);},f=A;var y=()=>{f();},c=y;var x=n(()=>import('./videoArea-2F2NDD76.mjs')),E=n(()=>import('./notActive-DSDPVSW4.mjs')),S=()=>{if(A$1(({videoData:{params:m,details:e,isFetchDetails:u,isValidAddress:v}})=>({params:m,details:e,isFetchDetails:u,isValidAddress:v}),shallowEqual),c(),useEffect(()=>{b();},[]),t("isFetchDetails"))return jsx(Fragment,{children:t("isValidAddress")?jsx("div",{className:`pl-max-h-[100dvh] pl-bg-dark-1 ${!t("isTouchScreen")&&!t("isFullScreen")&&"!pl-rounded-[12px]"}`,children:jsx(x,{})}):jsx("div",{className:"pl-w-full pl-aspect-video",children:jsx(E,{})})})},Q=S;export{Q as default};//# sourceMappingURL=vodPlayer-JTS4WVOB.mjs.map
2
- //# sourceMappingURL=vodPlayer-JTS4WVOB.mjs.map
1
+ import {b}from'./chunk-UL5LQB3G.mjs';import {a}from'./chunk-HOAJ3EFI.mjs';import {t}from'./chunk-NLCBOGTI.mjs';import {e,A as A$1}from'./chunk-4QMWBTB5.mjs';import {shallowEqual}from'react-redux';import {useEffect}from'react';import n from'next/dynamic';import {jsx,Fragment}from'react/jsx-runtime';e();e();e();var A=()=>{let{params:m}=A$1(({videoData:{params:e}})=>({params:e}),shallowEqual);A$1(({controller:{isEnded:e}})=>({isEnded:e}),shallowEqual),useEffect(()=>{t("getDetails")&&a();},[m.id,m.type]);},f=A;var y=()=>{f();},c=y;var x=n(()=>import('./videoArea-6UF3GOX7.mjs')),E=n(()=>import('./notActive-DSDPVSW4.mjs')),S=()=>{if(A$1(({videoData:{params:m,details:e,isFetchDetails:u,isValidAddress:v}})=>({params:m,details:e,isFetchDetails:u,isValidAddress:v}),shallowEqual),c(),useEffect(()=>{b();},[]),t("isFetchDetails"))return jsx(Fragment,{children:t("isValidAddress")?jsx("div",{className:`pl-max-h-[100dvh] pl-bg-dark-1 ${!t("isTouchScreen")&&!t("isFullScreen")&&"!pl-rounded-[12px]"}`,children:jsx(x,{})}):jsx("div",{className:"pl-w-full pl-aspect-video",children:jsx(E,{})})})},Q=S;export{Q as default};//# sourceMappingURL=vodPlayer-BJ7FLFUB.mjs.map
2
+ //# sourceMappingURL=vodPlayer-BJ7FLFUB.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/components/videoPlayer/vodPlayer/vodPlayer.tsx","../src/videoPlayerLibrary/helpers/hooks/useGetData/useGetData.tsx","../src/videoPlayerLibrary/helpers/hooks/useGetData/useGetDetails.tsx"],"names":["init_esm_shims","useGetDetails","params","useAppSelector","shallowEqual","isEnded","useEffect","conditions","getVodDetails","useGetDetails_default","useGetData","useGetData_default","VideoArea","dynamic","NotActive","VodPlayer","details","isFetchDetails","isValidAddress","handleApplyContinuousPlayback","jsx","Fragment","vodPlayer_default"],"mappings":"2SAAAA,CAAAA,EAAAA,CCAAA,ICAAA,CAAAA,EAAAA,CAOA,IAAMC,CAAAA,CAAgB,IAAM,CAC1B,GAAM,CAAE,MAAA,CAAAC,CAAO,EAAIC,GAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,OAAAD,CAAO,CAAE,KAAO,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAA,CAAIE,YAAY,EAC3FD,GAAAA,CAAe,CAAC,CAAE,UAAA,CAAY,CAAE,QAAAE,CAAQ,CAAE,KAAO,CAAE,OAAA,CAAAA,CAAQ,CAAA,CAAA,CAAID,YAAY,EAE3EE,SAAAA,CAAU,IAAM,CACVC,CAAAA,CAAAA,YAAmC,CAAA,EAAGC,IAC5C,CAAA,CAAG,CAACN,CAAAA,CAAO,EAAA,CAAIA,EAAO,IAAI,CAAC,EAC7B,CAAA,CAEOO,CAAAA,CAAQR,EDbf,IAAMS,CAAAA,CAAa,IAAM,CACrBD,CAAAA,GAEJ,CAAA,CAEOE,CAAAA,CAAQD,EDGf,IAAME,CAAAA,CAAYC,EAAQ,IAAM,OAAO,0BAA6C,CAAC,CAAA,CAC/EC,EAAYD,CAAAA,CAAQ,IAAM,OAAO,0BAA6C,CAAC,EAE/EE,CAAAA,CAAY,IAAM,CAYtB,GAXAZ,GAAAA,CACE,CAAC,CAAE,SAAA,CAAW,CAAE,MAAA,CAAAD,CAAAA,CAAQ,QAAAc,CAAAA,CAAS,cAAA,CAAAC,EAAgB,cAAA,CAAAC,CAAe,CAAE,CAAA,IAAO,CAAE,OAAAhB,CAAAA,CAAQ,OAAA,CAAAc,EAAS,cAAA,CAAAC,CAAAA,CAAgB,eAAAC,CAAe,CAAA,CAAA,CAC3Hd,YACF,CAAA,CAEAO,CAAAA,GAEAL,SAAAA,CAAU,IAAM,CACda,CAAAA,GACF,EAAG,EAAE,EAEDZ,CAAAA,CAAAA,gBAAuC,CAAA,CACzC,OACEa,GAAAA,CAAAC,QAAAA,CAAA,CACG,QAAA,CAAAd,CAAAA,CAAAA,gBAAuC,EACtCa,GAAAA,CAAC,KAAA,CAAA,CACC,UAAW,CAAA,+BAAA,EACT,CAACb,iBAAsC,CAAA,EAAK,CAACA,gBAAqC,CAAA,EAAK,oBACzF,GAEA,QAAA,CAAAa,GAAAA,CAACR,EAAA,EAAU,CAAA,CACb,EAEAQ,GAAAA,CAAC,KAAA,CAAA,CAAI,UAAW,2BAAA,CACd,QAAA,CAAAA,IAACN,CAAAA,CAAA,EAAU,EACb,CAAA,CAEJ,CAEN,EAEOQ,CAAAA,CAAQP","file":"vodPlayer-JTS4WVOB.mjs","sourcesContent":["\"use client\";\n\nimport { shallowEqual } from \"react-redux\";\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\nimport useGetData from \"../../../helpers/hooks/useGetData/useGetData\";\nimport { conditions } from \"../../../helpers/conditions/conditions\";\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\nimport { handleApplyContinuousPlayback } from \"../../../helpers/redux/actions/user.actions\";\nimport dynamic from \"next/dynamic\";\nimport { useEffect } from \"react\";\n\nconst VideoArea = dynamic(() => import(\"../../custom-components/videoArea/videoArea\"));\nconst NotActive = dynamic(() => import(\"../../custom-components/notActive/notActive\"));\n\nconst VodPlayer = () => {\n useAppSelector(\n ({ videoData: { params, details, isFetchDetails, isValidAddress } }) => ({ params, details, isFetchDetails, isValidAddress }),\n shallowEqual,\n );\n\n useGetData();\n\n useEffect(() => {\n handleApplyContinuousPlayback();\n }, []);\n\n if (conditions(ConditionName.isFetchDetails))\n return (\n <>\n {conditions(ConditionName.isValidAddress) ? (\n <div\n className={`pl-max-h-[100dvh] pl-bg-dark-1 ${\n !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"\n }`}\n >\n <VideoArea />\n </div>\n ) : (\n <div className={`pl-w-full pl-aspect-video`}>\n <NotActive />\n </div>\n )}\n </>\n );\n};\n\nexport default VodPlayer;\n","import useGetDetails from \"./useGetDetails\";\nimport useGetMarkers from \"./useGetMarkers\";\n\nconst useGetData = () => {\n useGetDetails();\n // useGetMarkers();\n};\n\nexport default useGetData;\n","import { useEffect } from \"react\";\nimport { conditions } from \"../../conditions/conditions\";\nimport { shallowEqual } from \"react-redux\";\nimport { useAppSelector } from \"../../redux/hooks\";\nimport { ConditionName } from \"../../interfaces/enums\";\nimport { getVodDetails } from \"../../redux/actions/videoData.actions\";\n\nconst useGetDetails = () => {\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\n useAppSelector(({ controller: { isEnded } }) => ({ isEnded }), shallowEqual);\n\n useEffect(() => {\n if (conditions(ConditionName.getDetails)) getVodDetails();\n }, [params.id, params.type]);\n};\n\nexport default useGetDetails;\n"]}
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/components/videoPlayer/vodPlayer/vodPlayer.tsx","../src/videoPlayerLibrary/helpers/hooks/useGetData/useGetData.tsx","../src/videoPlayerLibrary/helpers/hooks/useGetData/useGetDetails.tsx"],"names":["init_esm_shims","useGetDetails","params","useAppSelector","shallowEqual","isEnded","useEffect","conditions","getVodDetails","useGetDetails_default","useGetData","useGetData_default","VideoArea","dynamic","NotActive","VodPlayer","details","isFetchDetails","isValidAddress","handleApplyContinuousPlayback","jsx","Fragment","vodPlayer_default"],"mappings":"2SAAAA,CAAAA,EAAAA,CCAAA,ICAAA,CAAAA,EAAAA,CAOA,IAAMC,CAAAA,CAAgB,IAAM,CAC1B,GAAM,CAAE,MAAA,CAAAC,CAAO,EAAIC,GAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,OAAAD,CAAO,CAAE,KAAO,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAA,CAAIE,YAAY,EAC3FD,GAAAA,CAAe,CAAC,CAAE,UAAA,CAAY,CAAE,QAAAE,CAAQ,CAAE,KAAO,CAAE,OAAA,CAAAA,CAAQ,CAAA,CAAA,CAAID,YAAY,EAE3EE,SAAAA,CAAU,IAAM,CACVC,CAAAA,CAAAA,YAAmC,CAAA,EAAGC,IAC5C,CAAA,CAAG,CAACN,CAAAA,CAAO,EAAA,CAAIA,EAAO,IAAI,CAAC,EAC7B,CAAA,CAEOO,CAAAA,CAAQR,EDbf,IAAMS,CAAAA,CAAa,IAAM,CACrBD,CAAAA,GAEJ,CAAA,CAEOE,CAAAA,CAAQD,EDGf,IAAME,CAAAA,CAAYC,EAAQ,IAAM,OAAO,0BAA6C,CAAC,CAAA,CAC/EC,EAAYD,CAAAA,CAAQ,IAAM,OAAO,0BAA6C,CAAC,EAE/EE,CAAAA,CAAY,IAAM,CAYtB,GAXAZ,GAAAA,CACE,CAAC,CAAE,SAAA,CAAW,CAAE,MAAA,CAAAD,CAAAA,CAAQ,QAAAc,CAAAA,CAAS,cAAA,CAAAC,EAAgB,cAAA,CAAAC,CAAe,CAAE,CAAA,IAAO,CAAE,OAAAhB,CAAAA,CAAQ,OAAA,CAAAc,EAAS,cAAA,CAAAC,CAAAA,CAAgB,eAAAC,CAAe,CAAA,CAAA,CAC3Hd,YACF,CAAA,CAEAO,CAAAA,GAEAL,SAAAA,CAAU,IAAM,CACda,CAAAA,GACF,EAAG,EAAE,EAEDZ,CAAAA,CAAAA,gBAAuC,CAAA,CACzC,OACEa,GAAAA,CAAAC,QAAAA,CAAA,CACG,QAAA,CAAAd,CAAAA,CAAAA,gBAAuC,EACtCa,GAAAA,CAAC,KAAA,CAAA,CACC,UAAW,CAAA,+BAAA,EACT,CAACb,iBAAsC,CAAA,EAAK,CAACA,gBAAqC,CAAA,EAAK,oBACzF,GAEA,QAAA,CAAAa,GAAAA,CAACR,EAAA,EAAU,CAAA,CACb,EAEAQ,GAAAA,CAAC,KAAA,CAAA,CAAI,UAAW,2BAAA,CACd,QAAA,CAAAA,IAACN,CAAAA,CAAA,EAAU,EACb,CAAA,CAEJ,CAEN,EAEOQ,CAAAA,CAAQP","file":"vodPlayer-BJ7FLFUB.mjs","sourcesContent":["\"use client\";\n\nimport { shallowEqual } from \"react-redux\";\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\nimport useGetData from \"../../../helpers/hooks/useGetData/useGetData\";\nimport { conditions } from \"../../../helpers/conditions/conditions\";\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\nimport { handleApplyContinuousPlayback } from \"../../../helpers/redux/actions/user.actions\";\nimport dynamic from \"next/dynamic\";\nimport { useEffect } from \"react\";\n\nconst VideoArea = dynamic(() => import(\"../../custom-components/videoArea/videoArea\"));\nconst NotActive = dynamic(() => import(\"../../custom-components/notActive/notActive\"));\n\nconst VodPlayer = () => {\n useAppSelector(\n ({ videoData: { params, details, isFetchDetails, isValidAddress } }) => ({ params, details, isFetchDetails, isValidAddress }),\n shallowEqual,\n );\n\n useGetData();\n\n useEffect(() => {\n handleApplyContinuousPlayback();\n }, []);\n\n if (conditions(ConditionName.isFetchDetails))\n return (\n <>\n {conditions(ConditionName.isValidAddress) ? (\n <div\n className={`pl-max-h-[100dvh] pl-bg-dark-1 ${\n !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"\n }`}\n >\n <VideoArea />\n </div>\n ) : (\n <div className={`pl-w-full pl-aspect-video`}>\n <NotActive />\n </div>\n )}\n </>\n );\n};\n\nexport default VodPlayer;\n","import useGetDetails from \"./useGetDetails\";\nimport useGetMarkers from \"./useGetMarkers\";\n\nconst useGetData = () => {\n useGetDetails();\n // useGetMarkers();\n};\n\nexport default useGetData;\n","import { useEffect } from \"react\";\nimport { conditions } from \"../../conditions/conditions\";\nimport { shallowEqual } from \"react-redux\";\nimport { useAppSelector } from \"../../redux/hooks\";\nimport { ConditionName } from \"../../interfaces/enums\";\nimport { getVodDetails } from \"../../redux/actions/videoData.actions\";\n\nconst useGetDetails = () => {\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\n useAppSelector(({ controller: { isEnded } }) => ({ isEnded }), shallowEqual);\n\n useEffect(() => {\n if (conditions(ConditionName.getDetails)) getVodDetails();\n }, [params.id, params.type]);\n};\n\nexport default useGetDetails;\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkZWGZGWEB_js=require('./chunk-ZWGZGWEB.js'),chunkBFE2RKVK_js=require('./chunk-BFE2RKVK.js'),chunkU3VFRU6R_js=require('./chunk-U3VFRU6R.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),reactRedux=require('react-redux'),react=require('react'),c=require('next/dynamic'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var c__default=/*#__PURE__*/_interopDefault(c);chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();var h=()=>{let{params:m}=chunkAN6JAJSI_js.A(({videoData:{params:e}})=>({params:e}),reactRedux.shallowEqual);chunkAN6JAJSI_js.A(({controller:{isEnded:e}})=>({isEnded:e}),reactRedux.shallowEqual),react.useEffect(()=>{chunkU3VFRU6R_js.t("getDetails")&&chunkBFE2RKVK_js.a();},[m.id,m.type]);},d=h;var A=()=>{d();},f=A;var N=c__default.default(()=>import('./videoArea-35ABV3CM.js')),x=c__default.default(()=>import('./notActive-DRH5BEL5.js')),E=()=>{if(chunkAN6JAJSI_js.A(({videoData:{params:m,details:e,isFetchDetails:n,isValidAddress:u}})=>({params:m,details:e,isFetchDetails:n,isValidAddress:u}),reactRedux.shallowEqual),f(),react.useEffect(()=>{chunkZWGZGWEB_js.b();},[]),chunkU3VFRU6R_js.t("isFetchDetails"))return jsxRuntime.jsx(jsxRuntime.Fragment,{children:chunkU3VFRU6R_js.t("isValidAddress")?jsxRuntime.jsx("div",{className:`pl-max-h-[100dvh] pl-bg-dark-1 ${!chunkU3VFRU6R_js.t("isTouchScreen")&&!chunkU3VFRU6R_js.t("isFullScreen")&&"!pl-rounded-[12px]"}`,children:jsxRuntime.jsx(N,{})}):jsxRuntime.jsx("div",{className:"pl-w-full pl-aspect-video",children:jsxRuntime.jsx(x,{})})})},O=E;module.exports=O;//# sourceMappingURL=vodPlayer-337TYSU4.js.map
2
- //# sourceMappingURL=vodPlayer-337TYSU4.js.map
1
+ 'use strict';var chunk3TPEXSZV_js=require('./chunk-3TPEXSZV.js'),chunk5UGSCO4K_js=require('./chunk-5UGSCO4K.js'),chunkVUHZVVMS_js=require('./chunk-VUHZVVMS.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),reactRedux=require('react-redux'),react=require('react'),c=require('next/dynamic'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var c__default=/*#__PURE__*/_interopDefault(c);chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();var h=()=>{let{params:m}=chunkAN6JAJSI_js.A(({videoData:{params:e}})=>({params:e}),reactRedux.shallowEqual);chunkAN6JAJSI_js.A(({controller:{isEnded:e}})=>({isEnded:e}),reactRedux.shallowEqual),react.useEffect(()=>{chunkVUHZVVMS_js.t("getDetails")&&chunk5UGSCO4K_js.a();},[m.id,m.type]);},d=h;var A=()=>{d();},f=A;var N=c__default.default(()=>import('./videoArea-J6ITRRDQ.js')),x=c__default.default(()=>import('./notActive-DRH5BEL5.js')),E=()=>{if(chunkAN6JAJSI_js.A(({videoData:{params:m,details:e,isFetchDetails:n,isValidAddress:u}})=>({params:m,details:e,isFetchDetails:n,isValidAddress:u}),reactRedux.shallowEqual),f(),react.useEffect(()=>{chunk3TPEXSZV_js.b();},[]),chunkVUHZVVMS_js.t("isFetchDetails"))return jsxRuntime.jsx(jsxRuntime.Fragment,{children:chunkVUHZVVMS_js.t("isValidAddress")?jsxRuntime.jsx("div",{className:`pl-max-h-[100dvh] pl-bg-dark-1 ${!chunkVUHZVVMS_js.t("isTouchScreen")&&!chunkVUHZVVMS_js.t("isFullScreen")&&"!pl-rounded-[12px]"}`,children:jsxRuntime.jsx(N,{})}):jsxRuntime.jsx("div",{className:"pl-w-full pl-aspect-video",children:jsxRuntime.jsx(x,{})})})},O=E;module.exports=O;//# sourceMappingURL=vodPlayer-PFFEBJFX.js.map
2
+ //# sourceMappingURL=vodPlayer-PFFEBJFX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/components/videoPlayer/vodPlayer/vodPlayer.tsx","../src/videoPlayerLibrary/helpers/hooks/useGetData/useGetData.tsx","../src/videoPlayerLibrary/helpers/hooks/useGetData/useGetDetails.tsx"],"names":["init_cjs_shims","useGetDetails","params","useAppSelector","shallowEqual","isEnded","useEffect","conditions","getVodDetails","useGetDetails_default","useGetData","useGetData_default","VideoArea","dynamic","NotActive","VodPlayer","details","isFetchDetails","isValidAddress","handleApplyContinuousPlayback","jsx","Fragment","vodPlayer_default"],"mappings":"4bAAAA,kBAAAA,EAAAA,CCAAA,qBCAAA,kBAAAA,EAAAA,CAOA,IAAMC,CAAAA,CAAgB,IAAM,CAC1B,GAAM,CAAE,MAAA,CAAAC,CAAO,EAAIC,kBAAAA,CA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C,CAAA,EAAK,oBACzF,GAEA,QAAA,CAAAa,cAAAA,CAACR,EAAA,EAAU,CAAA,CACb,EAEAQ,cAAAA,CAAC,KAAA,CAAA,CAAI,UAAW,2BAAA,CACd,QAAA,CAAAA,eAACN,CAAAA,CAAA,EAAU,EACb,CAAA,CAEJ,CAEN,EAEOQ,CAAAA,CAAQP","file":"vodPlayer-337TYSU4.js","sourcesContent":["\"use client\";\n\nimport { shallowEqual } from \"react-redux\";\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\nimport useGetData from \"../../../helpers/hooks/useGetData/useGetData\";\nimport { conditions } from \"../../../helpers/conditions/conditions\";\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\nimport { handleApplyContinuousPlayback } from \"../../../helpers/redux/actions/user.actions\";\nimport dynamic from \"next/dynamic\";\nimport { useEffect } from \"react\";\n\nconst VideoArea = dynamic(() => import(\"../../custom-components/videoArea/videoArea\"));\nconst NotActive = dynamic(() => import(\"../../custom-components/notActive/notActive\"));\n\nconst VodPlayer = () => {\n useAppSelector(\n ({ videoData: { params, details, isFetchDetails, isValidAddress } }) => ({ params, details, isFetchDetails, isValidAddress }),\n shallowEqual,\n );\n\n useGetData();\n\n useEffect(() => {\n handleApplyContinuousPlayback();\n }, []);\n\n if (conditions(ConditionName.isFetchDetails))\n return (\n <>\n {conditions(ConditionName.isValidAddress) ? (\n <div\n className={`pl-max-h-[100dvh] pl-bg-dark-1 ${\n !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"\n }`}\n >\n <VideoArea />\n </div>\n ) : (\n <div className={`pl-w-full pl-aspect-video`}>\n <NotActive />\n </div>\n )}\n </>\n );\n};\n\nexport default VodPlayer;\n","import useGetDetails from \"./useGetDetails\";\nimport useGetMarkers from \"./useGetMarkers\";\n\nconst useGetData = () => {\n useGetDetails();\n // useGetMarkers();\n};\n\nexport default useGetData;\n","import { useEffect } from \"react\";\nimport { conditions } from \"../../conditions/conditions\";\nimport { shallowEqual } from \"react-redux\";\nimport { useAppSelector } from \"../../redux/hooks\";\nimport { ConditionName } from \"../../interfaces/enums\";\nimport { getVodDetails } from \"../../redux/actions/videoData.actions\";\n\nconst useGetDetails = () => {\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\n useAppSelector(({ controller: { isEnded } }) => ({ isEnded }), shallowEqual);\n\n useEffect(() => {\n if (conditions(ConditionName.getDetails)) getVodDetails();\n }, [params.id, params.type]);\n};\n\nexport default useGetDetails;\n"]}
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/components/videoPlayer/vodPlayer/vodPlayer.tsx","../src/videoPlayerLibrary/helpers/hooks/useGetData/useGetData.tsx","../src/videoPlayerLibrary/helpers/hooks/useGetData/useGetDetails.tsx"],"names":["init_cjs_shims","useGetDetails","params","useAppSelector","shallowEqual","isEnded","useEffect","conditions","getVodDetails","useGetDetails_default","useGetData","useGetData_default","VideoArea","dynamic","NotActive","VodPlayer","details","isFetchDetails","isValidAddress","handleApplyContinuousPlayback","jsx","Fragment","vodPlayer_default"],"mappings":"4bAAAA,kBAAAA,EAAAA,CCAAA,qBCAAA,kBAAAA,EAAAA,CAOA,IAAMC,CAAAA,CAAgB,IAAM,CAC1B,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,EAC3FD,kBAAAA,CAAe,CAAC,CAAE,UAAA,CAAY,CAAE,QAAAE,CAAQ,CAAE,KAAO,CAAE,OAAA,CAAAA,CAAQ,CAAA,CAAA,CAAID,uBAAY,EAE3EE,eAAAA,CAAU,IAAM,CACVC,kBAAAA,CAAAA,YAAmC,CAAA,EAAGC,qBAC5C,CAAA,CAAG,CAACN,CAAAA,CAAO,EAAA,CAAIA,EAAO,IAAI,CAAC,EAC7B,CAAA,CAEOO,CAAAA,CAAQR,EDbf,IAAMS,CAAAA,CAAa,IAAM,CACrBD,CAAAA,GAEJ,CAAA,CAEOE,CAAAA,CAAQD,EDGf,IAAME,CAAAA,CAAYC,mBAAQ,IAAM,OAAO,yBAA6C,CAAC,CAAA,CAC/EC,EAAYD,kBAAAA,CAAQ,IAAM,OAAO,yBAA6C,CAAC,EAE/EE,CAAAA,CAAY,IAAM,CAYtB,GAXAZ,kBAAAA,CACE,CAAC,CAAE,SAAA,CAAW,CAAE,MAAA,CAAAD,CAAAA,CAAQ,QAAAc,CAAAA,CAAS,cAAA,CAAAC,EAAgB,cAAA,CAAAC,CAAe,CAAE,CAAA,IAAO,CAAE,OAAAhB,CAAAA,CAAQ,OAAA,CAAAc,EAAS,cAAA,CAAAC,CAAAA,CAAgB,eAAAC,CAAe,CAAA,CAAA,CAC3Hd,uBACF,CAAA,CAEAO,CAAAA,GAEAL,eAAAA,CAAU,IAAM,CACda,kBAAAA,GACF,EAAG,EAAE,EAEDZ,kBAAAA,CAAAA,gBAAuC,CAAA,CACzC,OACEa,cAAAA,CAAAC,mBAAAA,CAAA,CACG,QAAA,CAAAd,kBAAAA,CAAAA,gBAAuC,EACtCa,cAAAA,CAAC,KAAA,CAAA,CACC,UAAW,CAAA,+BAAA,EACT,CAACb,kCAAsC,CAAA,EAAK,CAACA,iCAAqC,CAAA,EAAK,oBACzF,GAEA,QAAA,CAAAa,cAAAA,CAACR,EAAA,EAAU,CAAA,CACb,EAEAQ,cAAAA,CAAC,KAAA,CAAA,CAAI,UAAW,2BAAA,CACd,QAAA,CAAAA,eAACN,CAAAA,CAAA,EAAU,EACb,CAAA,CAEJ,CAEN,EAEOQ,CAAAA,CAAQP","file":"vodPlayer-PFFEBJFX.js","sourcesContent":["\"use client\";\n\nimport { shallowEqual } from \"react-redux\";\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\nimport useGetData from \"../../../helpers/hooks/useGetData/useGetData\";\nimport { conditions } from \"../../../helpers/conditions/conditions\";\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\nimport { handleApplyContinuousPlayback } from \"../../../helpers/redux/actions/user.actions\";\nimport dynamic from \"next/dynamic\";\nimport { useEffect } from \"react\";\n\nconst VideoArea = dynamic(() => import(\"../../custom-components/videoArea/videoArea\"));\nconst NotActive = dynamic(() => import(\"../../custom-components/notActive/notActive\"));\n\nconst VodPlayer = () => {\n useAppSelector(\n ({ videoData: { params, details, isFetchDetails, isValidAddress } }) => ({ params, details, isFetchDetails, isValidAddress }),\n shallowEqual,\n );\n\n useGetData();\n\n useEffect(() => {\n handleApplyContinuousPlayback();\n }, []);\n\n if (conditions(ConditionName.isFetchDetails))\n return (\n <>\n {conditions(ConditionName.isValidAddress) ? (\n <div\n className={`pl-max-h-[100dvh] pl-bg-dark-1 ${\n !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"\n }`}\n >\n <VideoArea />\n </div>\n ) : (\n <div className={`pl-w-full pl-aspect-video`}>\n <NotActive />\n </div>\n )}\n </>\n );\n};\n\nexport default VodPlayer;\n","import useGetDetails from \"./useGetDetails\";\nimport useGetMarkers from \"./useGetMarkers\";\n\nconst useGetData = () => {\n useGetDetails();\n // useGetMarkers();\n};\n\nexport default useGetData;\n","import { useEffect } from \"react\";\nimport { conditions } from \"../../conditions/conditions\";\nimport { shallowEqual } from \"react-redux\";\nimport { useAppSelector } from \"../../redux/hooks\";\nimport { ConditionName } from \"../../interfaces/enums\";\nimport { getVodDetails } from \"../../redux/actions/videoData.actions\";\n\nconst useGetDetails = () => {\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\n useAppSelector(({ controller: { isEnded } }) => ({ isEnded }), shallowEqual);\n\n useEffect(() => {\n if (conditions(ConditionName.getDetails)) getVodDetails();\n }, [params.id, params.type]);\n};\n\nexport default useGetDetails;\n"]}
package/chunk-BFE2RKVK.js DELETED
@@ -1,3 +0,0 @@
1
- 'use strict';var chunkU3VFRU6R_js=require('./chunk-U3VFRU6R.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),M=require('axios');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var M__default=/*#__PURE__*/_interopDefault(M);chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();var L=t=>{let{params:s}=chunkU3VFRU6R_js.Aa.getState().videoData;return chunkU3VFRU6R_js.v().vod.getVodUrl+(t||s.id)},a={url:"",maxRetryCount:0,headers:{},retryPolicy:[],errorCallback:void 0},F=t=>(a.url=L(t),a.maxRetryCount=3,a.retryPolicy=[{codeAbove:500,codeBelow:null,excludeCodes:[],includeCodes:[409],delay:1,count:3},{codeAbove:null,codeBelow:404,excludeCodes:[403,402,401,400],includeCodes:[],delay:10,count:6}],a),A=t=>(F(t),a);var it=async t=>{let s=chunkU3VFRU6R_js.Aa.dispatch;try{let e=await chunkU3VFRU6R_js.Q({...A(t)});if(chunkU3VFRU6R_js.na(e.status)){if(await M__default.default.head("https://"+chunkU3VFRU6R_js.pa(e.data.hls_links)+e.data.path),t)return s(chunkU3VFRU6R_js.S(e.data));N(e.data),!chunkU3VFRU6R_js.t("hasRawSubtitles")&&e?.data?.subtitles&&U(e.data.subtitles);}else throw new Error(JSON.stringify({status:e.status,message:e.data}))}catch{s(chunkU3VFRU6R_js.d(true)),s(chunkU3VFRU6R_js.e(false));}},N=async t=>{let s=chunkU3VFRU6R_js.Aa.dispatch,e={...t,subtitles:void 0,stream_link:!!t.stream_link&&chunkU3VFRU6R_js.ja("https://"+chunkU3VFRU6R_js.pa(t.hls_links)+t.path)};s(chunkU3VFRU6R_js.a(e)),s(chunkU3VFRU6R_js.d(true)),s(chunkU3VFRU6R_js.e(true));},U=async t=>{let s=chunkU3VFRU6R_js.Aa.dispatch,e=await G(t);s(chunkU3VFRU6R_js.h(e));},at=t=>{let s=chunkU3VFRU6R_js.Aa.dispatch,{subtitles:e,selectedSubtitle:l,params:r}=chunkU3VFRU6R_js.Aa.getState().videoData,i=chunkU3VFRU6R_js.x();if(!i)return null;let k=()=>{let o=Array.from(i.textTracks).find(u=>u.mode==="showing");o&&(o.mode="disabled");},b=(o,u)=>{let _=chunkU3VFRU6R_js.Aa.getState().videoData.rawSubtitles;r.onSubtitleStatusChange?.(o?_?.find(B=>B.lang===o)??null:null,u);},P=o=>{o&&(o.mode="showing",s(chunkU3VFRU6R_js.k(o)),chunkU3VFRU6R_js.w(chunkU3VFRU6R_js.N(o.language)),b(o.language,true));};if(l&&!t){k(),s(chunkU3VFRU6R_js.k(void 0)),chunkU3VFRU6R_js.w(chunkU3VFRU6R_js.N("empty")),b(null,false);return}let V=t??"fa",R=e.find(o=>o.language===V)??i?.textTracks?.[0];P(R);},G=async t=>{let s=t.map(async r=>{try{return (await fetch(r.url,{method:"HEAD"})).ok?r:null}catch(i){return console.error("Error fetching subtitle:",r.url,i),null}}),l=(await Promise.all(s)).filter(r=>r!==null);return l.length?l:null};
2
- exports.a=it;exports.b=at;exports.c=G;//# sourceMappingURL=chunk-BFE2RKVK.js.map
3
- //# sourceMappingURL=chunk-BFE2RKVK.js.map
package/chunk-DJ6KVZRK.js DELETED
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkBFE2RKVK_js=require('./chunk-BFE2RKVK.js'),chunkU3VFRU6R_js=require('./chunk-U3VFRU6R.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js');chunkAN6JAJSI_js.e();var he=e=>{e.preventDefault();let t=(chunkU3VFRU6R_js.x()||chunkU3VFRU6R_js.y()).error;if(t)switch(t.code){case t.MEDIA_ERR_ABORTED:chunkU3VFRU6R_js.P({type:"videoTagError",message:"You aborted the video playback."});break;case t.MEDIA_ERR_NETWORK:chunkU3VFRU6R_js.P({type:"videoTagError",message:"A network error caused the video download to fail part-way."});break;case t.MEDIA_ERR_DECODE:chunkU3VFRU6R_js.P({type:"videoTagError",message:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support."});break;case t.MEDIA_ERR_SRC_NOT_SUPPORTED:chunkU3VFRU6R_js.P({type:"videoTagError",message:"The video could not be loaded, either because the server or network failed or because the format is not supported."});break;default:chunkU3VFRU6R_js.P({type:"videoTagError",message:"An unknown error occurred."});break}else chunkU3VFRU6R_js.P({type:"videoTagError",message:"An error occurred, but the error object is not available."});},G=()=>{let e=chunkU3VFRU6R_js.Aa.dispatch,{params:t}=chunkU3VFRU6R_js.Aa.getState().videoData,a=n=>{n.requestFullScreen?n.requestFullScreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullScreen&&n.webkitRequestFullScreen();};e(chunkU3VFRU6R_js.s()),a(document.documentElement),e(chunkAN6JAJSI_js.m(t.fullscreen==="true"));},ge=()=>{let e=".ts",t=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){arguments[1].endsWith(e)&&(arguments[1]=arguments[1]+"?uuid="+chunkU3VFRU6R_js.ga()),t.apply(this,arguments);};},Z=(e,t)=>{let a=chunkU3VFRU6R_js.Aa.dispatch;t.current=setInterval(()=>{if(e.buffered.length>0&&e.duration>0){let o=e.buffered.end(e.buffered.length-1)/e.duration*100;a(chunkAN6JAJSI_js.n(o));}else a(chunkAN6JAJSI_js.n(0));},500);},Te=()=>{let e=chunkU3VFRU6R_js.la("mainPlayer");return {xhrSetup:(t,a)=>{a?.split("m3u8")[1]||(a=`${a}${e}`),t.open("GET",a,true);},startLevel:-1,debug:false,enableWorker:true,abrBandWidthUpFactor:.7,abrBandWidthFactor:.95,backBufferLength:1/0,maxBufferLength:30,maxMaxBufferLength:60,manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}}}},xe=()=>{let e=chunkU3VFRU6R_js.la("miniPlayer");return {xhrSetup:(t,a)=>{a=`${a}${e}`,t.open("GET",a,true);},startLevel:1,debug:false,maxMaxBufferLength:60,playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1e3,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1e3,retryDelayMs:1e3,maxRetryDelayMs:1e3}}}}},Se=(e,t)=>{let a=chunkU3VFRU6R_js.Aa.dispatch,n=[],o=[];if(e.levels.map(i=>{n.push(i.attrs.RESOLUTION?.split("x")[1].trim()),o.push(i.attrs.RESOLUTION);}),e.autoLevelCapping=chunkU3VFRU6R_js.ra(o,window.innerWidth,window.innerHeight),a(chunkAN6JAJSI_js.i(n)),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"].forEach(i=>document.addEventListener(i,()=>{chunkU3VFRU6R_js.t("isAutoQuality")&&(e.autoLevelCapping=chunkU3VFRU6R_js.ra(o,window.innerWidth,window.innerHeight),e.nextLevel=-1);},false)),t.audioTracks.length>0){let i=t.audioTracks.sort(l=>l.default===true?-1:1);a(chunkU3VFRU6R_js.l(i));}},X=(e,t,a)=>{if(t.frag.type!=="audio"){let n=chunkU3VFRU6R_js.Aa.dispatch,{settings:o}=chunkU3VFRU6R_js.Aa.getState().user,{qualityLevels:i,manualQuality:l,autoQuality:h}=chunkU3VFRU6R_js.Aa.getState().controller;chunkU3VFRU6R_js.t("isAutoQuality")?chunkU3VFRU6R_js.t("isAutoQuality")&&h===void 0?(e.nextLevel=-1,a(i[t.frag.level]),n(chunkAN6JAJSI_js.j(t.frag.level))):chunkU3VFRU6R_js.t("isAutoQuality")&&(a(i[t.frag.level]),h!==t.frag.level&&n(chunkAN6JAJSI_js.j(t.frag.level))):(t.frag.level!==l&&(e.nextLevel=i[o.quality]?o.quality:-1),i[o.quality]?(n(chunkAN6JAJSI_js.r(o.quality)),n(chunkAN6JAJSI_js.j(void 0))):(a(i[t.frag.level]),n(chunkAN6JAJSI_js.j(t.frag.level)),n(chunkU3VFRU6R_js.ya({...o,quality:-1}))));}},De=(e,t)=>{let a=chunkU3VFRU6R_js.Aa.dispatch,o=e.mainForwardBufferInfo?.end/t.duration*100;a(chunkAN6JAJSI_js.n(o));},ve=(e,t,a)=>{let{params:n,multiAudio:o,selectedAudioId:i}=chunkU3VFRU6R_js.Aa.getState().videoData;o&&i!==void 0&&i!==e.audioTrack&&(e.audioTrack=i),n.type&&X(e,t,a);},Pe=(e,t,a)=>{let{type:n}=chunkU3VFRU6R_js.Aa.getState().videoData.params;n&&X(e,t,a);},Le=e=>{if(e.event!=="hlsAudioTrackLoading")return {type:"HLS_"+e.type,message:e.error.message}},Me=(e,t)=>{let a=chunkU3VFRU6R_js.Aa.dispatch;e.preventDefault(),t.current=Date.now(),a(chunkAN6JAJSI_js.l(true));},be=(e,t)=>{if(chunkU3VFRU6R_js.t("isIOS")&&chunkU3VFRU6R_js.t("isFirstPlay"))return;let a=chunkU3VFRU6R_js.Aa.dispatch;e.preventDefault(),t.current=0,a(chunkAN6JAJSI_js.l(true));},Ee=(e,t,a)=>{let n=chunkU3VFRU6R_js.Aa.dispatch,{videoSettings:o}=chunkU3VFRU6R_js.Aa.getState().user,{params:i}=chunkU3VFRU6R_js.Aa.getState().videoData,{currentTime:l}=chunkU3VFRU6R_js.Aa.getState().controller;e.preventDefault(),t.current=Date.now(),n(chunkAN6JAJSI_js.f(true)),chunkU3VFRU6R_js.t("hasOnPlayParams")&&i.onPlay(l),chunkU3VFRU6R_js.t("isFirstPlay")&&(chunkU3VFRU6R_js.t("hasCurrentTimeParams")||(a.currentTime=o.time,n(chunkAN6JAJSI_js.h(o.time))),chunkU3VFRU6R_js.t("hasFullScreenParams")&&G(),chunkU3VFRU6R_js.t("isFullScreen")&&chunkU3VFRU6R_js.$(),n(chunkU3VFRU6R_js.f([Math.floor(a.currentTime)])),chunkU3VFRU6R_js.t("hasRawSubtitles")&&chunkBFE2RKVK_js.b()),chunkU3VFRU6R_js.w(chunkU3VFRU6R_js.K(true)),n(chunkU3VFRU6R_js.j(""));},Re=(e,t,a,n,o,i,l,h,j)=>{let K=chunkU3VFRU6R_js.Aa.dispatch,{autoQuality:w,canPlayVideo:Y,firstPlay:J,qualityLevels:C}=chunkU3VFRU6R_js.Aa.getState().controller,{settings:k}=chunkU3VFRU6R_js.Aa.getState().user,A=k.quality===-1&&w?C[w]:C[k.quality],g=0;l.current&&(g=Date.now()-l.current),J&&j.played&&chunkU3VFRU6R_js.w(chunkU3VFRU6R_js.L(t.current,Date.now()-a.current,n.current-a.current,Date.now()-o.current,o)),K(chunkAN6JAJSI_js.o(false)),Y&&g>0&&A!==void 0&&(i.current=g,l.current=0,chunkU3VFRU6R_js.w(chunkU3VFRU6R_js.M(g,A,o,e,h.current)),e.current=e.current+1,o.current=Date.now());},Ve=e=>{let t=chunkU3VFRU6R_js.Aa.dispatch,{params:a}=chunkU3VFRU6R_js.Aa.getState().videoData;e.preventDefault(),chunkU3VFRU6R_js.w(chunkU3VFRU6R_js.K(false)),t(chunkAN6JAJSI_js.f(false)),chunkU3VFRU6R_js.t("hasOnPauseParams")&&a.onPause();},Fe=e=>{let t=chunkU3VFRU6R_js.Aa.dispatch,{onChangeCurrentTime:a}=chunkU3VFRU6R_js.Aa.getState().videoData.params,{selectedSubtitle:n}=chunkU3VFRU6R_js.Aa.getState().videoData;e.preventDefault(),t(chunkAN6JAJSI_js.h(e.target.currentTime)),chunkU3VFRU6R_js.t("hasOnChangeCurrentTime")&&a(e.target.currentTime),chunkU3VFRU6R_js.t("hasActiveCue")&&t(chunkU3VFRU6R_js.j(n.activeCues[0].text));},we=e=>{let t=chunkU3VFRU6R_js.Aa.dispatch,{settings:a}=chunkU3VFRU6R_js.Aa.getState().user;t(chunkAN6JAJSI_js.l(false)),t(chunkAN6JAJSI_js.s(true)),e.volume=a.volume/100,t(chunkAN6JAJSI_js.g(e.duration));},Ce=(e,t)=>{let a=chunkU3VFRU6R_js.Aa.dispatch,{params:n}=chunkU3VFRU6R_js.Aa.getState().videoData;e.preventDefault(),a(chunkAN6JAJSI_js.u(true)),a(chunkAN6JAJSI_js.k(true)),chunkU3VFRU6R_js.ba(t.duration),chunkU3VFRU6R_js.t("hasOnFinishedParams")&&n.onFinished();},ke=(e,t)=>{e.preventDefault(),t.current=Date.now();},Ae=()=>{let e=chunkU3VFRU6R_js.Aa.dispatch;e(chunkAN6JAJSI_js.l(false)),e(chunkAN6JAJSI_js.o(false));},Oe=e=>{let{onChangeCurrentTime:t}=chunkU3VFRU6R_js.Aa.getState().videoData.params,a=chunkU3VFRU6R_js.Aa.dispatch;e.preventDefault(),chunkU3VFRU6R_js.t("hasOnChangeCurrentTime")&&t(e.target.currentTime),a(chunkAN6JAJSI_js.h(e.target.currentTime));},Ie=()=>{let e=chunkU3VFRU6R_js.Aa.dispatch,{params:t}=chunkU3VFRU6R_js.Aa.getState().videoData;e(chunkAN6JAJSI_js.u(true)),e(chunkAN6JAJSI_js.k(true)),chunkU3VFRU6R_js.t("hasOnFinishedParams")&&t.onFinished();},qe=e=>{let t=chunkU3VFRU6R_js.Aa.dispatch;e.preventDefault(),t(chunkAN6JAJSI_js.f(false));},He=(e,t)=>{let a=chunkU3VFRU6R_js.Aa.dispatch,{params:n}=chunkU3VFRU6R_js.Aa.getState().videoData,{currentTime:o}=chunkU3VFRU6R_js.Aa.getState().controller;e.preventDefault(),a(chunkAN6JAJSI_js.f(true)),t.current=Date.now(),a(chunkU3VFRU6R_js.j("")),chunkU3VFRU6R_js.t("hasOnPlayParams")&&n.onPlay(o),chunkU3VFRU6R_js.t("isFirstPlay")&&(chunkU3VFRU6R_js.t("hasRawSubtitles")&&chunkBFE2RKVK_js.b(),chunkU3VFRU6R_js.t("hasFullScreenParams")&&(G(),chunkU3VFRU6R_js.t("isFullScreen")&&chunkU3VFRU6R_js.$()));},Be=(e,t,a,n)=>{let o=chunkU3VFRU6R_js.Aa.dispatch,{firstPlay:i}=chunkU3VFRU6R_js.Aa.getState().controller;o(chunkAN6JAJSI_js.l(false)),i&&n.played&&chunkU3VFRU6R_js.w(chunkU3VFRU6R_js.L(Math.round(e.current),Date.now()-t.current,0,Date.now()-a.current,a)),o(chunkAN6JAJSI_js.o(false));},Ne=e=>{let{onChangeCurrentTime:t}=chunkU3VFRU6R_js.Aa.getState().videoData.params,a=chunkU3VFRU6R_js.Aa.dispatch,{selectedSubtitle:n}=chunkU3VFRU6R_js.Aa.getState().videoData;e.preventDefault(),a(chunkAN6JAJSI_js.h(e.target.currentTime)),a(chunkAN6JAJSI_js.g(e.target.duration)),chunkU3VFRU6R_js.t("hasOnChangeCurrentTime")&&t(e.target.currentTime),chunkU3VFRU6R_js.t("hasActiveCue")&&a(chunkU3VFRU6R_js.j(n.activeCues[0].text));},_e=()=>{let e=chunkU3VFRU6R_js.Aa.dispatch;e(chunkAN6JAJSI_js.l(false)),e(chunkAN6JAJSI_js.s(true));},Qe=(e,t)=>Z(t,e),Ue=e=>{let t=chunkU3VFRU6R_js.Aa.dispatch,{params:a}=chunkU3VFRU6R_js.Aa.getState().videoData;t(chunkAN6JAJSI_js.u(true)),t(chunkAN6JAJSI_js.k(true)),chunkU3VFRU6R_js.t("hasOnFinishedParams")&&a.onFinished(),e.preventDefault();},We=async e=>{let{stream_link:t}=chunkU3VFRU6R_js.Aa.getState().miniPlayer.details;e.loadSource(t);},$e=e=>chunkU3VFRU6R_js.ba(e.currentTime);exports.A=Qe;exports.B=Ue;exports.C=We;exports.D=$e;exports.a=he;exports.b=ge;exports.c=Te;exports.d=xe;exports.e=Se;exports.f=De;exports.g=ve;exports.h=Pe;exports.i=Le;exports.j=Me;exports.k=be;exports.l=Ee;exports.m=Re;exports.n=Ve;exports.o=Fe;exports.p=we;exports.q=Ce;exports.r=ke;exports.s=Ae;exports.t=Oe;exports.u=Ie;exports.v=qe;exports.w=He;exports.x=Be;exports.y=Ne;exports.z=_e;//# sourceMappingURL=chunk-DJ6KVZRK.js.map
2
- //# sourceMappingURL=chunk-DJ6KVZRK.js.map
package/chunk-OGCKLRYP.js DELETED
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkCOYFW7R4_js=require('./chunk-COYFW7R4.js'),chunkU3VFRU6R_js=require('./chunk-U3VFRU6R.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),react=require('react'),reactRedux=require('react-redux'),jsxRuntime=require('react/jsx-runtime'),V=require('next/image');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var V__default=/*#__PURE__*/_interopDefault(V);chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();var A=({title:n,className:i})=>jsxRuntime.jsx("span",{className:`pl-absolute pl-w-max pl-bg-black/75 pl-text-white pl-rounded-[8px] pl-leading-[18px] pl-flex pl-items-center pl-justify-center pl-font-normal ${chunkU3VFRU6R_js.t("isFullScreen")?"pl-bottom-[150%] pl-h-[34px] pl-px-[9.5px] pl-text-[15px]":"pl-h-6 pl-bottom-[130%] pl-px-[9px] pl-text-[12px]"} ${i}`,children:n}),h=A;var O=({width:n,height:i})=>{let[S,u]=react.useState(false),m=chunkAN6JAJSI_js.z(),{settings:l}=chunkAN6JAJSI_js.A(({user:{settings:o}})=>({settings:o}),reactRedux.shallowEqual),s=react.useRef(l.volume),y=()=>{if(s.current!==l.volume){let{settings:o}=chunkU3VFRU6R_js.Aa.getState().user;chunkU3VFRU6R_js.w(chunkU3VFRU6R_js.H(s.current,o.volume)),s.current=o.volume,m(chunkU3VFRU6R_js.ya({...o,volume:o.volume}));}},v=o=>{let{settings:b}=chunkU3VFRU6R_js.Aa.getState().user;o==="mute"?(chunkU3VFRU6R_js.Y(0),chunkU3VFRU6R_js.w(chunkU3VFRU6R_js.H(b.volume,0))):(chunkU3VFRU6R_js.w(chunkU3VFRU6R_js.H(b.volume,100)),chunkU3VFRU6R_js.Y(100));};return jsxRuntime.jsxs("div",{onMouseOver:()=>!chunkU3VFRU6R_js.t("isTouchScreen")&&u(true),onMouseLeave:()=>!chunkU3VFRU6R_js.t("isTouchScreen")&&u(false),id:chunkU3VFRU6R_js.t("hasSound")?"mute":"unmute",className:chunkU3VFRU6R_js.ea("pl-relative pl-rounded-full pl-inline-flex pl-items-center pl-justify-center pl-group pl-bg-black/75 pl-sound-icon",{desktop:"pl-min-w-[34px] pl-h-[34px] pl-p-1",desktopFullScreen:"pl-min-w-[48px] pl-h-[48px] pl-p-0 pl-px-1.5"}),children:[jsxRuntime.jsxs("div",{className:chunkU3VFRU6R_js.ea("pl-flex pl-items-center pl-justify-center pl-rounded-full group-hover:pl-bg-[#5E5E5E] pl-transition-all",{desktop:"pl-h-[26px] pl-min-w-[26px] group-hover:pl-ps-1 pl-gap-1",desktopFullScreen:"pl-h-[36px] pl-min-w-[36px] group-hover:pl-ps-1.5 pl-gap-1.5"}),children:[!chunkU3VFRU6R_js.t("isTouchScreen")&&jsxRuntime.jsx("input",{onMouseUp:y,type:"range",min:"0",max:"100",value:l.volume,onChange:o=>chunkU3VFRU6R_js.Y(+o.target.value),className:`pl-soundVolume ${chunkU3VFRU6R_js.t("isFullScreen")&&"pl-soundVolume-fullscreen"} pl-cursor-pointer rounded-full`,style:{background:`linear-gradient(to right, white ${l.volume}%, rgba(255,255,255,0.3) 0)`}}),jsxRuntime.jsx("div",{onClick:()=>chunkU3VFRU6R_js.t("hasSound")?v("mute"):v("unmute"),onDoubleClick:o=>o.stopPropagation(),className:chunkU3VFRU6R_js.ea("pl-relative pl-flex pl-items-center pl-shrink-0 pl-me-[5px]",{desktop:"",desktopFullScreen:""}),children:jsxRuntime.jsx(V__default.default,{src:chunkU3VFRU6R_js.t("hasSound")?l.volume>=50?chunkCOYFW7R4_js.a.unMute:chunkCOYFW7R4_js.a.lowSound:chunkCOYFW7R4_js.a.mute,alt:chunkU3VFRU6R_js.t("hasSound")?"unmute-icon":"mute-icon",className:"pl-flex pl-items-center pl-cursor-pointer",width:n,height:i})})]}),S&&jsxRuntime.jsx(h,{className:"pl-left-0",title:chunkU3VFRU6R_js.t("hasSound")?"\u0635\u062F\u0627 (M)":"\u0628\u06CC\u200C\u0635\u062F\u0627 (M)"})]})},ie=O;chunkAN6JAJSI_js.e();var G=({width:n,height:i,className:S})=>{chunkAN6JAJSI_js.A(({controller:{firstPlay:l,isFullScreen:s}})=>({firstPlay:l,isFullScreen:s}),reactRedux.shallowEqual);let[u,m]=react.useState(false);return jsxRuntime.jsxs("div",{onDoubleClick:l=>l.preventDefault(),onMouseOver:()=>!chunkU3VFRU6R_js.t("isTouchScreen")&&m(true),onMouseLeave:()=>!chunkU3VFRU6R_js.t("isTouchScreen")&&m(false),onClick:()=>{chunkU3VFRU6R_js._(),chunkU3VFRU6R_js.$();},id:chunkU3VFRU6R_js.t("isFullScreen")?"exit-full-s":"full-s",className:chunkU3VFRU6R_js.ea(`pl-relative pl-cursor-pointer pl-flex pl-items-center pl-justify-center pl-rounded-full pl-transition-all ${S}`,{desktop:"pl-w-[40px] pl-h-[25px] hover:pl-bg-[#5E5E5E]",desktopFullScreen:"pl-w-[56px] pl-h-[36px]",touch:"pl-w-[32px] pl-h-[22px]",touchFullScreen:"pl-w-[48px] pl-h-[32px]"}),children:[jsxRuntime.jsx(V__default.default,{src:chunkU3VFRU6R_js.t("isFullScreen")?chunkCOYFW7R4_js.a.nonFullScreen:chunkCOYFW7R4_js.a.fullScreen,alt:"fullScreen-icon",width:n,height:i}),u&&jsxRuntime.jsx(h,{className:"pl-right-5",title:`${chunkU3VFRU6R_js.t("isFullScreen")?"\u062E\u0631\u0648\u062C \u0627\u0632":""} \u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647 (F)`})]})},Fe=G;exports.a=h;exports.b=ie;exports.c=Fe;//# sourceMappingURL=chunk-OGCKLRYP.js.map
2
- //# sourceMappingURL=chunk-OGCKLRYP.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/soundVolume/soundVolume.tsx","../src/videoPlayerLibrary/components/custom-components/footer/controllbar/controllbarTooltip.tsx","../src/videoPlayerLibrary/components/custom-components/fullScreen/fullScreen.tsx"],"names":["init_cjs_shims","ControllbarTooltip","title","className","jsx","conditions","controllbarTooltip_default","SoundVolume","width","height","showTooltip","setShowTooltip","useState","dispatch","useAppDispatch","settings","useAppSelector","shallowEqual","primaryVolumeRef","useRef","handleMouseUp","store_default","sendFluentLog","volumeLog","setUserSettings","handleMute","type","handleChangeSoundVolume","jsxs","tw","event","Image","importImages_default","soundVolume_default","FullScreen","firstPlay","isFullScreen","e","handleFullScreen","handleLockOrientation","fullScreen_default"],"mappings":"0YAAAA,kBAAAA,EAAAA,CCAAA,kBAAAA,EAAAA,CAIA,IAAMC,CAAAA,CAAqB,CAAC,CAAE,KAAA,CAAAC,CAAAA,CAAO,SAAA,CAAAC,CAAU,CAAA,GAC7CC,cAAAA,CAAC,MAAA,CAAA,CACC,SAAA,CAAW,CAAA,8IAAA,EACTC,iCAAqC,CAAA,CACjC,2DAAA,CACA,oDACN,CAAA,CAAA,EAAIF,CAAS,CAAA,CAAA,CAEZ,QAAA,CAAAD,CAAAA,CACH,CAAA,CAGKI,CAAAA,CAAQL,EDDf,IAAMM,CAAAA,CAAc,CAAC,CAAE,KAAA,CAAAC,CAAAA,CAAO,MAAA,CAAAC,CAAO,CAAA,GAA2C,CAC9E,GAAM,CAACC,CAAAA,CAAaC,CAAc,CAAA,CAAIC,cAAAA,CAAkB,KAAK,CAAA,CAEvDC,CAAAA,CAAWC,kBAAAA,EAAe,CAC1B,CAAE,QAAA,CAAAC,CAAS,EAAIC,kBAAAA,CAAe,CAAC,CAAE,IAAA,CAAM,CAAE,QAAA,CAAAD,CAAS,CAAE,CAAA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BACF,CAAA,CACA,EAAA,CAAIlC,kBAAAA,CAAAA,cAAqC,CAAA,CAAI,aAAA,CAAgB,QAAA,CAC7D,SAAA,CAAWwB,mBAAAA,CAAG,CAAA,0GAAA,EAA6G1B,CAAS,CAAA,CAAA,CAAI,CACtI,OAAA,CAAS,gDACT,iBAAA,CAAmB,yBAAA,CACnB,KAAA,CAAO,yBAAA,CACP,eAAA,CAAiB,yBACnB,CAAC,CAAA,CAED,QAAA,CAAA,CAAAC,cAAAA,CAAC2B,kBAAAA,CAAA,CACC,GAAA,CAAK1B,kBAAAA,CAAAA,cAAqC,EAAI2B,kBAAAA,CAAO,aAAA,CAAgBA,kBAAAA,CAAO,UAAA,CAC5E,GAAA,CAAI,iBAAA,CACJ,KAAA,CAAOxB,CAAAA,CACP,MAAA,CAAQC,CAAAA,CACV,CAAA,CAECC,CAAAA,EACCN,cAAAA,CAACE,CAAAA,CAAA,CAAmB,SAAA,CAAU,YAAA,CAAa,KAAA,CAAO,CAAA,EAAGD,kBAAAA,CAAAA,cAAqC,CAAA,CAAI,uCAAA,CAAY,EAAE,CAAA,sDAAA,CAAA,CAAkB,CAAA,CAAA,CAElI,CAEJ,CAAA,CAEOmC,EAAAA,CAAQN","file":"chunk-OGCKLRYP.js","sourcesContent":["import { useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport Image from \"next/image\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport store from \"../../../helpers/redux/store\";\r\nimport { volumeLog } from \"../../../helpers/logs/logs\";\r\nimport { sendFluentLog } from \"../../../helpers/logs/fluentdLogger\";\r\nimport { setUserSettings } from \"../../../helpers/redux/slices/userSlice\";\r\nimport { handleChangeSoundVolume } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { tw } from \"../../../helpers/helpers\";\r\n\r\nconst SoundVolume = ({ width, height }: { width?: number; height?: number }) => {\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const dispatch = useAppDispatch();\r\n const { settings } = useAppSelector(({ user: { settings } }) => ({ settings }), shallowEqual);\r\n\r\n const primaryVolumeRef = useRef<number>(settings.volume);\r\n\r\n const handleMouseUp = () => {\r\n if (primaryVolumeRef.current !== settings.volume) {\r\n const { settings } = store.getState().user;\r\n sendFluentLog(volumeLog(primaryVolumeRef.current, settings.volume));\r\n primaryVolumeRef.current = settings.volume;\r\n // createSettings({ ...settings, volume: settings.volume });\r\n dispatch(setUserSettings({ ...settings, volume: settings.volume }));\r\n }\r\n };\r\n\r\n const handleMute = (type: string) => {\r\n const { settings } = store.getState().user;\r\n if (type === \"mute\") {\r\n handleChangeSoundVolume(0);\r\n sendFluentLog(volumeLog(settings.volume, 0));\r\n // createSettings({ ...settings, volume: 0 });\r\n } else {\r\n sendFluentLog(volumeLog(settings.volume, 100));\r\n handleChangeSoundVolume(100);\r\n // createSettings({ ...settings, volume: 100 });\r\n }\r\n };\r\n\r\n return (\r\n <div\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n id={conditions(ConditionName.hasSound) ? \"mute\" : \"unmute\"}\r\n className={tw(`pl-relative pl-rounded-full pl-inline-flex pl-items-center pl-justify-center pl-group pl-bg-black/75 pl-sound-icon`, {\r\n desktop: \"pl-min-w-[34px] pl-h-[34px] pl-p-1\",\r\n desktopFullScreen: \"pl-min-w-[48px] pl-h-[48px] pl-p-0 pl-px-1.5\",\r\n })}\r\n >\r\n <div\r\n className={tw(\"pl-flex pl-items-center pl-justify-center pl-rounded-full group-hover:pl-bg-[#5E5E5E] pl-transition-all\", {\r\n desktop: \"pl-h-[26px] pl-min-w-[26px] group-hover:pl-ps-1 pl-gap-1\",\r\n desktopFullScreen: \"pl-h-[36px] pl-min-w-[36px] group-hover:pl-ps-1.5 pl-gap-1.5\",\r\n })}\r\n >\r\n {!conditions(ConditionName.isTouchScreen) && (\r\n <input\r\n onMouseUp={handleMouseUp}\r\n type=\"range\"\r\n min=\"0\"\r\n max=\"100\"\r\n value={settings.volume}\r\n onChange={(event) => handleChangeSoundVolume(+event.target.value)}\r\n className={`pl-soundVolume ${conditions(ConditionName.isFullScreen) && \"pl-soundVolume-fullscreen\"} pl-cursor-pointer rounded-full`}\r\n style={{ background: `linear-gradient(to right, white ${settings.volume}%, rgba(255,255,255,0.3) 0)` }}\r\n />\r\n )}\r\n <div\r\n onClick={() => (conditions(ConditionName.hasSound) ? handleMute(\"mute\") : handleMute(\"unmute\"))}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n className={tw(\"pl-relative pl-flex pl-items-center pl-shrink-0 pl-me-[5px]\", { desktop: \"\", desktopFullScreen: \"\" })}\r\n >\r\n <Image\r\n src={conditions(ConditionName.hasSound) ? (settings.volume >= 50 ? IMAGES.unMute : IMAGES.lowSound) : IMAGES.mute}\r\n alt={conditions(ConditionName.hasSound) ? \"unmute-icon\" : \"mute-icon\"}\r\n className={`pl-flex pl-items-center pl-cursor-pointer`}\r\n width={width}\r\n height={height}\r\n />\r\n </div>\r\n </div>\r\n {showTooltip && <ControllbarTooltip className=\"pl-left-0\" title={conditions(ConditionName.hasSound) ? \"صدا (M)\" : \"بی‌صدا (M)\"} />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default SoundVolume;\r\n","import { conditions } from \"../../../../helpers/conditions/conditions\";\nimport { ConditionName } from \"../../../../helpers/interfaces/enums\";\nimport { IControllbarTooltipProps } from \"../../../../helpers/interfaces/interfaces\";\n\nconst ControllbarTooltip = ({ title, className }: IControllbarTooltipProps) => (\n <span\n className={`pl-absolute pl-w-max pl-bg-black/75 pl-text-white pl-rounded-[8px] pl-leading-[18px] pl-flex pl-items-center pl-justify-center pl-font-normal ${\n conditions(ConditionName.isFullScreen)\n ? \"pl-bottom-[150%] pl-h-[34px] pl-px-[9.5px] pl-text-[15px]\"\n : \"pl-h-6 pl-bottom-[130%] pl-px-[9px] pl-text-[12px]\"\n } ${className}`}\n >\n {title}\n </span>\n);\n\nexport default ControllbarTooltip;\n","import { useEffect, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { handleFullScreen, handleLockOrientation } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport Image from \"next/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { tw } from \"../../../helpers/helpers\";\r\n\r\nconst FullScreen = ({ width, height, className }: { width?: number; height?: number; className?: string }) => {\r\n useAppSelector(({ controller: { firstPlay, isFullScreen } }) => ({ firstPlay, isFullScreen }), shallowEqual);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n // useEffect(() => {\r\n // if (!conditions(ConditionName.isFirstPlay)) dispatch(setActiveElements(false));\r\n // }, [isFullScreen]);\r\n\r\n return (\r\n <div\r\n onDoubleClick={(e) => e.preventDefault()}\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n onClick={() => {\r\n handleFullScreen();\r\n handleLockOrientation();\r\n }}\r\n id={conditions(ConditionName.isFullScreen) ? \"exit-full-s\" : \"full-s\"}\r\n className={tw(`pl-relative pl-cursor-pointer pl-flex pl-items-center pl-justify-center pl-rounded-full pl-transition-all ${className}`, {\r\n desktop: \"pl-w-[40px] pl-h-[25px] hover:pl-bg-[#5E5E5E]\",\r\n desktopFullScreen: \"pl-w-[56px] pl-h-[36px]\",\r\n touch: \"pl-w-[32px] pl-h-[22px]\",\r\n touchFullScreen: \"pl-w-[48px] pl-h-[32px]\",\r\n })}\r\n >\r\n <Image\r\n src={conditions(ConditionName.isFullScreen) ? IMAGES.nonFullScreen : IMAGES.fullScreen}\r\n alt=\"fullScreen-icon\"\r\n width={width}\r\n height={height}\r\n />\r\n\r\n {showTooltip && (\r\n <ControllbarTooltip className=\"pl-right-5\" title={`${conditions(ConditionName.isFullScreen) ? \"خروج از\" : \"\"} تمام صفحه (F)`} />\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default FullScreen;\r\n"]}
@@ -1,2 +0,0 @@
1
- import {a}from'./chunk-XKRBXZUB.mjs';import {t,Y,ea,_,$,Aa,w,H,ya}from'./chunk-BC4366GN.mjs';import {e,z,A}from'./chunk-4QMWBTB5.mjs';import {useState,useRef}from'react';import {shallowEqual}from'react-redux';import {jsx,jsxs}from'react/jsx-runtime';import O from'next/image';e();e();var I=({title:n,className:i})=>jsx("span",{className:`pl-absolute pl-w-max pl-bg-black/75 pl-text-white pl-rounded-[8px] pl-leading-[18px] pl-flex pl-items-center pl-justify-center pl-font-normal ${t("isFullScreen")?"pl-bottom-[150%] pl-h-[34px] pl-px-[9.5px] pl-text-[15px]":"pl-h-6 pl-bottom-[130%] pl-px-[9px] pl-text-[12px]"} ${i}`,children:n}),h=I;var P=({width:n,height:i})=>{let[S,u]=useState(false),m=z(),{settings:l}=A(({user:{settings:o}})=>({settings:o}),shallowEqual),s=useRef(l.volume),A$1=()=>{if(s.current!==l.volume){let{settings:o}=Aa.getState().user;w(H(s.current,o.volume)),s.current=o.volume,m(ya({...o,volume:o.volume}));}},v=o=>{let{settings:b}=Aa.getState().user;o==="mute"?(Y(0),w(H(b.volume,0))):(w(H(b.volume,100)),Y(100));};return jsxs("div",{onMouseOver:()=>!t("isTouchScreen")&&u(true),onMouseLeave:()=>!t("isTouchScreen")&&u(false),id:t("hasSound")?"mute":"unmute",className:ea("pl-relative pl-rounded-full pl-inline-flex pl-items-center pl-justify-center pl-group pl-bg-black/75 pl-sound-icon",{desktop:"pl-min-w-[34px] pl-h-[34px] pl-p-1",desktopFullScreen:"pl-min-w-[48px] pl-h-[48px] pl-p-0 pl-px-1.5"}),children:[jsxs("div",{className:ea("pl-flex pl-items-center pl-justify-center pl-rounded-full group-hover:pl-bg-[#5E5E5E] pl-transition-all",{desktop:"pl-h-[26px] pl-min-w-[26px] group-hover:pl-ps-1 pl-gap-1",desktopFullScreen:"pl-h-[36px] pl-min-w-[36px] group-hover:pl-ps-1.5 pl-gap-1.5"}),children:[!t("isTouchScreen")&&jsx("input",{onMouseUp:A$1,type:"range",min:"0",max:"100",value:l.volume,onChange:o=>Y(+o.target.value),className:`pl-soundVolume ${t("isFullScreen")&&"pl-soundVolume-fullscreen"} pl-cursor-pointer rounded-full`,style:{background:`linear-gradient(to right, white ${l.volume}%, rgba(255,255,255,0.3) 0)`}}),jsx("div",{onClick:()=>t("hasSound")?v("mute"):v("unmute"),onDoubleClick:o=>o.stopPropagation(),className:ea("pl-relative pl-flex pl-items-center pl-shrink-0 pl-me-[5px]",{desktop:"",desktopFullScreen:""}),children:jsx(O,{src:t("hasSound")?l.volume>=50?a.unMute:a.lowSound:a.mute,alt:t("hasSound")?"unmute-icon":"mute-icon",className:"pl-flex pl-items-center pl-cursor-pointer",width:n,height:i})})]}),S&&jsx(h,{className:"pl-left-0",title:t("hasSound")?"\u0635\u062F\u0627 (M)":"\u0628\u06CC\u200C\u0635\u062F\u0627 (M)"})]})},se=P;e();var R=({width:n,height:i,className:S})=>{A(({controller:{firstPlay:l,isFullScreen:s}})=>({firstPlay:l,isFullScreen:s}),shallowEqual);let[u,m]=useState(false);return jsxs("div",{onDoubleClick:l=>l.preventDefault(),onMouseOver:()=>!t("isTouchScreen")&&m(true),onMouseLeave:()=>!t("isTouchScreen")&&m(false),onClick:()=>{_(),$();},id:t("isFullScreen")?"exit-full-s":"full-s",className:ea(`pl-relative pl-cursor-pointer pl-flex pl-items-center pl-justify-center pl-rounded-full pl-transition-all ${S}`,{desktop:"pl-w-[40px] pl-h-[25px] hover:pl-bg-[#5E5E5E]",desktopFullScreen:"pl-w-[56px] pl-h-[36px]",touch:"pl-w-[32px] pl-h-[22px]",touchFullScreen:"pl-w-[48px] pl-h-[32px]"}),children:[jsx(O,{src:t("isFullScreen")?a.nonFullScreen:a.fullScreen,alt:"fullScreen-icon",width:n,height:i}),u&&jsx(h,{className:"pl-right-5",title:`${t("isFullScreen")?"\u062E\u0631\u0648\u062C \u0627\u0632":""} \u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647 (F)`})]})},Ce=R;export{h as a,se as b,Ce as c};//# sourceMappingURL=chunk-WU4GN63P.mjs.map
2
- //# sourceMappingURL=chunk-WU4GN63P.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/soundVolume/soundVolume.tsx","../src/videoPlayerLibrary/components/custom-components/footer/controllbar/controllbarTooltip.tsx","../src/videoPlayerLibrary/components/custom-components/fullScreen/fullScreen.tsx"],"names":["init_esm_shims","ControllbarTooltip","title","className","jsx","conditions","controllbarTooltip_default","SoundVolume","width","height","showTooltip","setShowTooltip","useState","dispatch","useAppDispatch","settings","useAppSelector","shallowEqual","primaryVolumeRef","useRef","handleMouseUp","store_default","sendFluentLog","volumeLog","setUserSettings","handleMute","type","handleChangeSoundVolume","jsxs","tw","event","Image","importImages_default","soundVolume_default","FullScreen","firstPlay","isFullScreen","e","handleFullScreen","handleLockOrientation","fullScreen_default"],"mappings":"oRAAAA,CAAAA,EAAAA,CCAAA,CAAAA,EAAAA,CAIA,IAAMC,CAAAA,CAAqB,CAAC,CAAE,KAAA,CAAAC,CAAAA,CAAO,SAAA,CAAAC,CAAU,CAAA,GAC7CC,GAAAA,CAAC,MAAA,CAAA,CACC,SAAA,CAAW,CAAA,8IAAA,EACTC,gBAAqC,CAAA,CACjC,2DAAA,CACA,oDACN,CAAA,CAAA,EAAIF,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A,CAAIC,QAAAA,CAAkB,KAAK,EAM7D,OACEgB,IAAAA,CAAC,KAAA,CAAA,CACC,aAAA,CAAgBS,CAAAA,EAAMA,CAAAA,CAAE,cAAA,EAAe,CACvC,WAAA,CAAa,IAAM,CAAChC,CAAAA,CAAAA,eAAsC,CAAA,EAAKM,CAAAA,CAAe,IAAI,CAAA,CAClF,YAAA,CAAc,IAAM,CAACN,CAAAA,CAAAA,eAAsC,CAAA,EAAKM,CAAAA,CAAe,KAAK,CAAA,CACpF,OAAA,CAAS,IAAM,CACb2B,CAAAA,EAAiB,CACjBC,IACF,CAAA,CACA,EAAA,CAAIlC,CAAAA,CAAAA,cAAqC,CAAA,CAAI,aAAA,CAAgB,QAAA,CAC7D,SAAA,CAAWwB,EAAAA,CAAG,CAAA,0GAAA,EAA6G1B,CAAS,CAAA,CAAA,CAAI,CACtI,OAAA,CAAS,gDACT,iBAAA,CAAmB,yBAAA,CACnB,KAAA,CAAO,yBAAA,CACP,eAAA,CAAiB,yBACnB,CAAC,CAAA,CAED,QAAA,CAAA,CAAAC,GAAAA,CAAC2B,CAAAA,CAAA,CACC,GAAA,CAAK1B,CAAAA,CAAAA,cAAqC,EAAI2B,CAAAA,CAAO,aAAA,CAAgBA,CAAAA,CAAO,UAAA,CAC5E,GAAA,CAAI,iBAAA,CACJ,KAAA,CAAOxB,CAAAA,CACP,MAAA,CAAQC,CAAAA,CACV,CAAA,CAECC,CAAAA,EACCN,GAAAA,CAACE,CAAAA,CAAA,CAAmB,SAAA,CAAU,YAAA,CAAa,KAAA,CAAO,CAAA,EAAGD,CAAAA,CAAAA,cAAqC,CAAA,CAAI,uCAAA,CAAY,EAAE,CAAA,sDAAA,CAAA,CAAkB,CAAA,CAAA,CAElI,CAEJ,CAAA,CAEOmC,EAAAA,CAAQN","file":"chunk-WU4GN63P.mjs","sourcesContent":["import { useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport Image from \"next/image\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport store from \"../../../helpers/redux/store\";\r\nimport { volumeLog } from \"../../../helpers/logs/logs\";\r\nimport { sendFluentLog } from \"../../../helpers/logs/fluentdLogger\";\r\nimport { setUserSettings } from \"../../../helpers/redux/slices/userSlice\";\r\nimport { handleChangeSoundVolume } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { tw } from \"../../../helpers/helpers\";\r\n\r\nconst SoundVolume = ({ width, height }: { width?: number; height?: number }) => {\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const dispatch = useAppDispatch();\r\n const { settings } = useAppSelector(({ user: { settings } }) => ({ settings }), shallowEqual);\r\n\r\n const primaryVolumeRef = useRef<number>(settings.volume);\r\n\r\n const handleMouseUp = () => {\r\n if (primaryVolumeRef.current !== settings.volume) {\r\n const { settings } = store.getState().user;\r\n sendFluentLog(volumeLog(primaryVolumeRef.current, settings.volume));\r\n primaryVolumeRef.current = settings.volume;\r\n // createSettings({ ...settings, volume: settings.volume });\r\n dispatch(setUserSettings({ ...settings, volume: settings.volume }));\r\n }\r\n };\r\n\r\n const handleMute = (type: string) => {\r\n const { settings } = store.getState().user;\r\n if (type === \"mute\") {\r\n handleChangeSoundVolume(0);\r\n sendFluentLog(volumeLog(settings.volume, 0));\r\n // createSettings({ ...settings, volume: 0 });\r\n } else {\r\n sendFluentLog(volumeLog(settings.volume, 100));\r\n handleChangeSoundVolume(100);\r\n // createSettings({ ...settings, volume: 100 });\r\n }\r\n };\r\n\r\n return (\r\n <div\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n id={conditions(ConditionName.hasSound) ? \"mute\" : \"unmute\"}\r\n className={tw(`pl-relative pl-rounded-full pl-inline-flex pl-items-center pl-justify-center pl-group pl-bg-black/75 pl-sound-icon`, {\r\n desktop: \"pl-min-w-[34px] pl-h-[34px] pl-p-1\",\r\n desktopFullScreen: \"pl-min-w-[48px] pl-h-[48px] pl-p-0 pl-px-1.5\",\r\n })}\r\n >\r\n <div\r\n className={tw(\"pl-flex pl-items-center pl-justify-center pl-rounded-full group-hover:pl-bg-[#5E5E5E] pl-transition-all\", {\r\n desktop: \"pl-h-[26px] pl-min-w-[26px] group-hover:pl-ps-1 pl-gap-1\",\r\n desktopFullScreen: \"pl-h-[36px] pl-min-w-[36px] group-hover:pl-ps-1.5 pl-gap-1.5\",\r\n })}\r\n >\r\n {!conditions(ConditionName.isTouchScreen) && (\r\n <input\r\n onMouseUp={handleMouseUp}\r\n type=\"range\"\r\n min=\"0\"\r\n max=\"100\"\r\n value={settings.volume}\r\n onChange={(event) => handleChangeSoundVolume(+event.target.value)}\r\n className={`pl-soundVolume ${conditions(ConditionName.isFullScreen) && \"pl-soundVolume-fullscreen\"} pl-cursor-pointer rounded-full`}\r\n style={{ background: `linear-gradient(to right, white ${settings.volume}%, rgba(255,255,255,0.3) 0)` }}\r\n />\r\n )}\r\n <div\r\n onClick={() => (conditions(ConditionName.hasSound) ? handleMute(\"mute\") : handleMute(\"unmute\"))}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n className={tw(\"pl-relative pl-flex pl-items-center pl-shrink-0 pl-me-[5px]\", { desktop: \"\", desktopFullScreen: \"\" })}\r\n >\r\n <Image\r\n src={conditions(ConditionName.hasSound) ? (settings.volume >= 50 ? IMAGES.unMute : IMAGES.lowSound) : IMAGES.mute}\r\n alt={conditions(ConditionName.hasSound) ? \"unmute-icon\" : \"mute-icon\"}\r\n className={`pl-flex pl-items-center pl-cursor-pointer`}\r\n width={width}\r\n height={height}\r\n />\r\n </div>\r\n </div>\r\n {showTooltip && <ControllbarTooltip className=\"pl-left-0\" title={conditions(ConditionName.hasSound) ? \"صدا (M)\" : \"بی‌صدا (M)\"} />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default SoundVolume;\r\n","import { conditions } from \"../../../../helpers/conditions/conditions\";\nimport { ConditionName } from \"../../../../helpers/interfaces/enums\";\nimport { IControllbarTooltipProps } from \"../../../../helpers/interfaces/interfaces\";\n\nconst ControllbarTooltip = ({ title, className }: IControllbarTooltipProps) => (\n <span\n className={`pl-absolute pl-w-max pl-bg-black/75 pl-text-white pl-rounded-[8px] pl-leading-[18px] pl-flex pl-items-center pl-justify-center pl-font-normal ${\n conditions(ConditionName.isFullScreen)\n ? \"pl-bottom-[150%] pl-h-[34px] pl-px-[9.5px] pl-text-[15px]\"\n : \"pl-h-6 pl-bottom-[130%] pl-px-[9px] pl-text-[12px]\"\n } ${className}`}\n >\n {title}\n </span>\n);\n\nexport default ControllbarTooltip;\n","import { useEffect, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { handleFullScreen, handleLockOrientation } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport Image from \"next/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { tw } from \"../../../helpers/helpers\";\r\n\r\nconst FullScreen = ({ width, height, className }: { width?: number; height?: number; className?: string }) => {\r\n useAppSelector(({ controller: { firstPlay, isFullScreen } }) => ({ firstPlay, isFullScreen }), shallowEqual);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n // useEffect(() => {\r\n // if (!conditions(ConditionName.isFirstPlay)) dispatch(setActiveElements(false));\r\n // }, [isFullScreen]);\r\n\r\n return (\r\n <div\r\n onDoubleClick={(e) => e.preventDefault()}\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n onClick={() => {\r\n handleFullScreen();\r\n handleLockOrientation();\r\n }}\r\n id={conditions(ConditionName.isFullScreen) ? \"exit-full-s\" : \"full-s\"}\r\n className={tw(`pl-relative pl-cursor-pointer pl-flex pl-items-center pl-justify-center pl-rounded-full pl-transition-all ${className}`, {\r\n desktop: \"pl-w-[40px] pl-h-[25px] hover:pl-bg-[#5E5E5E]\",\r\n desktopFullScreen: \"pl-w-[56px] pl-h-[36px]\",\r\n touch: \"pl-w-[32px] pl-h-[22px]\",\r\n touchFullScreen: \"pl-w-[48px] pl-h-[32px]\",\r\n })}\r\n >\r\n <Image\r\n src={conditions(ConditionName.isFullScreen) ? IMAGES.nonFullScreen : IMAGES.fullScreen}\r\n alt=\"fullScreen-icon\"\r\n width={width}\r\n height={height}\r\n />\r\n\r\n {showTooltip && (\r\n <ControllbarTooltip className=\"pl-right-5\" title={`${conditions(ConditionName.isFullScreen) ? \"خروج از\" : \"\"} تمام صفحه (F)`} />\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default FullScreen;\r\n"]}
@@ -1,2 +0,0 @@
1
- import {a as a$1}from'./chunk-WU4GN63P.mjs';import {a}from'./chunk-XKRBXZUB.mjs';import {fa,ea,t,Y,X,V}from'./chunk-BC4366GN.mjs';import {e,A}from'./chunk-4QMWBTB5.mjs';import z from'next/image';import {jsxs,jsx}from'react/jsx-runtime';import {shallowEqual}from'react-redux';import {useState}from'react';e();var E=({className:s})=>jsxs("div",{className:ea(`pl-cursor-default pl-flex pl-items-center pl-bg-white pl-rounded-[4px] ${s}`,{desktop:"pl-gap-2 pl-absolute pl-z-10 pl-h-9 pl-px-2 pl-top-[28px] pl-right-[18px] ",desktopFullScreen:"pl-h-12 pl-px-3 pl-top-[46px] pl-right-[29px]",touch:"pl-gap-1.5 pl-h-6 pl-px-2",touchFullScreen:"pl-gap-2 pl-h-[36px] pl-px-2"}),children:[jsx(z,{alt:"mute",width:fa({desktop:24,desktopFullScreen:32,touch:16,touchFullScreen:24}),height:fa({desktop:24,desktopFullScreen:32,touch:16,touchFullScreen:24}),src:a.mute2,className:"pl-cursor-pointer"}),jsx("p",{className:ea("pl-font-medium pl-whitespace-nowrap pl-text-black",{desktopFullScreen:"pl-text-[14px]",desktop:"pl-text-[12px]",touch:"pl-text-[10px]",touchFullScreen:"pl-text-[12px]"}),children:"\u0628\u0631\u0627\u06CC \u067E\u062E\u0634 \u0635\u062F\u0627 \u0631\u0648\u06CC \u0648\u06CC\u062F\u06CC\u0648 \u0628\u0632\u0646\u06CC\u062F"})]}),q=E;e();var T=()=>jsx("div",{className:"pl-absolute pl-inset-0 pl-rounded-[12px] pl-flex pl-items-center pl-justify-center pl-size-full pl-overflow-hidden",children:jsx("div",{className:ea("loader-spinner",{desktop:"loader-spinner-desktop",desktopFullScreen:"loader-spinner-fullscreen",touch:"loader-spinner-touch",touchFullScreen:"loader-spinner-touchFullscreen"})})}),j=T;e();var D=({width:s,height:F,disableTooltip:n,disableScale:w,className:y,inverse:N,normalStyle:r})=>{let{firstMute:M}=A(({controller:{play:e,firstMute:a}})=>({play:e,firstMute:a}),shallowEqual);A(({videoData:{videoElementSizeInfo:e,params:a}})=>({videoElementSizeInfo:e,params:a}),shallowEqual);let[C,m]=useState(false),i=N?!t("isPlay"):t("isPlay");return jsxs("div",{onClick:e=>{M?(Y(50),X()):V(e);},onDoubleClick:e=>e.stopPropagation(),onMouseOver:n?void 0:()=>!t("isTouchScreen")&&m(true),onMouseLeave:n?void 0:()=>!t("isTouchScreen")&&m(false),onContextMenu:e=>e.preventDefault(),className:ea(`pl-relative pl-flex pl-items-center pl-justify-center pl-cursor-pointer ${r?"":"pl-bg-black/75 pl-rounded-full pl-group"} ${y}`,r?void 0:{desktop:"pl-size-[34px]",desktopFullScreen:"pl-size-[48px]"}),children:[jsx("div",{className:ea(`pl-flex pl-items-center pl-justify-center pl-transition-all ${r?"":"pl-rounded-full group-hover:pl-bg-[#5E5E5E]"}`,r?void 0:{desktop:"pl-size-[26px]",desktopFullScreen:"pl-size-[36px]"}),children:jsx(z,{alt:"",src:i?a.bigPause:a.bigPlay,width:s,height:F,className:`pl-transition-transform pl-ease-in-out ${i?"pl-big-play-icon":"pl-big-pause-icon"} ${!t("isTouchScreen")&&!w&&"hover:pl-"}`})}),C&&!n&&jsx(a$1,{className:"pl-left-0",title:i?"\u067E\u062E\u0634 (K)":"\u062A\u0648\u0642\u0641 (K)"})]})},se=D;export{j as a,se as b,q as c};//# sourceMappingURL=chunk-Y7BIYTQP.mjs.map
2
- //# sourceMappingURL=chunk-Y7BIYTQP.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/soundVolumeAlert/SoundVolumeAlert.tsx","../src/videoPlayerLibrary/components/custom-components/loader/loader.tsx","../src/videoPlayerLibrary/components/custom-components/playPause/playPause.tsx"],"names":["init_esm_shims","SoundVolumeAlert","className","jsxs","tw","jsx","Image","styleMerge","importImages_default","SoundVolumeAlert_default","Loader","loader_default","PlayPause","width","height","disableTooltip","disableScale","inverse","normalStyle","firstMute","useAppSelector","play","shallowEqual","videoElementSizeInfo","params","showTooltip","setShowTooltip","useState","isPlay","conditions","event","handleChangeSoundVolume","firstUnMuteHandler","handlePlayPause","controllbarTooltip_default","playPause_default"],"mappings":"gTAAAA,CAAAA,EAAAA,CAIA,IAAMC,CAAAA,CAAmB,CAAC,CAAE,SAAA,CAAAC,CAAU,CAAA,GAElCC,IAAAA,CAAC,OACC,SAAA,CAAWC,EAAAA,CAAG,CAAA,uEAAA,EAA0EF,CAAS,GAAI,CACnG,OAAA,CAAS,6EACT,iBAAA,CAAmB,+CAAA,CACnB,MAAO,2BAAA,CACP,eAAA,CAAiB,8BACnB,CAAC,EAED,QAAA,CAAA,CAAAG,GAAAA,CAACC,EAAA,CACC,GAAA,CAAI,OACJ,KAAA,CAAOC,EAAAA,CA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/HA,CAAAA,CACI,MAAA,CACA,CACE,QAAS,gBAAA,CACT,iBAAA,CAAmB,gBACrB,CACN,CAAA,CAEA,SAAAb,GAAAA,CAACC,CAAAA,CAAA,CACC,GAAA,CAAI,GACJ,GAAA,CAAKsB,CAAAA,CAASpB,EAAO,QAAA,CAAWA,CAAAA,CAAO,QACvC,KAAA,CAAOK,CAAAA,CACP,MAAA,CAAQC,CAAAA,CACR,UAAW,CAAA,uCAAA,EAA0Cc,CAAAA,CAAS,mBAAqB,mBAAmB,CAAA,CAAA,EACpG,CAACC,CAAAA,CAAAA,eAAsC,CAAA,EAAK,CAACb,CAAAA,EAAgB,WAC/D,CAAA,CAAA,CACF,CAAA,CACF,EAECS,CAAAA,EAAe,CAACV,GAAkBV,GAAAA,CAAC6B,GAAAA,CAAA,CAAmB,SAAA,CAAU,WAAA,CAAY,MAAON,CAAAA,CAAS,wBAAA,CAAY,+BAAY,CAAA,CAAA,CACvH,CAEJ,EAEOO,EAAAA,CAAQvB","file":"chunk-Y7BIYTQP.mjs","sourcesContent":["import Image from \"next/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { styleMerge, tw } from \"../../../helpers/helpers\";\r\n\r\nconst SoundVolumeAlert = ({ className }: { className?: string }) => {\r\n return (\r\n <div\r\n className={tw(`pl-cursor-default pl-flex pl-items-center pl-bg-white pl-rounded-[4px] ${className}`, {\r\n desktop: \"pl-gap-2 pl-absolute pl-z-10 pl-h-9 pl-px-2 pl-top-[28px] pl-right-[18px] \",\r\n desktopFullScreen: \"pl-h-12 pl-px-3 pl-top-[46px] pl-right-[29px]\",\r\n touch: \"pl-gap-1.5 pl-h-6 pl-px-2\",\r\n touchFullScreen: \"pl-gap-2 pl-h-[36px] pl-px-2\",\r\n })}\r\n >\r\n <Image\r\n alt=\"mute\"\r\n width={styleMerge({ desktop: 24, desktopFullScreen: 32, touch: 16, touchFullScreen: 24 })}\r\n height={styleMerge({ desktop: 24, desktopFullScreen: 32, touch: 16, touchFullScreen: 24 })}\r\n src={IMAGES.mute2}\r\n className={\"pl-cursor-pointer\"}\r\n />\r\n <p\r\n className={tw(\"pl-font-medium pl-whitespace-nowrap pl-text-black\", {\r\n desktopFullScreen: \"pl-text-[14px]\",\r\n desktop: \"pl-text-[12px]\",\r\n touch: \"pl-text-[10px]\",\r\n touchFullScreen: \"pl-text-[12px]\",\r\n })}\r\n >\r\n برای پخش صدا روی ویدیو بزنید\r\n </p>\r\n </div>\r\n );\r\n};\r\n\r\nexport default SoundVolumeAlert;\r\n","import { tw } from \"../../../helpers/helpers\";\n\nconst Loader = () => {\n return (\n <div className={`pl-absolute pl-inset-0 pl-rounded-[12px] pl-flex pl-items-center pl-justify-center pl-size-full pl-overflow-hidden`}>\n <div\n className={tw(\"loader-spinner\", {\n desktop: \"loader-spinner-desktop\",\n desktopFullScreen: \"loader-spinner-fullscreen\",\n touch: \"loader-spinner-touch\",\n touchFullScreen: \"loader-spinner-touchFullscreen\",\n })}\n ></div>\n </div>\n );\n};\n\nexport default Loader;\n","import { shallowEqual } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { firstUnMuteHandler, handleChangeSoundVolume, handlePlayPause } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport Image from \"next/image\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport { useState } from \"react\";\r\nimport { tw } from \"../../../helpers/helpers\";\r\n\r\ninterface PlayPauseProps {\r\n width?: number;\r\n height?: number;\r\n disableTooltip?: boolean;\r\n disableScale?: boolean;\r\n className?: string;\r\n normalStyle?: boolean;\r\n inverse?: boolean;\r\n}\r\n\r\nconst PlayPause: React.FC<PlayPauseProps> = ({ width, height, disableTooltip, disableScale, className, inverse, normalStyle }) => {\r\n const { firstMute } = useAppSelector(({ controller: { play, firstMute } }) => ({ play, firstMute }), shallowEqual);\r\n useAppSelector(({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }), shallowEqual);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const isPlay = inverse ? !conditions(ConditionName.isPlay) : conditions(ConditionName.isPlay);\r\n\r\n return (\r\n <div\r\n onClick={(event: any) => {\r\n if (firstMute) {\r\n handleChangeSoundVolume(50);\r\n firstUnMuteHandler();\r\n } else handlePlayPause(event);\r\n }}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n onMouseOver={disableTooltip ? undefined : () => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={disableTooltip ? undefined : () => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n onContextMenu={(event) => event.preventDefault()}\r\n className={tw(\r\n `pl-relative pl-flex pl-items-center pl-justify-center pl-cursor-pointer ${\r\n normalStyle ? \"\" : \"pl-bg-black/75 pl-rounded-full pl-group\"\r\n } ${className}`,\r\n normalStyle ? undefined : { desktop: \"pl-size-[34px]\", desktopFullScreen: \"pl-size-[48px]\" }\r\n )}\r\n >\r\n <div\r\n className={tw(\r\n `pl-flex pl-items-center pl-justify-center pl-transition-all ${normalStyle ? \"\" : \"pl-rounded-full group-hover:pl-bg-[#5E5E5E]\"}`,\r\n normalStyle\r\n ? undefined\r\n : {\r\n desktop: \"pl-size-[26px]\",\r\n desktopFullScreen: \"pl-size-[36px]\",\r\n }\r\n )}\r\n >\r\n <Image\r\n alt=\"\"\r\n src={isPlay ? IMAGES.bigPause : IMAGES.bigPlay}\r\n width={width}\r\n height={height}\r\n className={`pl-transition-transform pl-ease-in-out ${isPlay ? \"pl-big-play-icon\" : \"pl-big-pause-icon\"} ${\r\n !conditions(ConditionName.isTouchScreen) && !disableScale && \"hover:pl-\"\r\n }`}\r\n />\r\n </div>\r\n\r\n {showTooltip && !disableTooltip && <ControllbarTooltip className=\"pl-left-0\" title={isPlay ? \"پخش (K)\" : \"توقف (K)\"} />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default PlayPause;\r\n"]}
package/chunk-ZSSCZTW3.js DELETED
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkOGCKLRYP_js=require('./chunk-OGCKLRYP.js'),chunkCOYFW7R4_js=require('./chunk-COYFW7R4.js'),chunkU3VFRU6R_js=require('./chunk-U3VFRU6R.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),C=require('next/image'),jsxRuntime=require('react/jsx-runtime'),reactRedux=require('react-redux'),react=require('react');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var C__default=/*#__PURE__*/_interopDefault(C);chunkAN6JAJSI_js.e();var z=({className:s})=>jsxRuntime.jsxs("div",{className:chunkU3VFRU6R_js.ea(`pl-cursor-default pl-flex pl-items-center pl-bg-white pl-rounded-[4px] ${s}`,{desktop:"pl-gap-2 pl-absolute pl-z-10 pl-h-9 pl-px-2 pl-top-[28px] pl-right-[18px] ",desktopFullScreen:"pl-h-12 pl-px-3 pl-top-[46px] pl-right-[29px]",touch:"pl-gap-1.5 pl-h-6 pl-px-2",touchFullScreen:"pl-gap-2 pl-h-[36px] pl-px-2"}),children:[jsxRuntime.jsx(C__default.default,{alt:"mute",width:chunkU3VFRU6R_js.fa({desktop:24,desktopFullScreen:32,touch:16,touchFullScreen:24}),height:chunkU3VFRU6R_js.fa({desktop:24,desktopFullScreen:32,touch:16,touchFullScreen:24}),src:chunkCOYFW7R4_js.a.mute2,className:"pl-cursor-pointer"}),jsxRuntime.jsx("p",{className:chunkU3VFRU6R_js.ea("pl-font-medium pl-whitespace-nowrap pl-text-black",{desktopFullScreen:"pl-text-[14px]",desktop:"pl-text-[12px]",touch:"pl-text-[10px]",touchFullScreen:"pl-text-[12px]"}),children:"\u0628\u0631\u0627\u06CC \u067E\u062E\u0634 \u0635\u062F\u0627 \u0631\u0648\u06CC \u0648\u06CC\u062F\u06CC\u0648 \u0628\u0632\u0646\u06CC\u062F"})]}),V=z;chunkAN6JAJSI_js.e();var $=()=>jsxRuntime.jsx("div",{className:"pl-absolute pl-inset-0 pl-rounded-[12px] pl-flex pl-items-center pl-justify-center pl-size-full pl-overflow-hidden",children:jsxRuntime.jsx("div",{className:chunkU3VFRU6R_js.ea("loader-spinner",{desktop:"loader-spinner-desktop",desktopFullScreen:"loader-spinner-fullscreen",touch:"loader-spinner-touch",touchFullScreen:"loader-spinner-touchFullscreen"})})}),U=$;chunkAN6JAJSI_js.e();var I=({width:s,height:P,disableTooltip:n,disableScale:F,className:w,inverse:y,normalStyle:r})=>{let{firstMute:N}=chunkAN6JAJSI_js.A(({controller:{play:e,firstMute:a}})=>({play:e,firstMute:a}),reactRedux.shallowEqual);chunkAN6JAJSI_js.A(({videoData:{videoElementSizeInfo:e,params:a}})=>({videoElementSizeInfo:e,params:a}),reactRedux.shallowEqual);let[M,m]=react.useState(false),i=y?!chunkU3VFRU6R_js.t("isPlay"):chunkU3VFRU6R_js.t("isPlay");return jsxRuntime.jsxs("div",{onClick:e=>{N?(chunkU3VFRU6R_js.Y(50),chunkU3VFRU6R_js.X()):chunkU3VFRU6R_js.V(e);},onDoubleClick:e=>e.stopPropagation(),onMouseOver:n?void 0:()=>!chunkU3VFRU6R_js.t("isTouchScreen")&&m(true),onMouseLeave:n?void 0:()=>!chunkU3VFRU6R_js.t("isTouchScreen")&&m(false),onContextMenu:e=>e.preventDefault(),className:chunkU3VFRU6R_js.ea(`pl-relative pl-flex pl-items-center pl-justify-center pl-cursor-pointer ${r?"":"pl-bg-black/75 pl-rounded-full pl-group"} ${w}`,r?void 0:{desktop:"pl-size-[34px]",desktopFullScreen:"pl-size-[48px]"}),children:[jsxRuntime.jsx("div",{className:chunkU3VFRU6R_js.ea(`pl-flex pl-items-center pl-justify-center pl-transition-all ${r?"":"pl-rounded-full group-hover:pl-bg-[#5E5E5E]"}`,r?void 0:{desktop:"pl-size-[26px]",desktopFullScreen:"pl-size-[36px]"}),children:jsxRuntime.jsx(C__default.default,{alt:"",src:i?chunkCOYFW7R4_js.a.bigPause:chunkCOYFW7R4_js.a.bigPlay,width:s,height:P,className:`pl-transition-transform pl-ease-in-out ${i?"pl-big-play-icon":"pl-big-pause-icon"} ${!chunkU3VFRU6R_js.t("isTouchScreen")&&!F&&"hover:pl-"}`})}),M&&!n&&jsxRuntime.jsx(chunkOGCKLRYP_js.a,{className:"pl-left-0",title:i?"\u067E\u062E\u0634 (K)":"\u062A\u0648\u0642\u0641 (K)"})]})},re=I;exports.a=U;exports.b=re;exports.c=V;//# sourceMappingURL=chunk-ZSSCZTW3.js.map
2
- //# sourceMappingURL=chunk-ZSSCZTW3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/soundVolumeAlert/SoundVolumeAlert.tsx","../src/videoPlayerLibrary/components/custom-components/loader/loader.tsx","../src/videoPlayerLibrary/components/custom-components/playPause/playPause.tsx"],"names":["init_cjs_shims","SoundVolumeAlert","className","jsxs","tw","jsx","Image","styleMerge","importImages_default","SoundVolumeAlert_default","Loader","loader_default","PlayPause","width","height","disableTooltip","disableScale","inverse","normalStyle","firstMute","useAppSelector","play","shallowEqual","videoElementSizeInfo","params","showTooltip","setShowTooltip","useState","isPlay","conditions","event","handleChangeSoundVolume","firstUnMuteHandler","handlePlayPause","controllbarTooltip_default","playPause_default"],"mappings":"0bAAAA,kBAAAA,EAAAA,CAIA,IAAMC,CAAAA,CAAmB,CAAC,CAAE,SAAA,CAAAC,CAAU,CAAA,GAElCC,eAAAA,CAAC,OACC,SAAA,CAAWC,mBAAAA,CAAG,CAAA,uEAAA,EAA0EF,CAAS,GAAI,CACnG,OAAA,CAAS,6EACT,iBAAA,CAAmB,+CAAA,CACnB,MAAO,2BAAA,CACP,eAAA,CAAiB,8BACnB,CAAC,EAED,QAAA,CAAA,CAAAG,cAAAA,CAACC,mBAAA,CACC,GAAA,CAAI,OACJ,KAAA,CAAOC,mBAAAA,CAAW,CAAE,OAAA,CAAS,GAA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,CAAAA,CACI,MAAA,CACA,CACE,QAAS,gBAAA,CACT,iBAAA,CAAmB,gBACrB,CACN,CAAA,CAEA,SAAAb,cAAAA,CAACC,kBAAAA,CAAA,CACC,GAAA,CAAI,GACJ,GAAA,CAAKsB,CAAAA,CAASpB,mBAAO,QAAA,CAAWA,kBAAAA,CAAO,QACvC,KAAA,CAAOK,CAAAA,CACP,MAAA,CAAQC,CAAAA,CACR,UAAW,CAAA,uCAAA,EAA0Cc,CAAAA,CAAS,mBAAqB,mBAAmB,CAAA,CAAA,EACpG,CAACC,kBAAAA,CAAAA,eAAsC,CAAA,EAAK,CAACb,CAAAA,EAAgB,WAC/D,CAAA,CAAA,CACF,CAAA,CACF,EAECS,CAAAA,EAAe,CAACV,GAAkBV,cAAAA,CAAC6B,kBAAAA,CAAA,CAAmB,SAAA,CAAU,WAAA,CAAY,MAAON,CAAAA,CAAS,wBAAA,CAAY,+BAAY,CAAA,CAAA,CACvH,CAEJ,EAEOO,EAAAA,CAAQvB","file":"chunk-ZSSCZTW3.js","sourcesContent":["import Image from \"next/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { styleMerge, tw } from \"../../../helpers/helpers\";\r\n\r\nconst SoundVolumeAlert = ({ className }: { className?: string }) => {\r\n return (\r\n <div\r\n className={tw(`pl-cursor-default pl-flex pl-items-center pl-bg-white pl-rounded-[4px] ${className}`, {\r\n desktop: \"pl-gap-2 pl-absolute pl-z-10 pl-h-9 pl-px-2 pl-top-[28px] pl-right-[18px] \",\r\n desktopFullScreen: \"pl-h-12 pl-px-3 pl-top-[46px] pl-right-[29px]\",\r\n touch: \"pl-gap-1.5 pl-h-6 pl-px-2\",\r\n touchFullScreen: \"pl-gap-2 pl-h-[36px] pl-px-2\",\r\n })}\r\n >\r\n <Image\r\n alt=\"mute\"\r\n width={styleMerge({ desktop: 24, desktopFullScreen: 32, touch: 16, touchFullScreen: 24 })}\r\n height={styleMerge({ desktop: 24, desktopFullScreen: 32, touch: 16, touchFullScreen: 24 })}\r\n src={IMAGES.mute2}\r\n className={\"pl-cursor-pointer\"}\r\n />\r\n <p\r\n className={tw(\"pl-font-medium pl-whitespace-nowrap pl-text-black\", {\r\n desktopFullScreen: \"pl-text-[14px]\",\r\n desktop: \"pl-text-[12px]\",\r\n touch: \"pl-text-[10px]\",\r\n touchFullScreen: \"pl-text-[12px]\",\r\n })}\r\n >\r\n برای پخش صدا روی ویدیو بزنید\r\n </p>\r\n </div>\r\n );\r\n};\r\n\r\nexport default SoundVolumeAlert;\r\n","import { tw } from \"../../../helpers/helpers\";\n\nconst Loader = () => {\n return (\n <div className={`pl-absolute pl-inset-0 pl-rounded-[12px] pl-flex pl-items-center pl-justify-center pl-size-full pl-overflow-hidden`}>\n <div\n className={tw(\"loader-spinner\", {\n desktop: \"loader-spinner-desktop\",\n desktopFullScreen: \"loader-spinner-fullscreen\",\n touch: \"loader-spinner-touch\",\n touchFullScreen: \"loader-spinner-touchFullscreen\",\n })}\n ></div>\n </div>\n );\n};\n\nexport default Loader;\n","import { shallowEqual } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { firstUnMuteHandler, handleChangeSoundVolume, handlePlayPause } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport Image from \"next/image\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport { useState } from \"react\";\r\nimport { tw } from \"../../../helpers/helpers\";\r\n\r\ninterface PlayPauseProps {\r\n width?: number;\r\n height?: number;\r\n disableTooltip?: boolean;\r\n disableScale?: boolean;\r\n className?: string;\r\n normalStyle?: boolean;\r\n inverse?: boolean;\r\n}\r\n\r\nconst PlayPause: React.FC<PlayPauseProps> = ({ width, height, disableTooltip, disableScale, className, inverse, normalStyle }) => {\r\n const { firstMute } = useAppSelector(({ controller: { play, firstMute } }) => ({ play, firstMute }), shallowEqual);\r\n useAppSelector(({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }), shallowEqual);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const isPlay = inverse ? !conditions(ConditionName.isPlay) : conditions(ConditionName.isPlay);\r\n\r\n return (\r\n <div\r\n onClick={(event: any) => {\r\n if (firstMute) {\r\n handleChangeSoundVolume(50);\r\n firstUnMuteHandler();\r\n } else handlePlayPause(event);\r\n }}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n onMouseOver={disableTooltip ? undefined : () => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={disableTooltip ? undefined : () => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n onContextMenu={(event) => event.preventDefault()}\r\n className={tw(\r\n `pl-relative pl-flex pl-items-center pl-justify-center pl-cursor-pointer ${\r\n normalStyle ? \"\" : \"pl-bg-black/75 pl-rounded-full pl-group\"\r\n } ${className}`,\r\n normalStyle ? undefined : { desktop: \"pl-size-[34px]\", desktopFullScreen: \"pl-size-[48px]\" }\r\n )}\r\n >\r\n <div\r\n className={tw(\r\n `pl-flex pl-items-center pl-justify-center pl-transition-all ${normalStyle ? \"\" : \"pl-rounded-full group-hover:pl-bg-[#5E5E5E]\"}`,\r\n normalStyle\r\n ? undefined\r\n : {\r\n desktop: \"pl-size-[26px]\",\r\n desktopFullScreen: \"pl-size-[36px]\",\r\n }\r\n )}\r\n >\r\n <Image\r\n alt=\"\"\r\n src={isPlay ? IMAGES.bigPause : IMAGES.bigPlay}\r\n width={width}\r\n height={height}\r\n className={`pl-transition-transform pl-ease-in-out ${isPlay ? \"pl-big-play-icon\" : \"pl-big-pause-icon\"} ${\r\n !conditions(ConditionName.isTouchScreen) && !disableScale && \"hover:pl-\"\r\n }`}\r\n />\r\n </div>\r\n\r\n {showTooltip && !disableTooltip && <ControllbarTooltip className=\"pl-left-0\" title={isPlay ? \"پخش (K)\" : \"توقف (K)\"} />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default PlayPause;\r\n"]}
package/chunk-ZWGZGWEB.js DELETED
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkU3VFRU6R_js=require('./chunk-U3VFRU6R.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js');chunkAN6JAJSI_js.e();var w=()=>{let{params:r}=chunkU3VFRU6R_js.Aa.getState().videoData,t=chunkU3VFRU6R_js.x().currentTime;if(t!==0){let d=chunkU3VFRU6R_js.x().duration,i={video_id:+r.id,video_type:2,time:t===d?0:Math.floor(chunkU3VFRU6R_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=chunkU3VFRU6R_js.Aa.dispatch,{params:t}=chunkU3VFRU6R_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(chunkU3VFRU6R_js.za({time:o.time}));}};exports.a=w;exports.b=f;//# sourceMappingURL=chunk-ZWGZGWEB.js.map
2
- //# sourceMappingURL=chunk-ZWGZGWEB.js.map
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkWFHA2FPC_js=require('./chunk-WFHA2FPC.js');require('./chunk-IBV5SFIT.js'),require('./chunk-ZSSCZTW3.js'),require('./chunk-OGCKLRYP.js'),require('./chunk-AK5TFAW3.js'),require('./chunk-COYFW7R4.js'),require('./chunk-BFE2RKVK.js');var chunkU3VFRU6R_js=require('./chunk-U3VFRU6R.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),jsxRuntime=require('react/jsx-runtime');chunkAN6JAJSI_js.e();var l=()=>jsxRuntime.jsx("div",{className:`pl-w-full pl-aspect-video ${!chunkU3VFRU6R_js.t("isTouchScreen")&&!chunkU3VFRU6R_js.t("isFullScreen")&&"!pl-rounded-[12px]"}`,children:jsxRuntime.jsx(chunkWFHA2FPC_js.a,{})}),a=l;module.exports=a;//# sourceMappingURL=staticPlayer-TNS4JFRP.js.map
2
- //# sourceMappingURL=staticPlayer-TNS4JFRP.js.map
@@ -1,2 +0,0 @@
1
- export{a as default}from'./chunk-SKRDEKL2.mjs';import'./chunk-GYUGYOVP.mjs';import'./chunk-Y7BIYTQP.mjs';import'./chunk-WU4GN63P.mjs';import'./chunk-2DV7FRU5.mjs';import'./chunk-XKRBXZUB.mjs';import'./chunk-CCO6GDG2.mjs';import'./chunk-BC4366GN.mjs';import'./chunk-4QMWBTB5.mjs';//# sourceMappingURL=videoArea-2F2NDD76.mjs.map
2
- //# sourceMappingURL=videoArea-2F2NDD76.mjs.map
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkWFHA2FPC_js=require('./chunk-WFHA2FPC.js');require('./chunk-IBV5SFIT.js'),require('./chunk-ZSSCZTW3.js'),require('./chunk-OGCKLRYP.js'),require('./chunk-AK5TFAW3.js'),require('./chunk-COYFW7R4.js'),require('./chunk-BFE2RKVK.js'),require('./chunk-U3VFRU6R.js'),require('./chunk-AN6JAJSI.js');module.exports=chunkWFHA2FPC_js.a;//# sourceMappingURL=videoArea-35ABV3CM.js.map
2
- //# sourceMappingURL=videoArea-35ABV3CM.js.map