cafe-video-player 1.3.15 → 1.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-KWQGCTFG.js → chunk-AUOAZWTS.js} +2 -2
- package/{chunk-KWQGCTFG.js.map → chunk-AUOAZWTS.js.map} +1 -1
- package/chunk-S6REIVCH.mjs +2 -0
- package/chunk-S6REIVCH.mjs.map +1 -0
- package/chunk-SYSS7LEA.js +8 -0
- package/chunk-SYSS7LEA.js.map +1 -0
- package/chunk-ZZCGHLFZ.mjs +8 -0
- package/chunk-ZZCGHLFZ.mjs.map +1 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/{nonStaticVideoTag-QDA6Q3ZD.mjs → nonStaticVideoTag-2X2VVY5W.mjs} +2 -2
- package/{nonStaticVideoTag-RUB5KZWS.js → nonStaticVideoTag-ZEIK3NO3.js} +2 -2
- package/package.json +1 -1
- package/{staticPlayer-2XDSU5DX.mjs → staticPlayer-5PKDD7FX.mjs} +2 -2
- package/{staticPlayer-SITP26V4.js → staticPlayer-EWS6TZO4.js} +2 -2
- package/videoArea-K52LHXS4.mjs +2 -0
- package/videoArea-XSUCKBEI.js +2 -0
- package/videoPlayerStyles.css +32 -23
- package/{vodPlayer-3V6J76EY.js → vodPlayer-E4ZUVOHY.js} +2 -2
- package/{vodPlayer-GU7II7PB.mjs → vodPlayer-WGYJ2ZRQ.mjs} +2 -2
- package/chunk-AEPKOSMM.mjs +0 -8
- package/chunk-AEPKOSMM.mjs.map +0 -1
- package/chunk-JENUPQO7.mjs +0 -2
- package/chunk-JENUPQO7.mjs.map +0 -1
- package/chunk-YMJSTOGL.js +0 -8
- package/chunk-YMJSTOGL.js.map +0 -1
- package/videoArea-7AMVS34H.mjs +0 -2
- package/videoArea-EQ7MJQI5.js +0 -2
- /package/{nonStaticVideoTag-QDA6Q3ZD.mjs.map → nonStaticVideoTag-2X2VVY5W.mjs.map} +0 -0
- /package/{nonStaticVideoTag-RUB5KZWS.js.map → nonStaticVideoTag-ZEIK3NO3.js.map} +0 -0
- /package/{staticPlayer-2XDSU5DX.mjs.map → staticPlayer-5PKDD7FX.mjs.map} +0 -0
- /package/{staticPlayer-SITP26V4.js.map → staticPlayer-EWS6TZO4.js.map} +0 -0
- /package/{videoArea-7AMVS34H.mjs.map → videoArea-K52LHXS4.mjs.map} +0 -0
- /package/{videoArea-EQ7MJQI5.js.map → videoArea-XSUCKBEI.js.map} +0 -0
- /package/{vodPlayer-3V6J76EY.js.map → vodPlayer-E4ZUVOHY.js.map} +0 -0
- /package/{vodPlayer-GU7II7PB.mjs.map → vodPlayer-WGYJ2ZRQ.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkA3BCKK27js = require('./chunk-A3BCKK27.js');_chunkA3BCKK27js.e.call(void 0, );var t=
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkA3BCKK27js = require('./chunk-A3BCKK27.js');_chunkA3BCKK27js.e.call(void 0, );var t=3e4,n= exports.b =5e3,r= exports.c =1e4,i= exports.d =6e4;exports.a = t; exports.b = n; exports.c = r; exports.d = i;
|
|
2
|
+
//# sourceMappingURL=chunk-AUOAZWTS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/environment.ts"],"names":["init_cjs_shims","activeElementsTime","showLoaderTime","notShowingLoaderTime","continuousePlaybackIntervalTime"],"mappings":"wCAAAA,IAMO,IAAMC,EAAqB,IAErBC,EAAiB,IACjBC,EAAuB,IAEvBC,EAAkC","sourcesContent":["import { IEnvironment } from \"./interfaces/interfaces\";\r\n\r\nexport const ENVIRONMENT: IEnvironment = {\r\n reduxDevTool: true\r\n};\r\n\r\nexport const activeElementsTime =
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/environment.ts"],"names":["init_cjs_shims","activeElementsTime","showLoaderTime","notShowingLoaderTime","continuousePlaybackIntervalTime"],"mappings":"wCAAAA,IAMO,IAAMC,EAAqB,IAErBC,EAAiB,IACjBC,EAAuB,IAEvBC,EAAkC","sourcesContent":["import { IEnvironment } from \"./interfaces/interfaces\";\r\n\r\nexport const ENVIRONMENT: IEnvironment = {\r\n reduxDevTool: true\r\n};\r\n\r\nexport const activeElementsTime = 30000;\r\n\r\nexport const showLoaderTime = 5000;\r\nexport const notShowingLoaderTime = 10000;\r\n\r\nexport const continuousePlaybackIntervalTime = 60000;\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/helpers/environment.ts"],"sourcesContent":["import { IEnvironment } from \"./interfaces/interfaces\";\r\n\r\nexport const ENVIRONMENT: IEnvironment = {\r\n reduxDevTool: true\r\n};\r\n\r\nexport const activeElementsTime = 30000;\r\n\r\nexport const showLoaderTime = 5000;\r\nexport const notShowingLoaderTime = 10000;\r\n\r\nexport const continuousePlaybackIntervalTime = 60000;\r\n"],"mappings":"yCAAAA,IAMO,IAAMC,EAAqB,IAErBC,EAAiB,IACjBC,EAAuB,IAEvBC,EAAkC","names":["init_esm_shims","activeElementsTime","showLoaderTime","notShowingLoaderTime","continuousePlaybackIntervalTime"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk7S4SD4ESjs = require('./chunk-7S4SD4ES.js');var _chunkAUOAZWTSjs = require('./chunk-AUOAZWTS.js');var _chunkPWG4S5I5js = require('./chunk-PWG4S5I5.js');var _chunkDXDG2ALZjs = require('./chunk-DXDG2ALZ.js');var _chunkEYNKLOX5js = require('./chunk-EYNKLOX5.js');var _chunkB2G6UUYPjs = require('./chunk-B2G6UUYP.js');var _chunkA3BCKK27js = require('./chunk-A3BCKK27.js');_chunkA3BCKK27js.e.call(void 0, );var _image = require('next/legacy/image'); var _image2 = _interopRequireDefault(_image);var _react = require('react');var _reactredux = require('react-redux');_chunkA3BCKK27js.e.call(void 0, );_chunkA3BCKK27js.e.call(void 0, );var _jsxruntime = require('react/jsx-runtime');var fo=()=>{let{details:e,params:o}=_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{details:l,params:i}})=>({details:l,params:i}),_reactredux.shallowEqual);return _jsxruntime.jsx.call(void 0, "div",{className:`pl-w-full pl-max-w-[80%] pl-truncate pl-text-left pl-ml-4 pl-text-[16px] pl-font-normal pl-text-white pl-break-words pl-self-start animate__animated animate__faster ${_chunkEYNKLOX5js.W.call(void 0, "isActiveElements")?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:_chunkEYNKLOX5js.W.call(void 0, "hasTitle")?e.title:o.id})},ot=fo;_chunkA3BCKK27js.e.call(void 0, );var go=()=>_jsxruntime.jsxs.call(void 0, "div",{className:`pl-relative pl-z-[1000000] animate__animated animate__faster ${_chunkEYNKLOX5js.W.call(void 0, "isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>_chunkPWG4S5I5js.f.call(void 0, "unlock")}),!localStorage.getItem("unlock-click")&&_jsxruntime.jsx.call(void 0, "p",{className:"pl-text-[10px] pl-text-black/[0.87] pl-bg-[#F7F7F7] pl-absolute pl-left-0 pl-px-4 pl-py-3 pl-rounded-[8px] pl-w-max",children:"\u0628\u0631\u0627\u06CC \u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0642\u0641\u0644\u060C \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F"})]}),it=go;var xo=()=>(_chunkEYNKLOX5js.Y.call(void 0, ({controller:{lock:e,activeElements:o}})=>({lock:e,activeElements:o}),_reactredux.shallowEqual),_jsxruntime.jsxs.call(void 0, "div",{className:`pl-flex pl-items-start pl-justify-end pl-mx-4 pl-mt-5 ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait")?"pl-h-[16px]":"pl-h-[60px]"}`,children:[_chunkEYNKLOX5js.W.call(void 0, "showTitle")&&_jsxruntime.jsx.call(void 0, ot,{}),_chunkEYNKLOX5js.W.call(void 0, "isLock")&&_jsxruntime.jsx.call(void 0, it,{})]})),nt=xo;_chunkA3BCKK27js.e.call(void 0, );_chunkA3BCKK27js.e.call(void 0, );var To=()=>(_chunkEYNKLOX5js.Y.call(void 0, ({controller:{play:e,showMiniPlayer:o}})=>({play:e,showMiniPlayer:o}),_reactredux.shallowEqual),_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{videoElementSizeInfo:e,params:o}})=>({videoElementSizeInfo:e,params:o}),_reactredux.shallowEqual),_jsxruntime.jsx.call(void 0, "div",{className:`${!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&"hover:pl-scale-125"} pl-transition-transform pl-ease-in-out pl-cursor-pointer`,onContextMenu:e=>e.preventDefault(),children:_jsxruntime.jsx.call(void 0, _image2.default,{alt:"",src:_chunkEYNKLOX5js.W.call(void 0, "isPlay")?_chunkB2G6UUYPjs.a.bigPause:_chunkB2G6UUYPjs.a.bigPlay,width:_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")?20:40,height:_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")?20:40,onClick:e=>_chunkPWG4S5I5js.a.call(void 0, e),onDoubleClick:e=>e.stopPropagation(),className:`${_chunkEYNKLOX5js.W.call(void 0, "isPlay")?"pl-big-play-icon":"pl-big-pause-icon"}`})})),ae=To;var Io=()=>{let[e,o]=_react.useState.call(void 0, !1);_chunkEYNKLOX5js.Y.call(void 0, ({controller:{lock:i,firstPlay:r}})=>({lock:i,firstPlay:r}),_reactredux.shallowEqual);let{activeElements:l}=_chunkEYNKLOX5js.Y.call(void 0, ({controller:{activeElements:i}})=>({activeElements:i}),_reactredux.shallowEqual);return _react.useEffect.call(void 0, ()=>{let i=null;return _chunkEYNKLOX5js.W.call(void 0, "isFirstPlay")||_chunkEYNKLOX5js.W.call(void 0, "isActiveElements")?i=setTimeout(()=>o(!0),100):o(!1),()=>clearTimeout(i)},[l]),_jsxruntime.jsx.call(void 0, "main",{className:"pl-flex-1 pl-mt-1",children:e&&!_chunkEYNKLOX5js.W.call(void 0, "isLock")&&_jsxruntime.jsx.call(void 0, "div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${_chunkEYNKLOX5js.W.call(void 0, "isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:_jsxruntime.jsxs.call(void 0, "div",{className:"pl-flex pl-justify-center pl-gap-10 pl-items-center pl-w-max",style:{zIndex:3},children:[!_chunkEYNKLOX5js.W.call(void 0, "isFirstPlay")&&_jsxruntime.jsx.call(void 0, _chunk7S4SD4ESjs.a,{type:"forward"}),_jsxruntime.jsx.call(void 0, ae,{}),!_chunkEYNKLOX5js.W.call(void 0, "isFirstPlay")&&_jsxruntime.jsx.call(void 0, _chunk7S4SD4ESjs.a,{type:"backward"})]})})})},ct=Io;_chunkA3BCKK27js.e.call(void 0, );_chunkA3BCKK27js.e.call(void 0, );_chunkA3BCKK27js.e.call(void 0, );_chunkA3BCKK27js.e.call(void 0, );var Te=e=>{let{videoElementSizeInfo:o}=_chunkEYNKLOX5js.G.getState().videoData,{duration:l}=_chunkEYNKLOX5js.G.getState().controller,i=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(i<=o.right&&i>0)return(i-o.left)/o.width*l},q=e=>{let{videoElementSizeInfo:o}=_chunkEYNKLOX5js.G.getState().videoData,l=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(l<=o.right&&l>0)return l-o.left},J=e=>{e&&(e.style.opacity="0.0",e.style.pointerEvents="none",e.style.zIndex=-2)},Co=e=>{e.style.display="block",e.style.zIndex=5,e.style.opacity=_chunkEYNKLOX5js.G.getState().videoData.details.vtt?"1.0":"0.6",e.style.pointerEvents="auto",e.style.transition="opacity 1s ease-out"},ko=(e,o)=>{let{videoElementSizeInfo:l}=_chunkEYNKLOX5js.G.getState().videoData,i=document.getElementsByClassName("pl-progressTooltip")[0],r=document.getElementById("parent-player");i&&r&&(q(e)>i.getBoundingClientRect().width/2&&q(e)<l.right-l.left-i.getBoundingClientRect().width/2?o.style.left=`${q(e)-i.offsetWidth/2}px`:q(e)<(r.offsetLeft===0?i.offsetWidth:r.offsetLeft)?o.style.left="0px":_chunkDXDG2ALZjs.a.call(void 0, ).offsetLeft+_chunkDXDG2ALZjs.a.call(void 0, ).offsetWidth<q(e)+i.offsetWidth&&(o.style.left=`${_chunkDXDG2ALZjs.a.call(void 0, ).offsetWidth-i.offsetWidth}px`))},Lo=(e,o,l)=>{o&&Co(o),_chunkEYNKLOX5js.G.getState().videoData.details.vtt?ko(e,o):o.style.left=`${q(e)-30}px`,_chunkEYNKLOX5js.G.dispatch(_chunkEYNKLOX5js.q.call(void 0, Number(Te(e)))),l.textContent=`${_chunkEYNKLOX5js.K.call(void 0, Te(e))}`},Pe=(e,o=!1)=>{let{videoElementSizeInfo:l}=_chunkEYNKLOX5js.G.getState().videoData,i=document.querySelector(".pl-progressTooltip"),r=document.querySelector(".pl-progressTimeTooltip"),a=e.clientX!==void 0?e.clientX:e.touches[0].clientX;i&&r&&a<=l.right&&a>l.left?(Lo(e,i,r),o&&setTimeout(()=>J(i),2e3)):J(i)},ut=e=>{let o=e.clientX!==void 0?e.clientX:e.touches[0].clientX;_chunkDXDG2ALZjs.b.call(void 0, )&&(o<=e.view.innerWidth&&o>0?_chunkDXDG2ALZjs.b.call(void 0, ).style.width=`${q(e)}px`:o<=e.view.innerWidth?_chunkDXDG2ALZjs.b.call(void 0, ).style.width=0:o>0&&(_chunkDXDG2ALZjs.b.call(void 0, ).style.width="100%"))},dt=(e,o,l)=>{e.preventDefault(),e.stopPropagation(),l(!0);let i=_chunkEYNKLOX5js.G.dispatch,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX;r<=e.view.innerWidth&&r>0&&(i(_chunkEYNKLOX5js.k.call(void 0, !0)),i(_chunkEYNKLOX5js.l.call(void 0, !0)),sessionStorage.setItem("previousVideoTime",String(_chunkDXDG2ALZjs.a.call(void 0, ).currentTime)),e.target.setPointerCapture(e.pointerId),o.length>0&&o.map(a=>clearTimeout(a)))},Ee=e=>{e.preventDefault(),e.stopPropagation();let o=_chunkEYNKLOX5js.G.dispatch,{activePointerProgressBar:l}=_chunkEYNKLOX5js.G.getState().controller,{left:i}=_chunkEYNKLOX5js.G.getState().videoData.videoElementSizeInfo,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX,a=document.querySelector(".pl-progressTooltip");r>i?(a&&(a.style.display="block !important",a.style.pointerEvents="auto"),l&&(o(_chunkEYNKLOX5js.l.call(void 0, !0)),Pe(e),ut(e),_chunkDXDG2ALZjs.a.call(void 0, ).pause())):a&&(a.style.display="none !important",a.style.pointerEvents="none")},ft=(e,o,l,i)=>{i(!1),e.preventDefault(),e.stopPropagation();let r=_chunkEYNKLOX5js.G.dispatch,{duration:a}=_chunkEYNKLOX5js.G.getState().controller,{left:f,right:s}=_chunkEYNKLOX5js.G.getState().videoData.videoElementSizeInfo;e.target.removeEventListener("pointermove",Ee);let u=e.clientX!==void 0?e.clientX:e.touches[0].clientX,c=0;u>f&&u<s?c=Te(e):u<f?c=0:u>0&&(c=a),_chunkEYNKLOX5js.W.call(void 0, "isStaticFormat")||_chunkPWG4S5I5js.g.call(void 0, _chunkDXDG2ALZjs.a.call(void 0, ).currentTime,c),_chunkDXDG2ALZjs.a.call(void 0, ).currentTime=c,_chunkEYNKLOX5js.G.getState().controller.activePointerProgressBar&&(r(_chunkEYNKLOX5js.k.call(void 0, !1)),r(_chunkEYNKLOX5js.l.call(void 0, !1)),_chunkDXDG2ALZjs.a.call(void 0, ).play(),Pe(e,!0),sessionStorage.setItem("current-time",String(c)),ut(e),_o(e,r,o,l))},_o=(e,o,l,i)=>{let r=i,a=setTimeout(()=>{let{settingPopover:f}=_chunkEYNKLOX5js.G.getState().popovers,{delayTurnOffControlbar:s}=_chunkEYNKLOX5js.G.getState().controller;e.pointerType==="touch"&&!f&&s&&o(_chunkEYNKLOX5js.f.call(void 0, !1))},_chunkAUOAZWTSjs.a);r.push(a),l(r)},ht=()=>{let e=Date.now();_chunkDXDG2ALZjs.a.call(void 0, ).play().then(()=>_chunkDXDG2ALZjs.t.call(void 0, _chunkDXDG2ALZjs.h.call(void 0, Date.now()-e)))},vt=e=>Pe(e),gt=()=>{let e=document.querySelector(".pl-progressTooltip");J(e)},Mo=e=>{let o=e.split("."),i=o[0].split(":");return{milliseconds:parseInt(o[1],10)||0,seconds:parseInt(i.pop(),10)||0,minutes:parseInt(i.pop(),10)||0,hours:parseInt(i.pop(),10)||0}},mt=e=>{let o=Mo(e);return parseInt(o.hours*(60*60)+o.minutes*60+o.seconds+o.milliseconds/1e3,10)},Fo=e=>{let o=e.split(/#xywh=/i),l=o[0],r=o[1].match(/[0-9]+/gi);return{x:r[0],y:r[1],w:r[2],h:r[3],image:l}},Ao=(e,o)=>e.indexOf("//")>=0?e:o.indexOf("//")===0?[o.replace(/\/$/gi,""),e.trim()].join("/"):o.indexOf("//")>0?[o.trim(),e.trim()].join("/"):e,$o=(e,o)=>{let l={},i=o.split(/\/\w+\.vtt\s?/)[0];if(e=Ao(e,i),!e.match(/#xywh=/i))return l.background='url("'+e+o.split(/\/\w+\.vtt\s?/)[1]+'")',l;let r=Fo(e);return l.background='url("'+r.image+o.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+r.x+"px -"+r.y+"px",l.width=r.w+"px",l.height=r.h+"px",l.url=r.image,l},St=(e,o)=>{fetch(e).then(l=>{if(!l.ok)throw _chunkEYNKLOX5js.G.dispatch(_chunkEYNKLOX5js.s.call(void 0, {..._chunkEYNKLOX5js.G.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return l.text()}).then(l=>{let i=[];l.split(/[\r\n][\r\n]/i).forEach(a=>{if(a.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)){let f=a.split(/[\r\n]/i),u=f[0].split(/ ?--> ?/i),c=u[0],y=u[1],m=f[1],g=$o(m,e);i.push({start:mt(c),end:mt(y),css:g})}}),o(i)}).catch(l=>{console.error("Error fetching file:",l)})},yt=(e,o,l)=>{for(let i=0;i<o.length;++i){let r=o[i];if(e>=r.start&&e<r.end){if(r.css.url&&!l[r.css.url]){let a={background:r.css.background,width:r.css.width,height:r.css.height};return l[r.css.url]=a,a}else if(r.css.url)return l[r.css.url]}}};var Oo=()=>{let{details:e}=_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{details:s}})=>({details:s}),_reactredux.shallowEqual),{tooltipTime:o}=_chunkEYNKLOX5js.Y.call(void 0, ({controller:{tooltipTime:s,activeElements:u,isFullScreen:c}})=>({tooltipTime:s,activeElements:u,isFullScreen:c}),_reactredux.shallowEqual),l={},[i,r]=_react.useState.call(void 0, void 0),[a,f]=_react.useState.call(void 0, _chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")?e.vtt_mobile:e.vtt);return _react.useEffect.call(void 0, ()=>{f(e.vtt_mobile)},[e.vtt_mobile]),_react.useEffect.call(void 0, ()=>{a&&St(e.vtt_mobile,r)},[a]),_chunkEYNKLOX5js.W.call(void 0, "isActiveElements")?_jsxruntime.jsxs.call(void 0, "div",{className:`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[200%] pl-px-[10px] pl-py-[5px] pl-mr-[-25px] pl-mb-[25px] pl-text-white pl-text-[14px] ${a&&i?"":"pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,children:[a&&!!i&&_jsxruntime.jsx.call(void 0, "div",{className:"pl-flex-1 pl-border pl-border-white pl-rounded-[8px]",children:_jsxruntime.jsx.call(void 0, "div",{className:"pl-rounded-[8px]",style:yt(o,i,l)})}),_jsxruntime.jsx.call(void 0, "div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{})},Tt=_react.memo.call(void 0, Oo);var Xo=()=>{let[e,o]=_react.useState.call(void 0, !1);_react.useEffect.call(void 0, ()=>{J(document.querySelector(".progressTooltip"))},[]);let{duration:l,currentTime:i,bufferedTimeWidth:r}=_chunkEYNKLOX5js.Y.call(void 0, ({controller:{duration:s,currentTime:u,bufferedTimeWidth:c,showMiniPlayer:y}})=>({duration:s,currentTime:u,bufferedTimeWidth:c,showMiniPlayer:y}),_reactredux.shallowEqual);_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{params:s,videoElementSizeInfo:u}})=>({params:s,videoElementSizeInfo:u}),_reactredux.shallowEqual);let[a,f]=_react.useState.call(void 0, []);return _jsxruntime.jsxs.call(void 0, "div",{className:`${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative`,children:[_jsxruntime.jsx.call(void 0, "div",{className:"pl-relative",children:_jsxruntime.jsx.call(void 0, Tt,{})}),_jsxruntime.jsx.call(void 0, "div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:s=>dt(s,a,o),onPointerMove:Ee,onPointerUp:s=>ft(s,f,a,o),onMouseMove:vt,onMouseOut:gt,onClick:ht,onDoubleClick:s=>s.stopPropagation(),children:_jsxruntime.jsxs.call(void 0, "div",{id:"progress-area",className:"pl-w-full pl-absolute",children:[_jsxruntime.jsx.call(void 0, "div",{className:"pl-w-full pl-h-[40px]"}),_jsxruntime.jsxs.call(void 0, "div",{id:"time-progress-area",className:"!pl-w-full !pl-h-[5px] pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-gray-highLight pl-rounded",style:{transform:e?"scaleY(1.8)":"unset"},children:[_jsxruntime.jsx.call(void 0, "div",{id:"time-progress-buffer",className:"pl-absolute pl-h-[5px] pl-bg-z-gray-400/[0.7] pl-rounded",style:{width:`${r}%`}}),_jsxruntime.jsx.call(void 0, "div",{id:"time-progress-bar",className:`pl-h-[5px] pl-rounded pl-relative pl-cursor-pointer pl-bg-primary before:pl-bg-primary before:pl-inline-block before:pl-w-4 before:pl-h-4 ${e&&"before:pl-w-7 before:pl-h-3"}`,style:{width:`${i/l*_chunkDXDG2ALZjs.c.call(void 0, )}px`}})]})]})})]})},It=Xo;_chunkA3BCKK27js.e.call(void 0, );_chunkA3BCKK27js.e.call(void 0, );_chunkA3BCKK27js.e.call(void 0, );var Ro=({title:e,className:o})=>_jsxruntime.jsx.call(void 0, "span",{className:`pl-absolute pl-w-max pl-bg-paper pl-text-white/[0.9] ${_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")?"pl-bottom-[300%]":"pl-bottom-[270%]"} pl-rounded-[8px] pl-px-4 pl-py-3 pl-text-[14px] pl-font-bold ${o}`,children:e}),C=Ro;var Go=()=>{let{isFullScreen:e}=_chunkEYNKLOX5js.Y.call(void 0, ({controller:{firstPlay:r,isFullScreen:a}})=>({firstPlay:r,isFullScreen:a}),_reactredux.shallowEqual),[o,l]=_react.useState.call(void 0, !1),i=_chunkEYNKLOX5js.X.call(void 0, );return _react.useEffect.call(void 0, ()=>{_chunkEYNKLOX5js.W.call(void 0, "isFirstPlay")||i(_chunkEYNKLOX5js.f.call(void 0, !1))},[e]),_jsxruntime.jsxs.call(void 0, "div",{className:"pl-relative pl-flex pl-items-center",children:[_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")?_chunkB2G6UUYPjs.a.nonFullScreen:_chunkB2G6UUYPjs.a.fullScreen,alt:"fullScreen-icon",className:"pl-cursor-pointer",width:20,height:20,onMouseOver:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&l(!0),onMouseLeave:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&l(!1),onClick:()=>{_chunkPWG4S5I5js.d.call(void 0, ),_chunkPWG4S5I5js.e.call(void 0, )}}),o&&_jsxruntime.jsx.call(void 0, C,{title:`${_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")?"\u062E\u0631\u0648\u062C \u0627\u0632":""} \u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647`})]})},Ct=Go;_chunkA3BCKK27js.e.call(void 0, );var Ko=()=>{let[e,o]=_react.useState.call(void 0, !1);return _chunkEYNKLOX5js.Y.call(void 0, ({controller:{showMiniPlayer:l}})=>({showMiniPlayer:l}),_reactredux.shallowEqual),_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{videoElementSizeInfo:l,params:i}})=>({videoElementSizeInfo:l,params:i}),_reactredux.shallowEqual),_jsxruntime.jsxs.call(void 0, "div",{className:"pl-relative pl-flex pl-items-center",children:[_jsxruntime.jsx.call(void 0, _image2.default,{alt:"",onMouseOver:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&o(!0),onMouseLeave:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&o(!1),src:_chunkB2G6UUYPjs.a.pictureInPicture,width:20,height:20,className:"pl-flex pl-cursor-pointer",onClick:()=>_chunkDXDG2ALZjs.a.call(void 0, ).requestPictureInPicture()}),e&&_jsxruntime.jsx.call(void 0, C,{title:"\u062A\u0635\u0648\u06CC\u0631 \u062F\u0631 \u062A\u0635\u0648\u06CC\u0631"})]})},_t=Ko;_chunkA3BCKK27js.e.call(void 0, );var il=()=>{let[e,o]=_react.useState.call(void 0, !1),l=_chunkEYNKLOX5js.X.call(void 0, ),{settings:i}=_chunkEYNKLOX5js.Y.call(void 0, ({user:{settings:s}})=>({settings:s}),_reactredux.shallowEqual),r=_react.useRef.call(void 0, i.volume),a=()=>{if(r.current!==i.volume){let{settings:s}=_chunkEYNKLOX5js.G.getState().user;_chunkDXDG2ALZjs.t.call(void 0, _chunkDXDG2ALZjs.l.call(void 0, r.current,s.volume)),r.current=s.volume,l(_chunkEYNKLOX5js.E.call(void 0, {...s,volume:s.volume}))}},f=s=>{let{settings:u}=_chunkEYNKLOX5js.G.getState().user;s==="mute"?(_chunkPWG4S5I5js.b.call(void 0, 0),_chunkDXDG2ALZjs.t.call(void 0, _chunkDXDG2ALZjs.l.call(void 0, u.volume,0))):(_chunkDXDG2ALZjs.t.call(void 0, _chunkDXDG2ALZjs.l.call(void 0, u.volume,100)),_chunkPWG4S5I5js.b.call(void 0, 100))};return _jsxruntime.jsxs.call(void 0, "div",{className:"pl-relative pl-inline-flex pl-items-center pl-gap-2 pl-sound-icon",children:[!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&_jsxruntime.jsx.call(void 0, "input",{onMouseUp:a,type:"range",min:"0",max:"100",value:i.volume,onChange:s=>_chunkPWG4S5I5js.b.call(void 0, +s.target.value),className:"pl-soundVolume pl-cursor-pointer",style:{background:`linear-gradient(to right, white ${i.volume}%, rgba(255,255,255,0.3) 0)`}}),_jsxruntime.jsxs.call(void 0, "div",{className:"pl-relative pl-flex pl-items-center",children:[_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkEYNKLOX5js.W.call(void 0, "hasSound")?_chunkB2G6UUYPjs.a.unMute:_chunkB2G6UUYPjs.a.mute,alt:_chunkEYNKLOX5js.W.call(void 0, "hasSound")?"unmute-icon":"mute-icon",className:"pl-flex pl-items-center pl-cursor-pointer",width:20,height:20,onClick:()=>_chunkEYNKLOX5js.W.call(void 0, "hasSound")?f("mute"):f("unmute"),onDoubleClick:s=>s.stopPropagation(),onMouseOver:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&o(!0),onMouseLeave:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&o(!1)}),e&&_jsxruntime.jsx.call(void 0, C,{className:"pl-left-0",title:`${_chunkEYNKLOX5js.W.call(void 0, "hasSound")?"\u0628\u0627 \u0635\u062F\u0627":"\u0628\u06CC \u0635\u062F\u0627"}`})]})]})},Ft=il;_chunkA3BCKK27js.e.call(void 0, );_chunkA3BCKK27js.e.call(void 0, );var _reactdom = require('react-dom');var $t=_react.forwardRef.call(void 0, ({children:e,status:o,onClose:l,type:i,classNames:r,parentClassNames:a,styles:f,isBlurBackground:s,isFullHeight:u=!1,isHeader:c,isHasCatchUpLineOnTop:y=!1,animation:m,scrollbar:g=!1,isFocusOnInput:_=!1},M)=>{let[F,A]=_react.useState.call(void 0, o),[$,Be]=_react.useState.call(void 0, 0),[so,po]=_react.useState.call(void 0, 0),{videoElementSizeInfo:qe}=_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{videoElementSizeInfo:k}})=>({videoElementSizeInfo:k}),_reactredux.shallowEqual),ye=_react.useRef.call(void 0, 0);_react.useEffect.call(void 0, ()=>{let k;return o?A(!0):k=setTimeout(()=>{l(!1),Be(0),A(!1)},500),()=>clearTimeout(k)},[o]);let ao=k=>{let mo=document.getElementById("popover-content");ye.current||(ye.current=window.innerHeight-qe.top-_optionalChain([mo, 'optionalAccess', _2 => _2.getBoundingClientRect, 'call', _3 => _3(), 'access', _4 => _4.top])),k.stopPropagation(),window.innerHeight-qe.top-k.touches[0].clientY<ye.current&&Be(window.innerHeight-k.touches[0].clientY),po(1000004)},co=()=>{l()},ze=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[s&&_jsxruntime.jsx.call(void 0, "div",{className:`pl-bg-black/[0.5] pl-w-screen pl-h-screen pl-fixed pl-top-0 pl-right-0 animate__animated animate__faster ${o?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:1000001}}),_jsxruntime.jsx.call(void 0, "div",{className:`${i==="modal"&&"pl-fixed pl-top-0 pl-left-0 pl-flex pl-w-full pl-h-full pl-justify-center pl-items-end sm:pl-items-center"} ${a}`,style:{zIndex:u&&!_?so:1000003},children:_jsxruntime.jsx.call(void 0, "div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9]
|
|
2
|
+
${u&&"pl-h-full"}
|
|
3
|
+
${m||(window.innerWidth>768&&i==="modal"?o?"animate__fadeIn":"animate__fadeOut":o?"animate__fadeInUp":"animate__fadeOutDown")}
|
|
4
|
+
${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait")?"!pl-fixed !pl-right-0 !pl-left-0 !pl-bottom-0 !pl-w-full !pl-mb-0 pl-rounded-[12px] !pl-rounded-b-none !pl-bg-white":"before:pl-hidden"}
|
|
5
|
+
${i!=="modal"&&"pl-absolute pl-bottom-[130%] pl-overflow-auto no-scrollbar"}
|
|
6
|
+
${r}
|
|
7
|
+
`,style:{height:$||"max-content",zIndex:1000003,...f},ref:M,id:"popover-content",children:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[c&&_jsxruntime.jsx.call(void 0, "div",{onTouchMove:y?ao:()=>{},onTouchEndCapture:y?co:()=>{},className:"pl-py-4",children:y&&_jsxruntime.jsx.call(void 0, "div",{className:"pl-absolute pl-top-[10px] pl-right-[50%] pl-mr-[-25px] pl-text-center pl-w-8 pl-h-1 pl-rounded-[20px] pl-bg-gray-highLight"})}),_jsxruntime.jsx.call(void 0, "div",{className:`pl-overflow-y-auto pl-h-full pl-w-full ${!g&&"no-scrollbar"}`,onTouchMove:k=>k.stopPropagation(),children:e})]})})})]});return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:F&&_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:i==="modal"?_reactdom.createPortal.call(void 0, _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:ze}),document.getElementById("dialog-react-root-videoPlayer")):_jsxruntime.jsx.call(void 0, "div",{children:ze})})})});$t.displayName="popover";var R=$t;_chunkA3BCKK27js.e.call(void 0, );_chunkA3BCKK27js.e.call(void 0, );var ml=(e,o)=>{_react.useEffect.call(void 0, ()=>{let l=i=>{!e.current||e.current.contains(i.target)||o(i)};return document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("touchstart",l)}},[e,o])},H=ml;var hl=({setSection:e,showQualityLevelsIcon:o})=>{let l=_chunkEYNKLOX5js.X.call(void 0, ),{qualityLevels:i}=_chunkEYNKLOX5js.Y.call(void 0, ({controller:{qualityLevels:m,manualQuality:g,autoQuality:_,showMiniPlayer:M}})=>({qualityLevels:m,manualQuality:g,autoQuality:_,showMiniPlayer:M}),_reactredux.shallowEqual),{settings:r}=_chunkEYNKLOX5js.Y.call(void 0, ({user:{settings:m}})=>({settings:m}),_reactredux.shallowEqual),{qualityLevelsPopover:a}=_chunkEYNKLOX5js.Y.call(void 0, ({popovers:{qualityLevelsPopover:m}})=>({qualityLevelsPopover:m}),_reactredux.shallowEqual);_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{params:m,videoElementSizeInfo:g}})=>({params:m,videoElementSizeInfo:g}),_reactredux.shallowEqual);let[f,s]=_react.useState.call(void 0, !1);i=[-1,...i];let u=(m,g)=>_chunkEYNKLOX5js.W.call(void 0, "isAutoQuality")&&g===-1?!0:!_chunkEYNKLOX5js.W.call(void 0, "isAutoQuality")&&r.quality===m,c=_react.useRef.call(void 0, null);H(c,()=>{a&&l(_chunkEYNKLOX5js.C.call(void 0, !1))});let y=_jsxruntime.jsx.call(void 0, "div",{id:"qualityLevels",className:"animate__animated animate__fadeIn pl-py-2",children:_jsxruntime.jsx.call(void 0, "ul",{className:"pl-flex pl-flex-col",children:i.map((m,g)=>_jsxruntime.jsxs.call(void 0, "li",{className:`pl-flex pl-items-center pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 pl-p-1 pl-pr-2 ${u(g-1,m)&&"pl-bg-primary/[0.12] !pl-cursor-default"}`,onClick:u(g-1,m)?()=>{}:()=>{_chunkDXDG2ALZjs.t.call(void 0, _chunkDXDG2ALZjs.g.call(void 0, m===-1?"auto":`${m}P`)),l(_chunkEYNKLOX5js.f.call(void 0, !1)),l(_chunkEYNKLOX5js.A.call(void 0, !1)),l(_chunkEYNKLOX5js.C.call(void 0, !1)),l(_chunkEYNKLOX5js.E.call(void 0, {...r,quality:m===-1?-1:g-1})),e&&e("main")},children:[!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&u(g-1,m)&&_jsxruntime.jsx.call(void 0, "div",{className:"pl-absolute pl-right-[10px]",children:_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.tick,alt:"",width:12,height:9})}),_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&_jsxruntime.jsx.call(void 0, "div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${u(g-1,m)&&"pl-border-primary"} pl-mr-[10px]`,children:u(g-1,m)&&_jsxruntime.jsx.call(void 0, "div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),_jsxruntime.jsx.call(void 0, "span",{className:`pl-w-full pl-px-2 pl-py-1 ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")?"pl-pr-[21px]":"pl-pr-[36px]"}`,children:m===-1?_jsxruntime.jsxs.call(void 0, "span",{children:[_jsxruntime.jsx.call(void 0, "span",{className:"pl-text-[12px] pl-font-medium",children:"\u062E\u0648\u062F\u06A9\u0627\u0631 "}),_jsxruntime.jsx.call(void 0, "span",{className:"pl-text-[10px] pl-font-normal pl-text-black/[0.87]",children:"(\u0628\u0631 \u0627\u0633\u0627\u0633 \u0633\u0631\u0639\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u0634\u0645\u0627)"})]}):`${m}p`})]},g))})});return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:o?_jsxruntime.jsxs.call(void 0, "div",{className:"pl-relative pl-flex pl-items-center",children:[_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.qualitySetting1,alt:"speed-icon",width:20,height:20,onClick:()=>l(_chunkEYNKLOX5js.C.call(void 0, !0)),onMouseOver:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&!_chunkEYNKLOX5js.W.call(void 0, "showQualityLevelsPopover")&&s(!0),onMouseLeave:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&s(!1),className:"pl-cursor-pointer"}),f&&_jsxruntime.jsx.call(void 0, C,{title:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),_jsxruntime.jsx.call(void 0, R,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"pl-right-0 pl-mb-[33px] !pl-rounded-[12px] pl-w-[230px]"} ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[285px]"} ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"}`,status:a,onClose:()=>l(_chunkEYNKLOX5js.C.call(void 0, !1)),type:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")?"modal":"popover",isBlurBackground:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait"),ref:c,isHeader:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen"),customHeader:_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}),isHasCatchUpLineOnTop:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen"),children:y})]}):_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:y})})},de=_react.memo.call(void 0, hl);_chunkA3BCKK27js.e.call(void 0, );var yl=[.5,.75,1,1.25,1.5,1.75,2],xl=({setSection:e,showSpeedIcon:o})=>{let l=_chunkEYNKLOX5js.X.call(void 0, );_chunkEYNKLOX5js.Y.call(void 0, ({controller:{showMiniPlayer:c}})=>({showMiniPlayer:c}),_reactredux.shallowEqual),_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{videoElementSizeInfo:c,params:y}})=>({videoElementSizeInfo:c,params:y}),_reactredux.shallowEqual);let{speedPopover:i}=_chunkEYNKLOX5js.Y.call(void 0, ({popovers:{speedPopover:c}})=>({speedPopover:c}),_reactredux.shallowEqual),{settings:r}=_chunkEYNKLOX5js.Y.call(void 0, ({user:{settings:c}})=>({settings:c}),_reactredux.shallowEqual),a=_react.useRef.call(void 0, null),[f,s]=_react.useState.call(void 0, !1);H(a,()=>{i&&l(_chunkEYNKLOX5js.B.call(void 0, !1))}),_react.useEffect.call(void 0, ()=>{_chunkDXDG2ALZjs.a.call(void 0, )&&(_chunkDXDG2ALZjs.a.call(void 0, ).playbackRate=r.speed)},[]);let u=_jsxruntime.jsx.call(void 0, "div",{id:"speed",className:"animate__animated animate__fadeIn pl-py-2",children:_jsxruntime.jsx.call(void 0, "ul",{className:"pl-flex pl-flex-col",children:yl.map((c,y)=>_jsxruntime.jsxs.call(void 0, "li",{className:`pl-flex pl-items-center pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 pl-p-1 pl-pr-2 ${r.speed===c&&"pl-bg-primary/[0.12] !pl-cursor-default"}`,onClick:r.speed===c?()=>{}:()=>{_chunkEYNKLOX5js.W.call(void 0, "isStaticFormat")||_chunkDXDG2ALZjs.t.call(void 0, _chunkDXDG2ALZjs.f.call(void 0, c)),l(_chunkEYNKLOX5js.f.call(void 0, !1)),l(_chunkEYNKLOX5js.A.call(void 0, !1)),l(_chunkEYNKLOX5js.B.call(void 0, !1)),l(_chunkEYNKLOX5js.E.call(void 0, {...r,speed:c})),_chunkDXDG2ALZjs.a.call(void 0, ).playbackRate=c,e&&e("main")},children:[!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&r.speed===c&&_jsxruntime.jsx.call(void 0, "div",{className:"pl-absolute pl-right-[10px]",children:_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.tick,alt:"",width:12,height:9})}),_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&_jsxruntime.jsx.call(void 0, "div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${r.speed===c&&"pl-border-primary"} pl-mr-[10px]`,children:r.speed===c&&_jsxruntime.jsx.call(void 0, "div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),_jsxruntime.jsx.call(void 0, "p",{className:"pl-w-full pl-px-2 pl-py-1 pl-pr-[36px] pl-flex pl-items-center pl-gap-2",children:c})]},y))})});return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:o?_jsxruntime.jsxs.call(void 0, "div",{className:"pl-relative pl-flex pl-items-center",children:[_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.speed1,alt:"speed-icon",width:20,height:20,onClick:()=>l(_chunkEYNKLOX5js.B.call(void 0, !0)),onMouseOver:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&!_chunkEYNKLOX5js.W.call(void 0, "showSpeedPopover")&&s(!0),onMouseLeave:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&s(!1),className:"pl-cursor-pointer"}),f&&_jsxruntime.jsx.call(void 0, C,{title:"\u0633\u0631\u0639\u062A"}),_jsxruntime.jsx.call(void 0, R,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[285px] tablet:!pl-mx-auto"} ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"}`,status:i,onClose:()=>l(_chunkEYNKLOX5js.B.call(void 0, !1)),type:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")?"modal":"popover",isBlurBackground:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait"),ref:a,isHeader:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen"),customHeader:_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}),isHasCatchUpLineOnTop:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen"),children:u})]}):_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:u})})},he=xl;var Tl=()=>{let e=_chunkEYNKLOX5js.X.call(void 0, );_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{params:s}})=>({params:s}),_reactredux.shallowEqual);let{settingPopover:o}=_chunkEYNKLOX5js.Y.call(void 0, ({popovers:{settingPopover:s}})=>({settingPopover:s}),_reactredux.shallowEqual),[l,i]=_react.useState.call(void 0, "main"),[r,a]=_react.useState.call(void 0, !1),f=_react.useRef.call(void 0, null);return H(f,()=>{e(_chunkEYNKLOX5js.A.call(void 0, !1)),setTimeout(()=>i("main"),500)}),_jsxruntime.jsxs.call(void 0, "div",{className:`pl-inline-flex ${_chunkEYNKLOX5js.W.call(void 0, "isLandscape")&&"pl-relative"}`,ref:f,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"pl-flex pl-items-center pl-relative pl-cursor-pointer",onClick:()=>e(_chunkEYNKLOX5js.A.call(void 0, !o)),onMouseOver:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&!_chunkEYNKLOX5js.W.call(void 0, "showSettingPopover")&&a(!0),onMouseLeave:()=>!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&a(!1),children:[_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.settings,alt:"",width:20,height:20}),r&&_jsxruntime.jsx.call(void 0, C,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A"})]}),_jsxruntime.jsx.call(void 0, R,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[285px] tablet:!pl-mx-auto"} ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"}`,status:o,onClose:()=>{e(_chunkEYNKLOX5js.A.call(void 0, !1)),setTimeout(()=>i("main"),500)},type:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")?"modal":"popover",isBlurBackground:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait"),ref:f,isHeader:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen"),customHeader:_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}),isHasCatchUpLineOnTop:_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen"),children:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[l==="main"&&_jsxruntime.jsxs.call(void 0, "div",{id:"main",className:"pl-p-4 pl-rounded-[10px] pl-flex pl-flex-col pl-gap-5 animate__animated animate__fadeIn",children:[!_chunkEYNKLOX5js.W.call(void 0, "isStaticFormat")&&_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_jsxruntime.jsxs.call(void 0, "div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>i("qualityLevels"),children:[_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.qualitySetting,alt:"",width:16,height:16}),_jsxruntime.jsx.call(void 0, "p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium",children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.chevronLeft,alt:"",width:16,height:16})]})}),_jsxruntime.jsxs.call(void 0, "div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>i("speed"),children:[_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.speed,alt:"",width:20,height:20}),_jsxruntime.jsx.call(void 0, "p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium",children:"\u0633\u0631\u0639\u062A"}),_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.chevronLeft,alt:"",width:16,height:16})]})]}),l==="qualityLevels"&&_jsxruntime.jsx.call(void 0, de,{setSection:i}),l==="speed"&&_jsxruntime.jsx.call(void 0, he,{setSection:i})]})})]})},Rt=_react.memo.call(void 0, Tl);_chunkA3BCKK27js.e.call(void 0, );var Pl=()=>{let{duration:e,currentTime:o}=_chunkEYNKLOX5js.Y.call(void 0, ({controller:{duration:l,currentTime:i}})=>({duration:l,currentTime:i}),_reactredux.shallowEqual);return _chunkEYNKLOX5js.Y.call(void 0, ({videoData:{videoElementSizeInfo:l,params:i}})=>({videoElementSizeInfo:l,params:i}),_reactredux.shallowEqual),_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_jsxruntime.jsxs.call(void 0, "div",{className:`pl-mr-auto !pl-text-white pl-w-full pl-max-w-max pl-text-[12px] pl-font-bold ${_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")?"pl-ml-8":"pl-ml-4"} ${_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait")&&"!pl-ml-0"}`,children:[_jsxruntime.jsx.call(void 0, "span",{children:_chunkEYNKLOX5js.K.call(void 0, e)}),_jsxruntime.jsx.call(void 0, "span",{children:" / "}),_jsxruntime.jsx.call(void 0, "span",{children:_chunkEYNKLOX5js.K.call(void 0, o)})]})})},ge=Pl;_chunkA3BCKK27js.e.call(void 0, );var Cl=()=>_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.unlock,alt:"unlock-icon",width:20,height:20,onClick:()=>_chunkPWG4S5I5js.f.call(void 0, "lock")}),Vt=Cl;var _l=()=>{_chunkEYNKLOX5js.Y.call(void 0, ({controller:{isFullScreen:o,showMiniPlayer:l}})=>({isFullScreen:o,showMiniPlayer:l}),_reactredux.shallowEqual),_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{videoElementSizeInfo:o,params:l}})=>({videoElementSizeInfo:o,params:l}),_reactredux.shallowEqual);let e="";return _chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")?_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")?e="pl-mx-6":e="pl-mx-4":_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")?e="pl-mx-8":e="pl-mx-4",_jsxruntime.jsxs.call(void 0, "div",{id:"player-controllbar",className:`pl-flex pl-justify-between pl-items-center ${e}`,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"pl-flex pl-items-center pl-gap-5",children:[!_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")&&_jsxruntime.jsx.call(void 0, Ct,{}),_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenLandscape")&&_jsxruntime.jsx.call(void 0, Vt,{}),_chunkEYNKLOX5js.W.call(void 0, "showPictureInPicture")&&_jsxruntime.jsx.call(void 0, _t,{}),_chunkEYNKLOX5js.W.call(void 0, "showSettingIcon")&&_jsxruntime.jsx.call(void 0, Rt,{}),_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")&&!_chunkEYNKLOX5js.W.call(void 0, "isStaticFormat")&&_jsxruntime.jsx.call(void 0, de,{showQualityLevelsIcon:!0}),(_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")||_chunkEYNKLOX5js.W.call(void 0, "isStaticFormat"))&&_jsxruntime.jsx.call(void 0, he,{showSpeedIcon:!0})]}),_jsxruntime.jsxs.call(void 0, "div",{className:"pl-flex pl-items-center pl-gap-5",children:[_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait")&&_jsxruntime.jsx.call(void 0, ge,{}),!_chunkEYNKLOX5js.W.call(void 0, "isIOS")&&_jsxruntime.jsx.call(void 0, Ft,{})]})]})},Qt=_react.memo.call(void 0, _l);_chunkA3BCKK27js.e.call(void 0, );var Al=()=>{let e=_chunkEYNKLOX5js.X.call(void 0, ),{isLoading:o}=_chunkEYNKLOX5js.Y.call(void 0, ({controller:{isLoading:i}})=>({isLoading:i}),_reactredux.shallowEqual),{showCheckInternetSnackBar:l}=_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{showCheckInternetSnackBar:i}})=>({showCheckInternetSnackBar:i}),_reactredux.shallowEqual);return _react.useEffect.call(void 0, ()=>{let i=null;return clearTimeout(i),_chunkEYNKLOX5js.W.call(void 0, "isLoading")?(i=setTimeout(()=>{_chunkEYNKLOX5js.G.getState().controller.isLoading&&e(_chunkEYNKLOX5js.z.call(void 0, !0))},_chunkAUOAZWTSjs.b),i=setTimeout(()=>{e(_chunkEYNKLOX5js.z.call(void 0, !1)),e(_chunkEYNKLOX5js.f.call(void 0, !1))},_chunkAUOAZWTSjs.c)):(e(_chunkEYNKLOX5js.z.call(void 0, !1)),clearTimeout(i),e(_chunkEYNKLOX5js.f.call(void 0, !1))),()=>clearTimeout(i)},[o]),_jsxruntime.jsx.call(void 0, "div",{className:`pl-absolute pl-bottom-0 pl-w-full pl-flex pl-justify-center pl-mb-[20px] animate__animated animate__faster ${l?"animate__fadeIn":"animate__fadeOut"} ${_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")?"pl-z-[10]":"pl-z-[-1]"}`,children:_jsxruntime.jsxs.call(void 0, "div",{className:"pl-flex pl-items-center pl-gap-3 pl-bg-background pl-w-max pl-px-[18px] pl-py-4 pl-rounded-[8px]",children:[_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.infoCircle,alt:"info-circle",width:16,height:16}),_jsxruntime.jsx.call(void 0, "p",{className:"pl-text-[12px] pl-text-white/[0.9]",children:"\u0644\u0637\u0641\u0627 \u0648\u0636\u0639\u06CC\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u062E\u0648\u062F \u0631\u0627 \u0628\u0631\u0631\u0633\u06CC \u06A9\u0646\u06CC\u062F."})]})})},Se=Al;var Ol=()=>{_chunkEYNKLOX5js.Y.call(void 0, ({controller:{lock:o,isFullScreen:l,isLoading:i,activeElements:r}})=>({lock:o,isFullScreen:l,isLoading:i,activeElements:r}),_reactredux.shallowEqual);let e="";return _chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")?_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")?e="pl-gap-6 pl-mb-6":e="pl-gap-6 pl-mb-0":_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")?e="pl-gap-6 pl-mb-8":e="pl-gap-4 pl-mb-3",_jsxruntime.jsx.call(void 0, "div",{id:"footer",className:"pl-relative",style:{zIndex:4},children:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[!_chunkEYNKLOX5js.W.call(void 0, "isLock")&&_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_jsxruntime.jsxs.call(void 0, "div",{className:`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${e} ${_chunkEYNKLOX5js.W.call(void 0, "isActiveElements")&&!_chunkEYNKLOX5js.W.call(void 0, "isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait")&&_jsxruntime.jsx.call(void 0, ge,{}),_chunkEYNKLOX5js.W.call(void 0, "showProgressbar")&&_jsxruntime.jsx.call(void 0, It,{}),_jsxruntime.jsx.call(void 0, Qt,{})]})}),_jsxruntime.jsx.call(void 0, Se,{})]})})},Zt=Ol;_chunkA3BCKK27js.e.call(void 0, );var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);var Bl=_dynamic2.default.call(void 0, ()=>Promise.resolve().then(() => _interopRequireWildcard(require("./staticVideoTag-XP5YU732.js")))),ql=_dynamic2.default.call(void 0, ()=>Promise.resolve().then(() => _interopRequireWildcard(require("./nonStaticVideoTag-ZEIK3NO3.js")))),zl=()=>_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_chunkEYNKLOX5js.W.call(void 0, "isStaticFormat")?_jsxruntime.jsx.call(void 0, Bl,{}):_jsxruntime.jsx.call(void 0, ql,{})}),Kt=zl;_chunkA3BCKK27js.e.call(void 0, );var Vl=()=>{let e=_chunkEYNKLOX5js.X.call(void 0, );_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{params:o}})=>({params:o}),_reactredux.shallowEqual),_react.useEffect.call(void 0, ()=>{let o=()=>{document.fullscreenElement?e(_chunkEYNKLOX5js.h.call(void 0, !0)):(e(_chunkEYNKLOX5js.h.call(void 0, !1)),_chunkPWG4S5I5js.h.call(void 0, ),_chunkDXDG2ALZjs.t.call(void 0, _chunkDXDG2ALZjs.j.call(void 0, "exitFullScreen")))};document.addEventListener&&(document.addEventListener("webkitfullscreenchange",o,!1),document.addEventListener("mozfullscreenchange",o,!1),document.addEventListener("fullscreenchange",o,!1),document.addEventListener("MSFullscreenChange",o,!1))},[])},jt=Vl;_chunkA3BCKK27js.e.call(void 0, );var Ql=(e,o)=>{let l=_chunkEYNKLOX5js.X.call(void 0, ),{activeElements:i}=_chunkEYNKLOX5js.Y.call(void 0, ({controller:{activeElements:s}})=>({activeElements:s}),_reactredux.shallowEqual),r=_react.useRef.call(void 0, null),a=_react.useRef.call(void 0, e),f=_react.useRef.call(void 0, o);_react.useEffect.call(void 0, ()=>{a.current=e},[e]),_react.useEffect.call(void 0, ()=>{f.current=o},[o]),_react.useEffect.call(void 0, ()=>{let s=!1,u=m=>{let{activeElements:g,isEnded:_}=_chunkEYNKLOX5js.G.getState().controller;_?l(_chunkEYNKLOX5js.f.call(void 0, !0)):m.pointerType==="mouse"&&(clearTimeout(r.current),g?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward"].includes(m.target.id)&&(s=!0):l(_chunkEYNKLOX5js.f.call(void 0, !0)),r.current=setTimeout(()=>{let{settingPopover:M,speedPopover:F,qualityLevelsPopover:A}=_chunkEYNKLOX5js.G.getState().popovers,{play:$}=_chunkEYNKLOX5js.G.getState().controller;!M&&!F&&!A&&$&&s&&l(_chunkEYNKLOX5js.f.call(void 0, !1))},_chunkAUOAZWTSjs.a))},c=m=>{setTimeout(()=>{let{activeElements:g,isEnded:_,firstPlay:M}=_chunkEYNKLOX5js.G.getState().controller;if(clearTimeout(r.current),_)return l(_chunkEYNKLOX5js.f.call(void 0, !0));_chunkEYNKLOX5js.J.call(void 0, )&&!M&&!a.current&&!f.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward"].includes(m.target.id)||_chunkEYNKLOX5js.N.call(void 0, m,"playerElements")?(l(_chunkEYNKLOX5js.f.call(void 0, !g)),r.current=setTimeout(()=>{let{settingPopover:F,speedPopover:A,qualityLevelsPopover:$}=_chunkEYNKLOX5js.G.getState().popovers;!F&&!A&&!$&&l(_chunkEYNKLOX5js.f.call(void 0, !1))},_chunkAUOAZWTSjs.a)):r.current=setTimeout(()=>{let{settingPopover:F,speedPopover:A,qualityLevelsPopover:$}=_chunkEYNKLOX5js.G.getState().popovers;!F&&!A&&!$&&l(_chunkEYNKLOX5js.f.call(void 0, !1))},_chunkAUOAZWTSjs.a))},200)},y=()=>{clearTimeout(r.current),r.current=setTimeout(()=>{let{activeElements:m,isEnded:g}=_chunkEYNKLOX5js.G.getState().controller,{settingPopover:_,speedPopover:M,qualityLevelsPopover:F}=_chunkEYNKLOX5js.G.getState().popovers;g?l(_chunkEYNKLOX5js.f.call(void 0, !0)):!_&&!M&&!F&&m&&!g&&l(_chunkEYNKLOX5js.f.call(void 0, !m))},_chunkAUOAZWTSjs.a)};return document.getElementById("video-area").addEventListener("touchstart",c),document.getElementById("video-area").addEventListener("touchmove",y),document.getElementById("video-area").addEventListener("pointermove",u),()=>{let m=document.getElementById("video-area");m&&(m.removeEventListener("touchstart",c),m.removeEventListener("touchmove",y),m.removeEventListener("pointermove",u))}},[i,e,o])},eo=Ql;_chunkA3BCKK27js.e.call(void 0, );var Yl=()=>{let{firstPlay:e,showMiniPlayer:o,isFullScreen:l}=_chunkEYNKLOX5js.Y.call(void 0, ({controller:{firstPlay:i,showMiniPlayer:r,isFullScreen:a}})=>({firstPlay:i,showMiniPlayer:r,isFullScreen:a}),_reactredux.shallowEqual);_react.useEffect.call(void 0, ()=>{if(_chunkDXDG2ALZjs.a.call(void 0, )){let i,r=()=>{_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")||(i=setTimeout(()=>{_chunkPWG4S5I5js.h.call(void 0, )},_chunkEYNKLOX5js.J.call(void 0, )?0:300))};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),clearTimeout(i)}}},[e,o,l,_chunkDXDG2ALZjs.a.call(void 0, )])},to=Yl;var Zl=_dynamic2.default.call(void 0, ()=>Promise.resolve().then(() => _interopRequireWildcard(require("./touchVolumeBrightness-GBJRENZL.js")))),ro=_dynamic2.default.call(void 0, ()=>Promise.resolve().then(() => _interopRequireWildcard(require("./backwardForward-K7BDXF77.js")))),Jl=()=>{let[e,o]=_react.useState.call(void 0, !1),[l,i]=_react.useState.call(void 0, !1),r=_chunkEYNKLOX5js.X.call(void 0, ),{details:a,params:f}=_chunkEYNKLOX5js.Y.call(void 0, ({videoData:{details:s,params:u,videoElementSizeInfo:c,showCheckInternetSnackBar:y}})=>({details:s,params:u,videoElementSizeInfo:c,showCheckInternetSnackBar:y}),_reactredux.shallowEqual);return _chunkEYNKLOX5js.Y.call(void 0, ({controller:{firstPlay:s,showMiniPlayer:u,isFullScreen:c,isLoading:y}})=>({firstPlay:s,showMiniPlayer:u,isFullScreen:c,isLoading:y}),_reactredux.shallowEqual),jt(),to(),eo(e,l),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")&&_jsxruntime.jsx.call(void 0, "div",{id:"black-video-area",className:`pl-relative pl-w-full pl-aspect-video pl-bg-black pl-rounded ${!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&!_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")&&"!pl-rounded-[12px]"}`}),_jsxruntime.jsxs.call(void 0, "div",{id:"video-area",style:{zIndex:_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")?1000005:_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")?1e6:"unset"},onClick:s=>_chunkEYNKLOX5js.W.call(void 0, "isFirstPlay")&&_chunkPWG4S5I5js.a.call(void 0, s),onDoubleClick:s=>!_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")&&_chunkPWG4S5I5js.i.call(void 0, s),className:`!pl-bg-contain !pl-bg-center !pl-bg-no-repeat pl-h-full pl-bg-black pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&!_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")&&"!pl-rounded-[12px]"} ${_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")&&"!pl-fixed !pl-w-screen dvh"} ${_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")?"!pl-fixed !pl-bottom-[10px] !pl-right-[10px] !pl-w-[95%] !pl-max-w-[400px] !pl-max-h-[225px] pl-aspect-video !pl-rounded-[8px]":"pl-w-full pl-relative"} ${_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")&&_chunkEYNKLOX5js.W.call(void 0, "isTouchScreenPortrait")&&"!pl-w-[300px] !pl-aspect-video"} ${!_chunkEYNKLOX5js.W.call(void 0, "isActiveElements")&&"pl-cursor-none"}`,children:[_jsxruntime.jsx.call(void 0, "div",{className:`pl-absolute pl-w-full pl-aspect-video pl-transition-all pl-duration-500 pl-bg-black ${!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&!_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")&&"!pl-rounded-[12px]"} ${_chunkEYNKLOX5js.W.call(void 0, "isActiveElements")?"pl-bg-opacity-50":"pl-bg-opacity-0"}`}),_chunkEYNKLOX5js.W.call(void 0, "showBanner")&&_jsxruntime.jsx.call(void 0, "div",{className:"pl-absolute pl-w-full pl-h-full pl-flex pl-justify-center",children:_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkEYNKLOX5js.W.call(void 0, "isStaticFormat")?f.cover:a.banner,layout:"fill",alt:f.bannerAlt?f.bannerAlt:_chunkEYNKLOX5js.W.call(void 0, "isStaticFormat")?"\u0628\u0646\u0631 \u0648\u06CC\u062F\u06CC\u0648 \u067E\u0644\u06CC\u0631 \u06A9\u0627\u0641\u0647 \u0648\u06CC\u062F\u06CC\u0648":a.title,objectFit:"contain",className:`${!_chunkEYNKLOX5js.W.call(void 0, "isTouchScreen")&&!_chunkEYNKLOX5js.W.call(void 0, "isFullScreen")&&"pl-rounded-[12px]"}`})}),_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")&&_jsxruntime.jsxs.call(void 0, "div",{className:"pl-z-[100]",children:[_jsxruntime.jsx.call(void 0, "div",{className:"pl-absolute pl-top-3 pl-right-3 pl-cursor-pointer",onClick:()=>r(_chunkEYNKLOX5js.r.call(void 0, void 0)),children:_jsxruntime.jsx.call(void 0, _image2.default,{src:_chunkB2G6UUYPjs.a.closeSquare,alt:"close-square",width:16,height:16})}),_jsxruntime.jsx.call(void 0, "div",{className:`pl-w-full pl-absolute pl-bottom-0 animate__animated animate__faster ${_chunkEYNKLOX5js.W.call(void 0, "isActiveElements")&&!_chunkEYNKLOX5js.W.call(void 0, "isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:_jsxruntime.jsx.call(void 0, "div",{className:"pl-w-full pl-flex pl-justify-center",children:_jsxruntime.jsx.call(void 0, ae,{})})}),_jsxruntime.jsx.call(void 0, Se,{})]}),_chunkEYNKLOX5js.W.call(void 0, "showTouchVolumeBrightness")&&_jsxruntime.jsx.call(void 0, Zl,{}),_chunkEYNKLOX5js.W.call(void 0, "showBackwardForward")&&_jsxruntime.jsxs.call(void 0, "div",{className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full pl-overflow-hidden pl-flex pl-items-center",style:{zIndex:l||e?1000002:1},children:[_jsxruntime.jsx.call(void 0, ro,{type:"touchForward",isRightDoubleTouched:e,setIsRightDoubleTouched:o}),_jsxruntime.jsx.call(void 0, ro,{type:"touchBackward",isLeftDoubleTouched:l,setIsLeftDoubleTouched:i})]}),_jsxruntime.jsx.call(void 0, Kt,{}),!_chunkEYNKLOX5js.W.call(void 0, "showMiniPlayer")&&_jsxruntime.jsx.call(void 0, "div",{id:"playerElements",className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full",children:_jsxruntime.jsxs.call(void 0, "div",{className:"pl-flex pl-flex-col pl-justify-between pl-w-full pl-h-full",children:[_chunkEYNKLOX5js.W.call(void 0, "showHeader")&&_jsxruntime.jsx.call(void 0, nt,{}),_chunkEYNKLOX5js.W.call(void 0, "showMain")&&_jsxruntime.jsx.call(void 0, ct,{}),_chunkEYNKLOX5js.W.call(void 0, "showFooter")&&_jsxruntime.jsx.call(void 0, Zt,{})]})})]})]})},Ma= exports.a =Jl;exports.a = Ma;
|
|
8
|
+
//# sourceMappingURL=chunk-SYSS7LEA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/videoArea/videoArea.tsx","../src/videoPlayerLibrary/components/custom-components/header/header.tsx","../src/videoPlayerLibrary/components/custom-components/title/title.tsx","../src/videoPlayerLibrary/components/custom-components/lockUnlock/lock.tsx","../src/videoPlayerLibrary/components/custom-components/main/main.tsx","../src/videoPlayerLibrary/components/custom-components/playPause/playPause.tsx","../src/videoPlayerLibrary/components/custom-components/footer/footer.tsx","../src/videoPlayerLibrary/components/custom-components/footer/progressbar/progressbar.tsx","../src/videoPlayerLibrary/components/custom-components/tooltip/tooltip.tsx","../src/videoPlayerLibrary/helpers/redux/actions/progressbar.actions.ts","../src/videoPlayerLibrary/components/custom-components/footer/controllbar/controllbar.tsx","../src/videoPlayerLibrary/components/custom-components/fullScreen/fullScreen.tsx","../src/videoPlayerLibrary/components/custom-components/footer/controllbar/controllbarTooltip.tsx","../src/videoPlayerLibrary/components/custom-components/pictureInPicture/pictureInPicture.tsx","../src/videoPlayerLibrary/components/custom-components/soundVolume/soundVolume.tsx","../src/videoPlayerLibrary/components/custom-components/settings/settings.tsx","../src/videoPlayerLibrary/components/custom-components/popover/popover.tsx","../src/videoPlayerLibrary/components/custom-components/qualityLevels/qualityLevels.tsx","../src/videoPlayerLibrary/helpers/hooks/useOnClickOutside.tsx","../src/videoPlayerLibrary/components/custom-components/speed/speed.tsx","../src/videoPlayerLibrary/components/custom-components/elapsedTime/elapsedTime.tsx","../src/videoPlayerLibrary/components/custom-components/lockUnlock/unlock.tsx","../src/videoPlayerLibrary/components/custom-components/checkInternet/checkInternet.tsx","../src/videoPlayerLibrary/components/custom-components/videoTag/videoTag.tsx","../src/videoPlayerLibrary/helpers/hooks/useFullScreen.tsx","../src/videoPlayerLibrary/helpers/hooks/useActiveInActive.tsx","../src/videoPlayerLibrary/helpers/hooks/useHandleResize.tsx"],"names":["init_cjs_shims","Image","useState","shallowEqual","jsx","Title","details","params","useAppSelector","conditions","title_default","jsxs","Lock","importImages_default","handleLock","lock_default","Header","lock","activeElements","header_default","useEffect","PlayPause","play","showMiniPlayer","videoElementSizeInfo","event","handlePlayPause","playPause_default","Main","showIcons","setShowIcons","firstPlay","timeout","backwardForward_default","main_default","memo","getPointerTime","store_default","duration","clientX","getPointerPosition","hideProgressTooltip","progressTooltip","generalStyleTooltipHandler","vttTooltipStyleHandler","element","parentPlayer","videoTag","showProgressTooltip","progressBarTooltip","setTooltipTime","secondsToHMS","handleTimeTooltip","isTimer","handleProgressTime","progressBar","handlePointerDown","timeoutIds","setIsPointerDown","dispatch","setActivePointerProgressBar","setDelayTurnOffControlbar","id","handlePointerMove","activePointerProgressBar","left","handlePointerUp","setTimeoutIds","right","currentTime","handleVideoTimeline","handleTimeout","ids","timeoutIdTemp","settingPopover","delayTurnOffControlbar","setActiveElements","activeElementsTime","handleCatchUpLoadingLog","timer","sendFluentLog","catchUpLoadingLog","handleMouseMove","handleMouseOut","deconstructTimestamp","timestamp","splitStampMilliseconds","timePartsSplit","getSecondsFromTimestamp","timestampParts","getPropsFromDef","def","imageDefSplit","imageUrl","splitCoords","getFullyQualifiedUrl","path","base","getVttCss","vttImageDef","vttUrl","cssObj","baseSplit","imageProps","fetchFile","url","setVttPool","response","setInfo","data","processedVtts","vttDef","vttDefSplit","vttTimingSplit","vttTimeStart","vttTimeEnd","vttCssDef","error","getStyleForTime","time","vttPool","cache","item","objectVtt","Fragment","Tooltip","tooltipTime","isFullScreen","setVttUrl","tooltip_default","ProgressBar","isPointerDown","bufferedTimeWidth","progressBarWidth","progressbar_default","ControllbarTooltip","title","className","controllbarTooltip_default","FullScreen","showTooltip","setShowTooltip","useAppDispatch","handleFullScreen","handleLockOrientation","fullScreen_default","PictureInPicture","pictureInPicture_default","useRef","SoundVolume","settings","primaryVolumeRef","handleMouseUp","volumeLog","setUserSettings","handleMute","type","handleChangeSoundVolume","soundVolume_default","forwardRef","createPortal","Popover","children","status","onClose","classNames","parentClassNames","styles","isBlurBackground","isFullHeight","isHeader","isHasCatchUpLineOnTop","animation","scrollbar","isFocusOnInput","ref","showPopover","setShowPopover","heightOnTouchMove","setHeightOnTouchMove","zIndexOnCatchUp","setZIndexOnCatchUp","popoverContentHeightRef","handleTouchMove","popoverContent","handleTouchEnd","content","popover_default","useOnClickOutside","handler","listener","useOnClickOutside_default","QualityLevels","setSection","showQualityLevelsIcon","qualityLevels","manualQuality","autoQuality","qualityLevelsPopover","handleTickSelectedQuality","index","qualityLevel","qualityLevelsRef","setQualityLevelsPopover","qualityLevelsContent","qualityChangeRequestLog","setSettingPopover","qualityLevels_default","speeds","Speed","showSpeedIcon","speedPopover","speedRef","setSpeedPopover","speedContent","speed","speedChangeLog","speed_default","Settings","section","settingsRef","settings_default","ElapsedTime","elapsedTime_default","Unlock","unlock_default","Controlbar","controllbar_default","CheckInternet","isLoading","showCheckInternetSnackBar","setShowCheckInternetSnackBar","showLoaderTime","notShowingLoaderTime","checkInternet_default","Footer","footer_default","dynamic","StaticVideoTag","NonStaticVideoTag","VideoTag","videoTag_default","useFullScreen","handleChangeFullScreen","setIsFullScreen","handleVideoElementSizeInfo","fullscreenLog","useFullScreen_default","useActiveInActive","isRightDoubleTouched","isLeftDoubleTouched","timeoutRef","isRightDoubleTouchedRef","isLeftDoubleTouchedRef","shouldInActiveElements","isEnded","handleTouchStart","isTouchScreen","checkParentTarget","videoArea","useActiveInActive_default","useHandleResize","handleResize","useHandleResize_default","TouchVolumeBrightness","BackwardForward","VideoArea","setIsRightDoubleTouched","setIsLeftDoubleTouched","handleDoubleClick","setShowMiniPlayer","videoArea_default"],"mappings":"uiBAAAA,IAEA,OAAOC,OAAW,oBAClB,OAAqB,YAAAC,OAAgB,QACrC,OAAS,gBAAAC,OAAoB,cCJ7BH,IAAA,OAAS,gBAAAG,OAAoB,cCA7BH,IAAA,OAAS,gBAAAG,OAAoB,cASrB,cAAAC,OAAA,oBAJR,IAAMC,GAAQ,IAAM,CAChB,GAAM,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ACpCE,GAAC,OAAI,UAAU,aACX,UAAAP,EAAC,OAAI,UAAU,oDAAoD,QAAS,IAAMuD,EAASmN,GAAkB,MAAS,CAAC,EACnH,SAAA1Q,EAACH,GAAA,CACG,IAAKY,EAAO,YACZ,IAAI,eACJ,MAAO,GACP,OAAQ,GACZ,EACJ,EACAT,EAAC,OAAI,UAAW,uEAAuEK,oBAAyC,GAAK,CAACA,aAAkC,EAClK,yCACA,yCACF,GACI,SAAAL,EAAC,OAAI,UAAU,sCACX,SAAAA,EAACuB,GAAA,EAAU,EACf,EACJ,EACJvB,EAACsO,GAAA,EAAc,GACnB,EAEHjO,6BAAkD,GAAKL,EAACoQ,GAAA,EAAsB,EAC9E/P,uBAA4C,GACzCE,GAAC,OACG,UAAW,iGACX,MAAO,CACH,OAAQ+O,GAAuBD,WACnC,EAEA,UAAArP,EAACqQ,GAAA,CACG,KAAK,eACL,qBAAsBhB,EACtB,wBAAyBkB,EAC7B,EACAvQ,EAACqQ,GAAA,CACG,KAAK,gBACL,oBAAqBf,EACrB,uBAAwBkB,EAC5B,GACJ,EAEJxQ,EAAC6O,GAAA,EAAS,EACT,CAACxO,kBAAuC,GACrCL,EAAC,OACG,GAAG,iBACH,UAAW,sDAEX,SAAAO,GAAC,OAAI,UAAW,6DACX,UAAAF,cAAmC,GAAKL,EAACe,GAAA,EAAO,EAChDV,YAAiC,GAAKL,EAAC8B,GAAA,EAAK,EAC5CzB,cAAmC,GAAKL,EAACwO,GAAA,EAAO,GACrD,EACJ,GAER,GACJ,CAER,EAEOmC,GAAQL","sourcesContent":["\"use client\";\r\n\r\nimport Image from \"next/legacy/image\";\r\nimport { MouseEvent, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport Header from \"../header/header\";\r\nimport Main from \"../main/main\";\r\nimport Footer from \"../footer/footer\";\r\nimport VideoTag from \"../videoTag/videoTag\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName, zIndex } from \"../../../helpers/interfaces/enums\";\r\nimport { handleDoubleClick, handlePlayPause } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport useFullScreen from \"../../../helpers/hooks/useFullScreen\";\r\nimport useActiveInActive from \"../../../helpers/hooks/useActiveInActive\";\r\nimport { setShowMiniPlayer } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport PlayPause from \"../playPause/playPause\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport CheckInternet from \"../checkInternet/checkInternet\";\r\nimport dynamic from \"next/dynamic\";\r\nimport useHandleResize from \"../../../helpers/hooks/useHandleResize\";\r\n\r\nconst TouchVolumeBrightness = dynamic(() => import(\"../touchVolumeBrightness/touchVolumeBrightness\"));\r\nconst BackwardForward = dynamic(() => import(\"../backwardForward/backwardForward\"));\r\n\r\nconst VideoArea = () => {\r\n\r\n const [isRightDoubleTouched, setIsRightDoubleTouched] = useState<boolean>(false);\r\n const [isLeftDoubleTouched, setIsLeftDoubleTouched] = useState<boolean>(false);\r\n\r\n const dispatch = useAppDispatch();\r\n\r\n const { details, params } = useAppSelector(\r\n ({ videoData: { details, params, videoElementSizeInfo, showCheckInternetSnackBar } }) => ({\r\n details,\r\n params,\r\n videoElementSizeInfo,\r\n showCheckInternetSnackBar\r\n }),\r\n shallowEqual\r\n );\r\n\r\n useAppSelector(\r\n ({ controller: { firstPlay, showMiniPlayer, isFullScreen, isLoading } }) => ({\r\n firstPlay,\r\n showMiniPlayer,\r\n isFullScreen,\r\n isLoading\r\n }),\r\n shallowEqual\r\n );\r\n\r\n useFullScreen();\r\n\r\n useHandleResize();\r\n\r\n useActiveInActive(isRightDoubleTouched, isLeftDoubleTouched);\r\n\r\n return (\r\n <>\r\n {conditions(ConditionName.showMiniPlayer) && <div id=\"black-video-area\" className={`pl-relative pl-w-full pl-aspect-video pl-bg-black pl-rounded ${!conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"}`} />}\r\n <div\r\n id=\"video-area\"\r\n style={{\r\n zIndex: conditions(ConditionName.showMiniPlayer)\r\n ? zIndex.videoPlayerInPictureInPicture\r\n : conditions(ConditionName.isFullScreen)\r\n ? zIndex.videoPlayerInFullScreen\r\n : \"unset\"\r\n }}\r\n onClick={(event) => conditions(ConditionName.isFirstPlay) && handlePlayPause(event)}\r\n onDoubleClick={(event: MouseEvent<HTMLDivElement>) => !conditions(ConditionName.showMiniPlayer) && handleDoubleClick(event)}\r\n className={`!pl-bg-contain !pl-bg-center !pl-bg-no-repeat pl-h-full pl-bg-black pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"} ${conditions(ConditionName.isFullScreen) && \"!pl-fixed !pl-w-screen dvh\"} ${conditions(ConditionName.showMiniPlayer) ? \"!pl-fixed !pl-bottom-[10px] !pl-right-[10px] !pl-w-[95%] !pl-max-w-[400px] !pl-max-h-[225px] pl-aspect-video !pl-rounded-[8px]\" : \"pl-w-full pl-relative\"} ${conditions(ConditionName.showMiniPlayer) && conditions(ConditionName.isTouchScreenPortrait) && \"!pl-w-[300px] !pl-aspect-video\"} ${!conditions(ConditionName.isActiveElements) && \"pl-cursor-none\"}`}\r\n >\r\n <div className={`pl-absolute pl-w-full pl-aspect-video pl-transition-all pl-duration-500 pl-bg-black ${!conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"!pl-rounded-[12px]\"} ${conditions(ConditionName.isActiveElements) ? \"pl-bg-opacity-50\" : \"pl-bg-opacity-0\"}`} />\r\n {conditions(ConditionName.showBanner) && (\r\n <div className=\"pl-absolute pl-w-full pl-h-full pl-flex pl-justify-center\">\r\n <Image src={conditions(ConditionName.isStaticFormat) ? params.cover! : details.banner} layout=\"fill\" alt={params.bannerAlt ? params.bannerAlt : conditions(ConditionName.isStaticFormat) ? \"بنر ویدیو پلیر کافه ویدیو\" : details.title} objectFit=\"contain\" className={`${!conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.isFullScreen) && \"pl-rounded-[12px]\"}`} />\r\n </div>\r\n )}\r\n {conditions(ConditionName.showMiniPlayer) && (\r\n <div className=\"pl-z-[100]\">\r\n <div className=\"pl-absolute pl-top-3 pl-right-3 pl-cursor-pointer\" onClick={() => dispatch(setShowMiniPlayer(undefined))}>\r\n <Image\r\n src={IMAGES.closeSquare}\r\n alt=\"close-square\"\r\n width={16}\r\n height={16}\r\n />\r\n </div>\r\n <div className={`pl-w-full pl-absolute pl-bottom-0 animate__animated animate__faster ${conditions(ConditionName.isActiveElements) && !conditions(ConditionName.isLoading)\r\n ? \"animate__fadeIn pl-pointer-events-auto\"\r\n : \"animate__fadeOut pl-pointer-events-none\"\r\n }`}>\r\n <div className=\"pl-w-full pl-flex pl-justify-center\">\r\n <PlayPause />\r\n </div>\r\n </div>\r\n <CheckInternet />\r\n </div>\r\n )}\r\n {conditions(ConditionName.showTouchVolumeBrightness) && <TouchVolumeBrightness />}\r\n {conditions(ConditionName.showBackwardForward) && (\r\n <div\r\n className={`pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full pl-overflow-hidden pl-flex pl-items-center`}\r\n style={{\r\n zIndex: isLeftDoubleTouched || isRightDoubleTouched ? zIndex.backwardForwardActive : zIndex.backwardForwardInActive\r\n }}\r\n >\r\n <BackwardForward\r\n type=\"touchForward\"\r\n isRightDoubleTouched={isRightDoubleTouched}\r\n setIsRightDoubleTouched={setIsRightDoubleTouched}\r\n />\r\n <BackwardForward\r\n type=\"touchBackward\"\r\n isLeftDoubleTouched={isLeftDoubleTouched}\r\n setIsLeftDoubleTouched={setIsLeftDoubleTouched}\r\n />\r\n </div>\r\n )}\r\n <VideoTag />\r\n {!conditions(ConditionName.showMiniPlayer) && (\r\n <div\r\n id=\"playerElements\"\r\n className={`pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full`}\r\n >\r\n <div className={`pl-flex pl-flex-col pl-justify-between pl-w-full pl-h-full`}>\r\n {conditions(ConditionName.showHeader) && <Header />}\r\n {conditions(ConditionName.showMain) && <Main />}\r\n {conditions(ConditionName.showFooter) && <Footer />}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n )\r\n}\r\n\r\nexport default VideoArea;","import { shallowEqual } from \"react-redux\";\r\nimport Title from \"../title/title\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport Lock from \"../lockUnlock/lock\";\r\n\r\nconst Header = () => {\r\n useAppSelector(({ controller: { lock, activeElements } }) => ({ lock, activeElements }), shallowEqual);\r\n\r\n return (\r\n <div className={`pl-flex pl-items-start pl-justify-end pl-mx-4 pl-mt-5 ${conditions(ConditionName.isTouchScreenPortrait) ? \"pl-h-[16px]\" : \"pl-h-[60px]\"}`}>\r\n {conditions(ConditionName.showTitle) && <Title />}\r\n {conditions(ConditionName.isLock) && <Lock />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default Header;\r\n","import { shallowEqual } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\n\r\nconst Title = () => {\r\n const { details, params } = useAppSelector(({ videoData: { details, params } }) => ({ details, params }), shallowEqual);\r\n\r\n return (\r\n <div\r\n className={`pl-w-full pl-max-w-[80%] pl-truncate pl-text-left pl-ml-4 pl-text-[16px] pl-font-normal pl-text-white pl-break-words pl-self-start animate__animated animate__faster ${\r\n conditions(ConditionName.isActiveElements) ? \"animate__fadeIn pl-opacity-100\" : \"pl-opacity-0 animate__fadeOut\"\r\n }`}\r\n >\r\n {conditions(ConditionName.hasTitle) ? details.title : params.id}\r\n </div>\r\n );\r\n};\r\n\r\nexport default Title;\r\n","import Image from \"next/legacy/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { handleLock } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\n\r\nconst Lock = () => {\r\n\r\n return (\r\n <div className={`pl-relative pl-z-[1000000] animate__animated animate__faster ${conditions(ConditionName.isActiveElements) ? \"animate__fadeIn pl-pointer-events-auto\" : \"animate__fadeOut pl-pointer-events-none\"}`}>\r\n <Image\r\n src={IMAGES.lock}\r\n alt=\"lock-icon\"\r\n width={20}\r\n height={20}\r\n onClick={() => handleLock(\"unlock\")}\r\n />\r\n {!localStorage.getItem(\"unlock-click\") && <p className=\"pl-text-[10px] pl-text-black/[0.87] pl-bg-[#F7F7F7] pl-absolute pl-left-0 pl-px-4 pl-py-3 pl-rounded-[8px] pl-w-max\">برای باز کردن قفل، کلیک کنید</p>}\r\n </div>\r\n );\r\n};\r\n\r\nexport default Lock;\r\n","import { useEffect, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport BackwardForward from \"../backwardForward/backwardForward\";\r\nimport PlayPause from \"../playPause/playPause\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName, zIndex } from \"../../../helpers/interfaces/enums\";\r\n\r\nconst Main = () => {\r\n const [showIcons, setShowIcons] = useState<boolean>(false);\r\n\r\n useAppSelector(({ controller: { lock, firstPlay } }) => ({ lock, firstPlay }), shallowEqual);\r\n const { activeElements } = useAppSelector(({ controller: { activeElements } }) => ({ activeElements }),shallowEqual);\r\n\r\n useEffect(() => {\r\n let timeout: any = null;\r\n if (conditions(ConditionName.isFirstPlay) || conditions(ConditionName.isActiveElements)) timeout = setTimeout(() => setShowIcons(true), 100);\r\n else setShowIcons(false);\r\n\r\n return () => clearTimeout(timeout);\r\n }, [activeElements]);\r\n\r\n return (\r\n <main className=\"pl-flex-1 pl-mt-1\">\r\n {showIcons && !conditions(ConditionName.isLock) && (\r\n <div\r\n id=\"main-content\"\r\n className={`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${conditions(ConditionName.isActiveElements) ? \"pl-pointer-events-auto\" : \"pl-pointer-events-none\"\r\n }`}\r\n >\r\n <div\r\n className=\"pl-flex pl-justify-center pl-gap-10 pl-items-center pl-w-max\"\r\n style={{ zIndex: zIndex.mainIcons }}\r\n >\r\n {!conditions(ConditionName.isFirstPlay) && <BackwardForward type=\"forward\" />}\r\n <PlayPause />\r\n {!conditions(ConditionName.isFirstPlay) && <BackwardForward type=\"backward\" />}\r\n </div>\r\n </div>\r\n )}\r\n </main>\r\n );\r\n};\r\n\r\nexport default Main;\r\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 { handlePlayPause } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport Image from \"next/legacy/image\";\r\n\r\nconst PlayPause = () => {\r\n useAppSelector(({ controller: { play, showMiniPlayer } }) => ({ play, showMiniPlayer }), shallowEqual);\r\n useAppSelector(({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }), shallowEqual);\r\n\r\n return (\r\n <div\r\n className={`${!conditions(ConditionName.isTouchScreen) && \"hover:pl-scale-125\"} pl-transition-transform pl-ease-in-out pl-cursor-pointer`}\r\n onContextMenu={(event) => event.preventDefault()}\r\n >\r\n <Image\r\n alt=\"\"\r\n src={conditions(ConditionName.isPlay) ? IMAGES.bigPause : IMAGES.bigPlay}\r\n width={conditions(ConditionName.showMiniPlayer) ? 20 : 40}\r\n height={conditions(ConditionName.showMiniPlayer) ? 20 : 40}\r\n onClick={(event: any) => handlePlayPause(event)}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n className={`${conditions(ConditionName.isPlay) ? \"pl-big-play-icon\" : \"pl-big-pause-icon\"}`}\r\n />\r\n </div>\r\n );\r\n};\r\n\r\nexport default PlayPause;\r\n","import { shallowEqual } from \"react-redux\";\r\nimport ProgressBar from \"./progressbar/progressbar\";\r\nimport Controllbar from \"./controllbar/controllbar\";\r\nimport ElapsedTime from \"../elapsedTime/elapsedTime\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName, zIndex } from \"../../../helpers/interfaces/enums\";\r\nimport CheckInternet from \"../checkInternet/checkInternet\";\r\n\r\nconst Footer = () => {\r\n useAppSelector(({ controller: { lock, isFullScreen, isLoading, activeElements } }) => ({ lock, isFullScreen, isLoading, activeElements }), shallowEqual);\r\n\r\n let styles = \"\";\r\n if(conditions(ConditionName.isTouchScreen)) {\r\n if(conditions(ConditionName.isFullScreen)) styles = \"pl-gap-6 pl-mb-6\"\r\n else styles = \"pl-gap-6 pl-mb-0\"\r\n } else {\r\n if (conditions(ConditionName.isFullScreen)) styles = \"pl-gap-6 pl-mb-8\"\r\n else styles = \"pl-gap-4 pl-mb-3\"\r\n }\r\n\r\n return (\r\n <div id=\"footer\" className=\"pl-relative\" style={{ zIndex: zIndex.footer }}>\r\n <>\r\n {!conditions(ConditionName.isLock) && (\r\n <>\r\n <div\r\n className={`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${styles} ${conditions(ConditionName.isActiveElements) && !conditions(ConditionName.isLoading)\r\n ? \"animate__fadeIn pl-pointer-events-auto\"\r\n : \"animate__fadeOut pl-pointer-events-none\"\r\n }`}\r\n >\r\n {!conditions(ConditionName.isTouchScreenPortrait) && <ElapsedTime />} \r\n {conditions(ConditionName.showProgressbar) && <ProgressBar />}\r\n <Controllbar />\r\n </div>\r\n </>\r\n )}\r\n <CheckInternet />\r\n </>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Footer;\r\n","import { useEffect, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport Tooltip from \"../../tooltip/tooltip\";\r\nimport { handleCatchUpLoadingLog, handleMouseMove, handleMouseOut, handlePointerDown, handlePointerMove, handlePointerUp, hideProgressTooltip } from \"../../../../helpers/redux/actions/progressbar.actions\";\r\nimport { useAppSelector } from \"../../../../helpers/redux/hooks\";\r\nimport { progressBarWidth } from \"../../../../helpers/constants\";\r\nimport { ConditionName } from \"../../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../../helpers/conditions/conditions\";\r\n\r\nconst ProgressBar = () => {\r\n const [isPointerDown, setIsPointerDown] = useState<boolean>(false);\r\n\r\n useEffect(() => {\r\n hideProgressTooltip(document.querySelector(\".progressTooltip\"));\r\n }, []);\r\n\r\n const { duration, currentTime, bufferedTimeWidth } = useAppSelector(\r\n ({ controller: { duration, currentTime, bufferedTimeWidth, showMiniPlayer } }) => ({\r\n duration,\r\n currentTime,\r\n bufferedTimeWidth,\r\n showMiniPlayer\r\n }),\r\n shallowEqual\r\n );\r\n useAppSelector(\r\n ({ videoData: { params, videoElementSizeInfo } }) => ({\r\n params,\r\n videoElementSizeInfo,\r\n }),\r\n shallowEqual\r\n );\r\n const [timeoutIds, setTimeoutIds] = useState<any[]>([]);\r\n\r\n return (\r\n <div className={`${conditions(ConditionName.isTouchScreenPortrait) ? \"pl-order-1\" : \"pl-order-none\"} pl-relative`}>\r\n <div className=\"pl-relative\">\r\n <Tooltip />\r\n </div>\r\n <div\r\n className={`pl-w-full pl-flex pl-items-end`}\r\n onPointerDown={(event: any) => handlePointerDown(event, timeoutIds, setIsPointerDown)}\r\n onPointerMove={handlePointerMove}\r\n onPointerUp={(event: any) => handlePointerUp(event, setTimeoutIds, timeoutIds, setIsPointerDown)}\r\n onMouseMove={handleMouseMove}\r\n onMouseOut={handleMouseOut}\r\n onClick={handleCatchUpLoadingLog}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n >\r\n <div id=\"progress-area\" className=\"pl-w-full pl-absolute\">\r\n <div className=\"pl-w-full pl-h-[40px]\"/>\r\n <div\r\n id=\"time-progress-area\"\r\n className={`!pl-w-full !pl-h-[5px] pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-gray-highLight pl-rounded`}\r\n style={{ transform: isPointerDown ? \"scaleY(1.8)\" : \"unset\" }}\r\n >\r\n <div\r\n id=\"time-progress-buffer\"\r\n className={`pl-absolute pl-h-[5px] pl-bg-z-gray-400/[0.7] pl-rounded`}\r\n style={{ width: `${bufferedTimeWidth}%` }}\r\n />\r\n <div\r\n id=\"time-progress-bar\"\r\n className={`pl-h-[5px] pl-rounded pl-relative pl-cursor-pointer pl-bg-primary before:pl-bg-primary before:pl-inline-block before:pl-w-4 before:pl-h-4 ${\r\n isPointerDown && \"before:pl-w-7 before:pl-h-3\"\r\n }`}\r\n style={{ width: `${(currentTime / duration) * progressBarWidth()}px` }}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default ProgressBar;\r\n","import { useEffect, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { memo } from \"react\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { fetchFile, getStyleForTime } from \"../../../helpers/redux/actions/progressbar.actions\";\r\n\r\nconst Tooltip = () => {\r\n const { details } = useAppSelector(({ videoData: { details } }) => ({ details }), shallowEqual);\r\n const { tooltipTime } = useAppSelector(({ controller: { tooltipTime, activeElements, isFullScreen } }) => ({ tooltipTime, activeElements, isFullScreen }), shallowEqual);\r\n\r\n const cache: any = {};\r\n const [vttPool, setVttPool] = useState<any>(undefined);\r\n const [vttUrl, setVttUrl] = useState<string | undefined>(conditions(ConditionName.isTouchScreen) ? details.vtt_mobile : details.vtt);\r\n\r\n useEffect(() => {\r\n setVttUrl(details.vtt_mobile);\r\n }, [details.vtt_mobile]);\r\n\r\n useEffect(() => {\r\n if (!!vttUrl) fetchFile(details.vtt_mobile!, setVttPool);\r\n }, [vttUrl]);\r\n\r\n return conditions(ConditionName.isActiveElements) ? (\r\n <div\r\n className={`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[200%] pl-px-[10px] pl-py-[5px] pl-mr-[-25px] pl-mb-[25px] pl-text-white pl-text-[14px] ${\r\n vttUrl && !!vttPool ? \"\" : \"pl-bg-z-gray-700\"\r\n } pl-rounded-[6px] pl-opacity-0`}\r\n >\r\n {vttUrl && !!vttPool && (\r\n <div className=\"pl-flex-1 pl-border pl-border-white pl-rounded-[8px]\">\r\n <div className=\"pl-rounded-[8px]\" style={getStyleForTime(tooltipTime, vttPool, cache)} />\r\n </div>\r\n )}\r\n <div className=\"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100\" />\r\n </div>\r\n ) : (\r\n <></>\r\n );\r\n};\r\n\r\nexport default memo(Tooltip);\r\n","import store from \"../../redux/store\";\r\nimport { catchUpLoadingLog } from \"../../logs/logs\";\r\nimport { ConditionName, zIndex } from \"../../interfaces/enums\";\r\nimport { setActiveElements, setActivePointerProgressBar, setDelayTurnOffControlbar, setTooltipTime } from \"../slices/controllerSlice\";\r\nimport { handleVideoTimeline } from \"./controller.actions\";\r\nimport { setInfo } from \"../slices/videoDataSlice\";\r\nimport { sendFluentLog } from \"../../logs/fluentdLogger\";\r\nimport { conditions } from \"../../conditions/conditions\";\r\nimport { activeElementsTime } from \"../../environment\";\r\nimport { progressBar, videoTag } from \"../../constants\";\r\nimport { secondsToHMS } from \"../../helpers\";\r\n\r\nexport const getPointerTime = (event: any) => {\r\n const { videoElementSizeInfo } = store.getState().videoData;\r\n const { duration } = store.getState().controller;\r\n const clientX = event.clientX !== undefined ? event.clientX : event.touches[0].clientX;\r\n if (clientX <= videoElementSizeInfo.right && clientX > 0) {\r\n let positionX = clientX - videoElementSizeInfo.left;\r\n let timePositionX = (positionX / videoElementSizeInfo.width) * duration;\r\n return timePositionX;\r\n }\r\n};\r\n\r\nexport const getPointerPosition = (event: any) => {\r\n const { videoElementSizeInfo } = store.getState().videoData;\r\n const clientX = event.clientX !== undefined ? event.clientX : event.touches[0].clientX;\r\n if (clientX <= videoElementSizeInfo.right && clientX > 0) {\r\n return clientX - videoElementSizeInfo.left;\r\n }\r\n};\r\n\r\nexport const hideProgressTooltip = (progressTooltip: any) => {\r\n if (progressTooltip) {\r\n progressTooltip.style.opacity = \"0.0\";\r\n progressTooltip.style.pointerEvents = \"none\";\r\n progressTooltip.style.zIndex = zIndex.vttDisable;\r\n }\r\n};\r\n\r\nconst generalStyleTooltipHandler = (progressTooltip: any) => {\r\n progressTooltip.style.display = \"block\";\r\n progressTooltip.style.zIndex = zIndex.vtt;\r\n progressTooltip.style.opacity = !!store.getState().videoData.details.vtt ? \"1.0\" : \"0.6\";\r\n progressTooltip.style.pointerEvents = \"auto\";\r\n progressTooltip.style.transition = \"opacity 1s ease-out\";\r\n};\r\n\r\nconst vttTooltipStyleHandler = (event: any, progressTooltip: any) => {\r\n const { videoElementSizeInfo } = store.getState().videoData;\r\n const element: any = document.getElementsByClassName(\"pl-progressTooltip\")[0];\r\n const parentPlayer: any = document.getElementById(\"parent-player\");\r\n if (element && parentPlayer) {\r\n if ((getPointerPosition(event)! > element.getBoundingClientRect().width / 2) && (getPointerPosition(event)! < videoElementSizeInfo.right - videoElementSizeInfo.left - element.getBoundingClientRect().width / 2)) {\r\n progressTooltip.style.left = `${getPointerPosition(event)! - element.offsetWidth / 2}px`;\r\n } else if (getPointerPosition(event)! < (parentPlayer.offsetLeft === 0 ? element.offsetWidth : parentPlayer.offsetLeft)) {\r\n progressTooltip.style.left = `${0}px`;\r\n } else if (videoTag().offsetLeft + videoTag().offsetWidth < getPointerPosition(event)! + element.offsetWidth) {\r\n progressTooltip.style.left = `${videoTag().offsetWidth - element.offsetWidth}px`;\r\n }\r\n }\r\n};\r\n\r\nexport const showProgressTooltip = (event: any, progressTooltip: any, progressBarTooltip: any) => {\r\n if (progressTooltip) generalStyleTooltipHandler(progressTooltip);\r\n if (store.getState().videoData.details.vtt) vttTooltipStyleHandler(event, progressTooltip); // have vtt\r\n else progressTooltip.style.left = `${getPointerPosition(event)! - 30}px`; // not vtt\r\n store.dispatch(setTooltipTime(Number(getPointerTime(event)!)));\r\n progressBarTooltip.textContent = `${secondsToHMS(getPointerTime(event)!)}`\r\n};\r\n\r\nexport const handleTimeTooltip = (event: any, isTimer: boolean = false) => {\r\n const { videoElementSizeInfo } = store.getState().videoData;\r\n const progressTooltip: any = document.querySelector(\".pl-progressTooltip\");\r\n const progressBarTooltip: any = document.querySelector(\".pl-progressTimeTooltip\");\r\n const clientX = event.clientX !== undefined ? event.clientX : event.touches[0].clientX;\r\n if (progressTooltip && progressBarTooltip && clientX <= videoElementSizeInfo.right && clientX > videoElementSizeInfo.left) {\r\n showProgressTooltip(event, progressTooltip, progressBarTooltip);\r\n if (isTimer) setTimeout(() => hideProgressTooltip(progressTooltip), 2000);\r\n } else hideProgressTooltip(progressTooltip);\r\n};\r\n\r\nexport const handleProgressTime = (event: any) => {\r\n const clientX = event.clientX !== undefined ? event.clientX : event.touches[0].clientX;\r\n if (progressBar()) {\r\n if (clientX <= event.view.innerWidth && clientX > 0)\r\n progressBar().style.width = `${getPointerPosition(event)}px`;\r\n else if (clientX <= event.view.innerWidth) progressBar().style.width = 0;\r\n else if (clientX > 0) progressBar().style.width = `100%`;\r\n }\r\n};\r\n\r\nexport const handlePointerDown = (event: any, timeoutIds: any, setIsPointerDown: (value: boolean) => void) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n setIsPointerDown(true);\r\n const dispatch = store.dispatch;\r\n const clientX = event.clientX !== undefined ? event.clientX : event.touches[0].clientX;\r\n if (clientX <= event.view.innerWidth && clientX > 0) {\r\n dispatch(setActivePointerProgressBar(true));\r\n dispatch(setDelayTurnOffControlbar(true));\r\n sessionStorage.setItem(\"previousVideoTime\", String(videoTag().currentTime));\r\n event.target.setPointerCapture(event.pointerId);\r\n if (timeoutIds.length > 0) timeoutIds.map((id: any) => clearTimeout(id));\r\n }\r\n};\r\n\r\nexport const handlePointerMove = (event: any) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n const dispatch = store.dispatch;\r\n const { activePointerProgressBar } = store.getState().controller;\r\n const { left } = store.getState().videoData.videoElementSizeInfo;\r\n const clientX = event.clientX !== undefined ? event.clientX : event.touches[0].clientX;\r\n const progressTooltip: any = document.querySelector(\".pl-progressTooltip\");\r\n if (clientX > left) {\r\n if (progressTooltip) {\r\n progressTooltip.style.display = \"block !important\";\r\n progressTooltip.style.pointerEvents = \"auto\";\r\n }\r\n if (activePointerProgressBar) {\r\n dispatch(setDelayTurnOffControlbar(true));\r\n handleTimeTooltip(event);\r\n handleProgressTime(event);\r\n videoTag().pause();\r\n }\r\n } else if (progressTooltip) {\r\n progressTooltip.style.display = \"none !important\";\r\n progressTooltip.style.pointerEvents = \"none\";\r\n }\r\n};\r\n\r\nexport const handlePointerUp = (\r\n event: any,\r\n setTimeoutIds: (timeoutIds: any[]) => void,\r\n timeoutIds: any,\r\n setIsPointerDown: (value: boolean) => void\r\n) => {\r\n setIsPointerDown(false);\r\n event.preventDefault();\r\n event.stopPropagation();\r\n const dispatch = store.dispatch;\r\n const { duration } = store.getState().controller;\r\n const { left, right } = store.getState().videoData.videoElementSizeInfo;\r\n event.target.removeEventListener(\"pointermove\", handlePointerMove);\r\n const clientX = event.clientX !== undefined ? event.clientX : event.touches[0].clientX;\r\n let currentTime = 0;\r\n if (clientX > left && clientX < right) currentTime = getPointerTime(event)!;\r\n else if (clientX < left) currentTime = 0;\r\n else if (clientX > 0) currentTime = duration;\r\n if (!conditions(ConditionName.isStaticFormat)) handleVideoTimeline(videoTag().currentTime, currentTime);\r\n videoTag().currentTime = currentTime;\r\n if (store.getState().controller.activePointerProgressBar) {\r\n dispatch(setActivePointerProgressBar(false));\r\n dispatch(setDelayTurnOffControlbar(false));\r\n videoTag().play();\r\n handleTimeTooltip(event, true);\r\n sessionStorage.setItem(\"current-time\", String(currentTime));\r\n handleProgressTime(event);\r\n handleTimeout(event, dispatch, setTimeoutIds, timeoutIds);\r\n }\r\n};\r\n\r\nconst handleTimeout = (event: any, dispatch: any, setTimeoutIds: (timeoutIds: any[]) => void, timeoutIds: any) => {\r\n const ids = timeoutIds;\r\n let timeoutIdTemp = setTimeout(() => {\r\n const { settingPopover } = store.getState().popovers;\r\n const { delayTurnOffControlbar } = store.getState().controller;\r\n if (event.pointerType === \"touch\" && !settingPopover && delayTurnOffControlbar) dispatch(setActiveElements(false));\r\n }, activeElementsTime);\r\n ids.push(timeoutIdTemp);\r\n setTimeoutIds(ids);\r\n};\r\n\r\nexport const handleCatchUpLoadingLog = () => {\r\n const timer = Date.now();\r\n videoTag()\r\n .play()\r\n .then(() => sendFluentLog(catchUpLoadingLog(Date.now() - timer)));\r\n};\r\n\r\nexport const handleMouseMove = (event: any) => handleTimeTooltip(event);\r\n\r\nexport const handleMouseOut = () => {\r\n const progressBarTooltip: any = document.querySelector(\".pl-progressTooltip\");\r\n hideProgressTooltip(progressBarTooltip);\r\n};\r\n\r\n/////// vtt tooltip\r\nconst deconstructTimestamp = (timestamp: string) => {\r\n const splitStampMilliseconds = timestamp.split(\".\");\r\n const timeParts = splitStampMilliseconds[0];\r\n const timePartsSplit = timeParts.split(\":\");\r\n\r\n return {\r\n milliseconds: parseInt(splitStampMilliseconds[1], 10) || 0,\r\n seconds: parseInt(timePartsSplit.pop()!, 10) || 0,\r\n minutes: parseInt(timePartsSplit.pop()!, 10) || 0,\r\n hours: parseInt(timePartsSplit.pop()!, 10) || 0\r\n };\r\n};\r\n\r\nconst getSecondsFromTimestamp = (timestamp: string) => {\r\n const timestampParts: any = deconstructTimestamp(timestamp);\r\n\r\n return parseInt(timestampParts.hours * (60 * 60) + timestampParts.minutes * 60 + timestampParts.seconds + timestampParts.milliseconds / 1000, 10);\r\n};\r\n\r\nconst getPropsFromDef = (def: string) => {\r\n const imageDefSplit = def.split(/#xywh=/i);\r\n const imageUrl = imageDefSplit[0];\r\n const imageCoords = imageDefSplit[1];\r\n const splitCoords: any = imageCoords.match(/[0-9]+/gi);\r\n\r\n return {\r\n x: splitCoords[0],\r\n y: splitCoords[1],\r\n w: splitCoords[2],\r\n h: splitCoords[3],\r\n image: imageUrl\r\n };\r\n};\r\n\r\nconst getFullyQualifiedUrl = (path: string, base: string) => {\r\n if (path.indexOf(\"//\") >= 0) {\r\n // We have a fully qualified path.\r\n return path;\r\n }\r\n\r\n if (base.indexOf(\"//\") === 0) {\r\n // We don't have a fully qualified path, but need to\r\n // be careful with trimming.\r\n return [base.replace(/\\/$/gi, \"\"), path.trim()].join(\"/\");\r\n }\r\n\r\n if (base.indexOf(\"//\") > 0) {\r\n // We don't have a fully qualified path, and should\r\n // trim both sides of base and path.\r\n return [base.trim(), path.trim()].join(\"/\");\r\n }\r\n\r\n // If all else fails.\r\n return path;\r\n};\r\n\r\nconst getVttCss = (vttImageDef: string, vttUrl: string) => {\r\n const cssObj: any = {};\r\n // If there isn't a protocol, use the VTT source URL.\r\n let baseSplit: string = vttUrl!.split(/\\/\\w+\\.vtt\\s?/)[0];\r\n\r\n /// offset : (vttUrl)!.split(/\\/\\w+\\.vtt\\s?/)[1]\r\n\r\n vttImageDef = getFullyQualifiedUrl(vttImageDef, baseSplit);\r\n\r\n if (!vttImageDef.match(/#xywh=/i)) {\r\n cssObj.background = 'url(\"' + vttImageDef + vttUrl!.split(/\\/\\w+\\.vtt\\s?/)[1] + '\")';\r\n return cssObj;\r\n }\r\n\r\n const imageProps = getPropsFromDef(vttImageDef);\r\n\r\n cssObj.background =\r\n 'url(\"' + imageProps.image + vttUrl!.split(/\\/\\w+\\.vtt\\s?/)[1] + '\") no-repeat -' + imageProps.x + \"px -\" + imageProps.y + \"px\";\r\n cssObj.width = imageProps.w + \"px\";\r\n cssObj.height = imageProps.h + \"px\";\r\n cssObj.url = imageProps.image;\r\n\r\n return cssObj;\r\n};\r\n\r\nexport const fetchFile = (url: string, setVttPool: any) => {\r\n fetch(url)\r\n .then((response) => {\r\n if (!response.ok) {\r\n store.dispatch(\r\n setInfo({\r\n ...store.getState().videoData.details,\r\n vtt: undefined,\r\n vtt_mobile: undefined\r\n })\r\n );\r\n throw new Error(\"Network response was not ok\");\r\n }\r\n return response.text();\r\n })\r\n .then((data) => {\r\n const processedVtts: any[] = [];\r\n const vttDefinitions = data.split(/[\\r\\n][\\r\\n]/i);\r\n vttDefinitions.forEach((vttDef) => {\r\n if (vttDef.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)) {\r\n const vttDefSplit = vttDef.split(/[\\r\\n]/i);\r\n const vttTiming = vttDefSplit[0];\r\n const vttTimingSplit = vttTiming.split(/ ?--> ?/i);\r\n const vttTimeStart = vttTimingSplit[0];\r\n const vttTimeEnd = vttTimingSplit[1];\r\n const vttImageDef = vttDefSplit[1];\r\n const vttCssDef = getVttCss(vttImageDef, url);\r\n\r\n processedVtts.push({\r\n start: getSecondsFromTimestamp(vttTimeStart),\r\n end: getSecondsFromTimestamp(vttTimeEnd),\r\n css: vttCssDef\r\n });\r\n }\r\n });\r\n setVttPool(processedVtts);\r\n })\r\n .catch((error) => {\r\n console.error(\"Error fetching file:\", error);\r\n });\r\n};\r\n\r\nexport const getStyleForTime = (time: number, vttPool: any, cache: any) => {\r\n for (let i = 0; i < vttPool.length; ++i) {\r\n const item = vttPool[i];\r\n if (time >= item.start && time < item.end) {\r\n // Cache miss\r\n if (item.css.url && !cache[item.css.url]) {\r\n const objectVtt: any = {\r\n background: item.css.background,\r\n width: item.css.width,\r\n height: item.css.height\r\n };\r\n cache[item.css.url] = objectVtt;\r\n return objectVtt;\r\n } else if (item.css.url) return cache[item.css.url];\r\n }\r\n }\r\n};\r\n","import { memo } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport FullScreen from \"../../fullScreen/fullScreen\";\r\nimport PictureInPicture from \"../../pictureInPicture/pictureInPicture\";\r\nimport SoundVolume from \"../../soundVolume/soundVolume\";\r\nimport Settings from \"../../settings/settings\";\r\nimport { useAppSelector } from \"../../../../helpers/redux/hooks\";\r\nimport { ConditionName } from \"../../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../../helpers/conditions/conditions\";\r\nimport Speed from \"../../speed/speed\";\r\nimport QualityLevels from \"../../qualityLevels/qualityLevels\";\r\nimport ElapsedTime from \"../../elapsedTime/elapsedTime\";\r\nimport Unlock from \"../../lockUnlock/unlock\";\r\n\r\nconst Controlbar = () => {\r\n useAppSelector(({ controller: { isFullScreen, showMiniPlayer } }) => ({ isFullScreen, showMiniPlayer }), shallowEqual);\r\n useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n let styles = \"\";\r\n if (conditions(ConditionName.isTouchScreen)) {\r\n if (conditions(ConditionName.isFullScreen)) styles = \"pl-mx-6\"\r\n else styles = \"pl-mx-4\"\r\n } else {\r\n if (conditions(ConditionName.isFullScreen)) styles = \"pl-mx-8\"\r\n else styles = \"pl-mx-4\"\r\n }\r\n\r\n return (\r\n <div id=\"player-controllbar\" className={`pl-flex pl-justify-between pl-items-center ${styles}`}>\r\n <div\r\n className={`pl-flex pl-items-center pl-gap-5`}\r\n >\r\n {!conditions(ConditionName.showMiniPlayer) && <FullScreen />}\r\n {conditions(ConditionName.isTouchScreenLandscape) && <Unlock />}\r\n {conditions(ConditionName.showPictureInPicture) && <PictureInPicture />}\r\n {conditions(ConditionName.showSettingIcon) && <Settings />}\r\n {conditions(ConditionName.isFullScreen) && !conditions(ConditionName.isStaticFormat) && <QualityLevels showQualityLevelsIcon={true} />}\r\n {(conditions(ConditionName.isFullScreen) || conditions(ConditionName.isStaticFormat)) && <Speed showSpeedIcon={true} />}\r\n </div>\r\n <div className={`pl-flex pl-items-center pl-gap-5`}>\r\n {conditions(ConditionName.isTouchScreenPortrait) && <ElapsedTime />}\r\n {!conditions(ConditionName.isIOS) && <SoundVolume />}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default memo(Controlbar);\r\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 { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { handleFullScreen, handleLockOrientation } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport Image from \"next/legacy/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\n\r\nconst FullScreen = () => {\r\n const { isFullScreen } = useAppSelector(({ controller: { firstPlay, isFullScreen } }) => ({ firstPlay, isFullScreen }), shallowEqual);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const dispatch = useAppDispatch();\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 className=\"pl-relative pl-flex pl-items-center\">\r\n <Image\r\n src={conditions(ConditionName.isFullScreen) ? IMAGES.nonFullScreen : IMAGES.fullScreen}\r\n alt=\"fullScreen-icon\"\r\n className={`pl-cursor-pointer`}\r\n width={20}\r\n height={20}\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 />\r\n {showTooltip && (\r\n <ControllbarTooltip\r\n title={`${conditions(ConditionName.isFullScreen) ? \"خروج از\" : \"\"} تمام صفحه`}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default FullScreen;\r\n","import { conditions } from \"../../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../../helpers/interfaces/enums\";\r\nimport { IControllbarTooltipProps } from \"../../../../helpers/interfaces/interfaces\";\r\n\r\nconst ControllbarTooltip = ({ title, className }: IControllbarTooltipProps) => (\r\n <span\r\n className={`pl-absolute pl-w-max pl-bg-paper pl-text-white/[0.9] ${conditions(ConditionName.isFullScreen) ? \"pl-bottom-[300%]\" : \"pl-bottom-[270%]\"} pl-rounded-[8px] pl-px-4 pl-py-3 pl-text-[14px] pl-font-bold ${className}`}\r\n >\r\n {title}\r\n </span>\r\n);\r\n\r\nexport default ControllbarTooltip;\r\n","import { useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\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 { videoTag } from \"../../../helpers/constants\";\r\nimport Image from \"next/legacy/image\";\r\n\r\nconst PictureInPicture = () => {\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n useAppSelector(({ controller: { showMiniPlayer } }) => ({ showMiniPlayer }), shallowEqual);\r\n useAppSelector(({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }), shallowEqual);\r\n\r\n return (\r\n <div className=\"pl-relative pl-flex pl-items-center\">\r\n <Image\r\n alt=\"\"\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n src={IMAGES.pictureInPicture}\r\n width={20}\r\n height={20}\r\n className=\"pl-flex pl-cursor-pointer\"\r\n onClick={() => videoTag().requestPictureInPicture()}\r\n />\r\n {showTooltip && <ControllbarTooltip title=\"تصویر در تصویر\" />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default PictureInPicture;\r\n","import { useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport Image from \"next/legacy/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\n\r\nconst SoundVolume = () => {\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 className={`pl-relative pl-inline-flex pl-items-center pl-gap-2 pl-sound-icon`}>\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 pl-cursor-pointer\"\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 className=\"pl-relative pl-flex pl-items-center\">\r\n <Image\r\n src={conditions(ConditionName.hasSound) ? IMAGES.unMute : 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={20}\r\n height={20 }\r\n onClick={() => (conditions(ConditionName.hasSound) ? handleMute(\"mute\") : handleMute(\"unmute\"))}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n />\r\n {showTooltip && (\r\n <ControllbarTooltip\r\n className=\"pl-left-0\"\r\n title={`${conditions(ConditionName.hasSound) ? \"با صدا\" : \"بی صدا\"}`}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default SoundVolume;\r\n","import { memo, useEffect, useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport Popover from \"../popover/popover\";\r\nimport Image from \"next/legacy/image\";\r\nimport QualityLevels from \"../qualityLevels/qualityLevels\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { ConditionName, SettingSections } from \"../../../helpers/interfaces/enums\";\r\nimport useOnClickOutside from \"../../../helpers/hooks/useOnClickOutside\";\r\nimport { setSettingPopover } from \"../../../helpers/redux/slices/popoversSlice\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Speed from \"../speed/speed\";\r\n\r\nconst Settings = () => {\r\n const dispatch = useAppDispatch();\r\n useAppSelector(({ videoData: { params } }) => ({ params }),shallowEqual);\r\n const { settingPopover } = useAppSelector(({ popovers: { settingPopover } }) => ({ settingPopover }), shallowEqual);\r\n\r\n const [section, setSection] = useState<string>(SettingSections.main);\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const settingsRef = useRef(null);\r\n\r\n useOnClickOutside(settingsRef, () => {\r\n dispatch(setSettingPopover(false));\r\n setTimeout(() => setSection(SettingSections.main), 500);\r\n });\r\n\r\n return (\r\n <div className={`pl-inline-flex ${conditions(ConditionName.isLandscape) && \"pl-relative\"}`} ref={settingsRef}>\r\n <div\r\n className={`pl-flex pl-items-center pl-relative pl-cursor-pointer`}\r\n onClick={() => dispatch(setSettingPopover(!settingPopover))}\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.showSettingPopover) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n >\r\n <Image\r\n src={IMAGES.settings}\r\n alt=\"\"\r\n width={20}\r\n height={20}\r\n />\r\n {showTooltip && <ControllbarTooltip title=\"تنظیمات\" />}\r\n </div>\r\n <Popover\r\n classNames={`!pl-p-0 pl-overflow-hidden !pl-bg-white ${conditions(ConditionName.isTouchScreen) ? \"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none\" : \"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]\"} ${conditions(ConditionName.isTouchScreenPortrait) && \"!pl-w-screen tablet:!pl-max-w-[285px] tablet:!pl-mx-auto\"} ${conditions(ConditionName.isTouchScreenLandscape) && \"pl-w-full pl-max-w-[285px]\"}`}\r\n status={settingPopover}\r\n onClose={() => {\r\n dispatch(setSettingPopover(false))\r\n setTimeout(() => setSection(SettingSections.main), 500);\r\n }}\r\n type={conditions(ConditionName.isTouchScreen) ? \"modal\" : \"popover\"}\r\n isBlurBackground={conditions(ConditionName.isTouchScreenPortrait)}\r\n ref={settingsRef}\r\n isHeader={conditions(ConditionName.isTouchScreen)}\r\n customHeader={<></>}\r\n isHasCatchUpLineOnTop={conditions(ConditionName.isTouchScreen)}\r\n >\r\n <>\r\n {section === SettingSections.main && (\r\n <div id={SettingSections.main} className=\"pl-p-4 pl-rounded-[10px] pl-flex pl-flex-col pl-gap-5 animate__animated animate__fadeIn\">\r\n {!conditions(ConditionName.isStaticFormat) && (\r\n <>\r\n <div className=\"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer\" onClick={() => setSection(SettingSections.qualityLevels)}>\r\n <Image \r\n src={IMAGES.qualitySetting}\r\n alt=\"\"\r\n width={16}\r\n height={16}\r\n />\r\n <p className={`pl-ml-auto pl-text-[12px] pl-font-medium`}>کیفیت پخش</p>\r\n <Image\r\n src={IMAGES.chevronLeft}\r\n alt=\"\"\r\n width={16}\r\n height={16}\r\n />\r\n </div>\r\n </>\r\n )} \r\n <div className=\"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer\" onClick={() => setSection(SettingSections.speed)}>\r\n <Image\r\n src={IMAGES.speed}\r\n alt=\"\"\r\n width={20}\r\n height={20}\r\n />\r\n <p className={`pl-ml-auto pl-text-[12px] pl-font-medium`}>سرعت</p>\r\n <Image\r\n src={IMAGES.chevronLeft}\r\n alt=\"\"\r\n width={16}\r\n height={16}\r\n />\r\n </div>\r\n </div>\r\n )}\r\n {section === SettingSections.qualityLevels && <QualityLevels setSection={setSection} />}\r\n {section === SettingSections.speed && <Speed setSection={setSection} />}\r\n </>\r\n </Popover>\r\n </div>\r\n );\r\n};\r\n\r\nexport default memo(Settings);\r\n","import { TouchEvent, forwardRef, useEffect, useRef, useState } from \"react\";\r\nimport { createPortal } from \"react-dom\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { IPopoverProps } from \"../../../helpers/interfaces/interfaces\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName, zIndex } from \"../../../helpers/interfaces/enums\";\r\n\r\nconst Popover = forwardRef(\r\n (\r\n {\r\n children,\r\n status,\r\n onClose,\r\n type,\r\n classNames,\r\n parentClassNames,\r\n styles,\r\n isBlurBackground,\r\n isFullHeight = false,\r\n isHeader,\r\n isHasCatchUpLineOnTop = false,\r\n animation,\r\n scrollbar = false,\r\n isFocusOnInput = false,\r\n }: IPopoverProps,\r\n ref: any\r\n ) => {\r\n const [showPopover, setShowPopover] = useState<boolean>(status!);\r\n\r\n const [heightOnTouchMove, setHeightOnTouchMove] = useState<number>(0);\r\n const [zIndexOnCatchUp, setZIndexOnCatchUp] = useState<number>(0);\r\n\r\n const { videoElementSizeInfo } = useAppSelector(({ videoData: { videoElementSizeInfo } }) => ({ videoElementSizeInfo }), shallowEqual);\r\n\r\n const popoverContentHeightRef = useRef<number>(0);\r\n\r\n useEffect(() => {\r\n let timeout: any = undefined;\r\n\r\n if (status) {\r\n setShowPopover(true);\r\n } else {\r\n timeout = setTimeout(() => {\r\n onClose(false);\r\n setHeightOnTouchMove(0);\r\n setShowPopover(false);\r\n }, 500);\r\n }\r\n\r\n return () => clearTimeout(timeout);\r\n }, [status]);\r\n\r\n const handleTouchMove = (event: any) => {\r\n const popoverContent = document.getElementById(\"popover-content\");\r\n if (!popoverContentHeightRef.current) popoverContentHeightRef.current = window.innerHeight - videoElementSizeInfo.top - popoverContent?.getBoundingClientRect().top!\r\n event.stopPropagation();\r\n if (window.innerHeight - videoElementSizeInfo.top - event.touches[0].clientY < popoverContentHeightRef.current) setHeightOnTouchMove(window.innerHeight - event.touches[0].clientY);\r\n setZIndexOnCatchUp(zIndex.maxPopover);\r\n };\r\n\r\n const handleTouchEnd = () => {\r\n onClose();\r\n };\r\n\r\n const content = (\r\n <>\r\n {isBlurBackground && (\r\n <div\r\n className={`pl-bg-black/[0.5] pl-w-screen pl-h-screen pl-fixed pl-top-0 pl-right-0 animate__animated animate__faster ${status ? \"animate__fadeIn\" : \"animate__fadeOut\"\r\n }`}\r\n style={{ zIndex: zIndex.popoverBlurBackground }}\r\n />\r\n )}\r\n <div\r\n className={`${type === \"modal\" &&\r\n \"pl-fixed pl-top-0 pl-left-0 pl-flex pl-w-full pl-h-full pl-justify-center pl-items-end sm:pl-items-center\"\r\n } ${parentClassNames}`}\r\n style={{ zIndex: isFullHeight && !isFocusOnInput ? zIndexOnCatchUp : zIndex.popoverContent }}\r\n >\r\n <div\r\n className={`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9]\r\n ${isFullHeight && \"pl-h-full\"}\r\n ${animation\r\n ? animation\r\n : window.innerWidth > 768 && type === \"modal\"\r\n ? status\r\n ? \"animate__fadeIn\"\r\n : \"animate__fadeOut\"\r\n : status\r\n ? \"animate__fadeInUp\"\r\n : \"animate__fadeOutDown\"\r\n }\r\n ${conditions(ConditionName.isTouchScreenPortrait)\r\n ? `!pl-fixed !pl-right-0 !pl-left-0 !pl-bottom-0 !pl-w-full !pl-mb-0 pl-rounded-[12px] !pl-rounded-b-none !pl-bg-white`\r\n : \"before:pl-hidden\"\r\n } \r\n ${type !== \"modal\" && \"pl-absolute pl-bottom-[130%] pl-overflow-auto no-scrollbar\"}\r\n ${classNames}\r\n `}\r\n style={{\r\n height: heightOnTouchMove ? heightOnTouchMove : \"max-content\",\r\n zIndex: zIndex.popoverContent,\r\n ...styles,\r\n }}\r\n ref={ref}\r\n id=\"popover-content\"\r\n >\r\n <>\r\n {isHeader && (\r\n <div\r\n onTouchMove={isHasCatchUpLineOnTop ? handleTouchMove : () => { }}\r\n onTouchEndCapture={isHasCatchUpLineOnTop ? handleTouchEnd : () => { }}\r\n className=\"pl-py-4\"\r\n >\r\n {isHasCatchUpLineOnTop && (\r\n <div className=\"pl-absolute pl-top-[10px] pl-right-[50%] pl-mr-[-25px] pl-text-center pl-w-8 pl-h-1 pl-rounded-[20px] pl-bg-gray-highLight\" />\r\n )}\r\n </div>\r\n )}\r\n <div\r\n className={`pl-overflow-y-auto pl-h-full pl-w-full ${!scrollbar && \"no-scrollbar\"}`}\r\n onTouchMove={(event: TouchEvent<HTMLDivElement>) => event.stopPropagation()}\r\n >\r\n {children}\r\n </div>\r\n </>\r\n </div>\r\n </div>\r\n </>\r\n );\r\n\r\n return (\r\n <>\r\n {showPopover && (\r\n <>\r\n {type === \"modal\" ? (\r\n createPortal(<>{content}</>, document.getElementById(\"dialog-react-root-videoPlayer\")!)\r\n ) : (\r\n <div>{content}</div>\r\n )}\r\n </>\r\n )}\r\n </>\r\n );\r\n }\r\n);\r\n\r\nPopover.displayName = \"popover\";\r\n\r\nexport default Popover;\r\n","import { shallowEqual } from \"react-redux\";\r\nimport { memo, useRef, useState } from \"react\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName, SettingSections } from \"../../../helpers/interfaces/enums\";\r\nimport { sendFluentLog } from \"../../../helpers/logs/fluentdLogger\";\r\nimport { qualityChangeRequestLog } from \"../../../helpers/logs/logs\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { setQualityLevelsPopover, setSettingPopover } from \"../../../helpers/redux/slices/popoversSlice\";\r\nimport { setUserSettings } from \"../../../helpers/redux/slices/userSlice\";\r\nimport Image from \"next/legacy/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { IQualityLevel } from \"../../../helpers/interfaces/interfaces\";\r\nimport Popover from \"../popover/popover\";\r\nimport useOnClickOutside from \"../../../helpers/hooks/useOnClickOutside\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\n\r\nconst QualityLevels = ({ setSection, showQualityLevelsIcon }: IQualityLevel) => {\r\n const dispatch = useAppDispatch();\r\n let { qualityLevels } = useAppSelector(\r\n ({ controller: { qualityLevels, manualQuality, autoQuality, showMiniPlayer } }) => ({\r\n qualityLevels,\r\n manualQuality,\r\n autoQuality,\r\n showMiniPlayer\r\n }),\r\n shallowEqual\r\n );\r\n const { settings } = useAppSelector(({ user: { settings } }) => ({ settings }), shallowEqual);\r\n const { qualityLevelsPopover } = useAppSelector(({ popovers: { qualityLevelsPopover } }) => ({ qualityLevelsPopover }), shallowEqual);\r\n useAppSelector(({ videoData: { params, videoElementSizeInfo } }) => ({ params, videoElementSizeInfo }), shallowEqual);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n qualityLevels = [-1, ...qualityLevels];\r\n\r\n const handleTickSelectedQuality = (index: number, qualityLevel: number) => {\r\n if (conditions(ConditionName.isAutoQuality) && qualityLevel === -1) return true;\r\n else return !conditions(ConditionName.isAutoQuality) && settings.quality === index;\r\n };\r\n\r\n const qualityLevelsRef = useRef<any>(null);\r\n\r\n useOnClickOutside(qualityLevelsRef, () => {\r\n if (qualityLevelsPopover) dispatch(setQualityLevelsPopover(false));\r\n });\r\n\r\n const qualityLevelsContent = (\r\n <div id={SettingSections.qualityLevels} className=\"animate__animated animate__fadeIn pl-py-2\">\r\n <ul className=\"pl-flex pl-flex-col\">\r\n {qualityLevels.map((qualityLevel: number, index: number) => (\r\n <li\r\n key={index}\r\n className={`pl-flex pl-items-center pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 pl-p-1 pl-pr-2 ${handleTickSelectedQuality(index - 1, qualityLevel) && \"pl-bg-primary/[0.12] !pl-cursor-default\"\r\n }`}\r\n onClick={handleTickSelectedQuality(index - 1, qualityLevel) ? () => { } : () => {\r\n sendFluentLog(qualityChangeRequestLog(qualityLevel === -1 ? \"auto\" : `${qualityLevel}P`));\r\n dispatch(setActiveElements(false));\r\n dispatch(setSettingPopover(false));\r\n dispatch(setQualityLevelsPopover(false));\r\n dispatch(setUserSettings({ ...settings, quality: qualityLevel === -1 ? -1 : index - 1 }));\r\n if (setSection) setSection(SettingSections.main);\r\n }}\r\n >\r\n {!conditions(ConditionName.isTouchScreen) && handleTickSelectedQuality(index - 1, qualityLevel) && (\r\n <div className=\"pl-absolute pl-right-[10px]\">\r\n <Image\r\n src={IMAGES.tick}\r\n alt=\"\"\r\n width={12}\r\n height={9}\r\n />\r\n </div>\r\n )}\r\n {conditions(ConditionName.isTouchScreen) && (\r\n <div className={`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${handleTickSelectedQuality(index - 1, qualityLevel) && \"pl-border-primary\"} pl-mr-[10px]`}>\r\n {handleTickSelectedQuality(index - 1, qualityLevel) && <div className=\"pl-w-full pl-h-full pl-rounded-full pl-bg-primary\"/>}\r\n </div>\r\n )}\r\n <span className={`pl-w-full pl-px-2 pl-py-1 ${conditions(ConditionName.isTouchScreen) ? \"pl-pr-[21px]\" : \"pl-pr-[36px]\"}`}>\r\n {qualityLevel === -1 ? (\r\n <span>\r\n <span className=\"pl-text-[12px] pl-font-medium\">خودکار </span>\r\n <span className=\"pl-text-[10px] pl-font-normal pl-text-black/[0.87]\">(بر اساس سرعت اینترنت شما)</span>\r\n </span>\r\n ) : `${qualityLevel}p`}\r\n </span>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n )\r\n\r\n return (\r\n <>\r\n {showQualityLevelsIcon ? (\r\n <div className=\"pl-relative pl-flex pl-items-center\">\r\n <Image\r\n src={IMAGES.qualitySetting1}\r\n alt=\"speed-icon\"\r\n width={20}\r\n height={20}\r\n onClick={() => dispatch(setQualityLevelsPopover(true))}\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.showQualityLevelsPopover) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n className=\"pl-cursor-pointer\"\r\n />\r\n {showTooltip && (\r\n <ControllbarTooltip\r\n title=\"کیفیت پخش\"\r\n />\r\n )}\r\n <Popover\r\n classNames={`!pl-p-0 pl-overflow-hidden !pl-bg-white ${conditions(ConditionName.isTouchScreen) ? \"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none\" : \"pl-right-0 pl-mb-[33px] !pl-rounded-[12px] pl-w-[230px]\"} ${conditions(ConditionName.isTouchScreenPortrait) && \"!pl-w-screen tablet:pl-max-w-[285px]\"} ${conditions(ConditionName.isTouchScreenLandscape) && \"pl-w-full pl-max-w-[285px]\"}`}\r\n status={qualityLevelsPopover}\r\n onClose={() => dispatch(setQualityLevelsPopover(false))}\r\n type={conditions(ConditionName.isTouchScreen) ? \"modal\" : \"popover\"}\r\n isBlurBackground={conditions(ConditionName.isTouchScreenPortrait)}\r\n ref={qualityLevelsRef}\r\n isHeader={conditions(ConditionName.isTouchScreen)}\r\n customHeader={<></>}\r\n isHasCatchUpLineOnTop={conditions(ConditionName.isTouchScreen)}\r\n >\r\n {qualityLevelsContent}\r\n </Popover>\r\n </div>\r\n ) : (\r\n <>{qualityLevelsContent}</>\r\n )}\r\n\r\n </>\r\n );\r\n};\r\n\r\nexport default memo(QualityLevels);\r\n","import { ChangeEvent, RefObject, useEffect } from \"react\";\r\n\r\nconst useOnClickOutside = (ref: RefObject<HTMLInputElement>, handler: (event: ChangeEvent<HTMLInputElement>) => void) => {\r\n useEffect(() => {\r\n const listener = (event: any) => {\r\n // Do nothing if clicking ref's element or descendent elements\r\n if (!ref.current || ref.current.contains(event.target)) return;\r\n handler(event);\r\n };\r\n document.addEventListener(\"mousedown\", listener);\r\n document.addEventListener(\"touchstart\", listener);\r\n return () => {\r\n document.removeEventListener(\"mousedown\", listener);\r\n document.removeEventListener(\"touchstart\", listener);\r\n };\r\n }, [ref, handler]);\r\n};\r\n\r\nexport default useOnClickOutside;\r\n","import { useEffect, useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport useOnClickOutside from \"../../../helpers/hooks/useOnClickOutside\";\r\nimport { setSettingPopover, setSpeedPopover } from \"../../../helpers/redux/slices/popoversSlice\";\r\nimport { videoTag } from \"../../../helpers/constants\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName, SettingSections } from \"../../../helpers/interfaces/enums\";\r\nimport { setUserSettings } from \"../../../helpers/redux/slices/userSlice\";\r\nimport { sendFluentLog } from \"../../../helpers/logs/fluentdLogger\";\r\nimport { speedChangeLog } from \"../../../helpers/logs/logs\";\r\nimport { ISpeed } from \"../../../helpers/interfaces/interfaces\";\r\nimport Image from \"next/legacy/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Popover from \"../popover/popover\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\n\r\nconst speeds = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];\r\n\r\nconst Speed = ({setSection, showSpeedIcon}: ISpeed) => {\r\n const dispatch = useAppDispatch();\r\n useAppSelector(({ controller: { showMiniPlayer } }) => ({ showMiniPlayer }), shallowEqual);\r\n useAppSelector(({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }), shallowEqual);\r\n const { speedPopover } = useAppSelector(({ popovers: { speedPopover } }) => ({ speedPopover }), shallowEqual);\r\n const { settings } = useAppSelector(({ user: { settings } }) => ({ settings }), shallowEqual);\r\n\r\n const speedRef = useRef<any>(null);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n useOnClickOutside(speedRef, () => {\r\n if (speedPopover) dispatch(setSpeedPopover(false));\r\n });\r\n\r\n useEffect(() => {\r\n if (videoTag()) videoTag().playbackRate = settings.speed;\r\n }, []);\r\n\r\n const speedContent = (\r\n <div id={SettingSections.speed} className=\"animate__animated animate__fadeIn pl-py-2\">\r\n <ul className=\"pl-flex pl-flex-col\">\r\n {speeds.map((speed: number, index: number) => (\r\n <li\r\n key={index}\r\n className={`pl-flex pl-items-center pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 pl-p-1 pl-pr-2 ${settings.speed === speed && \"pl-bg-primary/[0.12] !pl-cursor-default\"}`}\r\n onClick={settings.speed === speed ? () => { } : () => {\r\n if (!conditions(ConditionName.isStaticFormat)) sendFluentLog(speedChangeLog(speed));\r\n dispatch(setActiveElements(false));\r\n dispatch(setSettingPopover(false));\r\n dispatch(setSpeedPopover(false));\r\n dispatch(setUserSettings({ ...settings, speed }));\r\n videoTag().playbackRate = speed;\r\n if (setSection) setSection(SettingSections.main);\r\n }}\r\n >\r\n {!conditions(ConditionName.isTouchScreen) && settings.speed === speed && (\r\n <div className=\"pl-absolute pl-right-[10px]\">\r\n <Image\r\n src={IMAGES.tick}\r\n alt=\"\"\r\n width={12}\r\n height={9}\r\n />\r\n </div>\r\n )}\r\n {conditions(ConditionName.isTouchScreen) && (\r\n <div className={`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${settings.speed === speed && \"pl-border-primary\"} pl-mr-[10px]`}>\r\n {settings.speed === speed && <div className=\"pl-w-full pl-h-full pl-rounded-full pl-bg-primary\" />}\r\n </div>\r\n )}\r\n <p className=\"pl-w-full pl-px-2 pl-py-1 pl-pr-[36px] pl-flex pl-items-center pl-gap-2\">{speed}</p>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n )\r\n\r\n return (\r\n <>\r\n {showSpeedIcon ? (\r\n <div className=\"pl-relative pl-flex pl-items-center\">\r\n <Image\r\n src={IMAGES.speed1}\r\n alt=\"speed-icon\"\r\n width={20}\r\n height={20}\r\n onClick={() => dispatch(setSpeedPopover(true))}\r\n onMouseOver={() => !conditions(ConditionName.isTouchScreen) && !conditions(ConditionName.showSpeedPopover) && setShowTooltip(true)}\r\n onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n className=\"pl-cursor-pointer\"\r\n />\r\n {showTooltip && (\r\n <ControllbarTooltip\r\n title=\"سرعت\"\r\n />\r\n )}\r\n <Popover\r\n classNames={`!pl-p-0 pl-overflow-hidden !pl-bg-white ${conditions(ConditionName.isTouchScreen) ? \"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none\" : \"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]\"} ${conditions(ConditionName.isTouchScreenPortrait) && \"!pl-w-screen tablet:!pl-max-w-[285px] tablet:!pl-mx-auto\"} ${conditions(ConditionName.isTouchScreenLandscape) && \"pl-w-full pl-max-w-[285px]\"}`}\r\n status={speedPopover}\r\n onClose={() => dispatch(setSpeedPopover(false))}\r\n type={conditions(ConditionName.isTouchScreen) ? \"modal\" : \"popover\"}\r\n isBlurBackground={conditions(ConditionName.isTouchScreenPortrait)}\r\n ref={speedRef}\r\n isHeader={conditions(ConditionName.isTouchScreen)}\r\n customHeader={<></>}\r\n isHasCatchUpLineOnTop={conditions(ConditionName.isTouchScreen)}\r\n >\r\n {speedContent}\r\n </Popover>\r\n </div>\r\n ) : (\r\n <>{speedContent}</>\r\n )}\r\n\r\n </>\r\n );\r\n};\r\n\r\nexport default Speed;\r\n","import { shallowEqual } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { secondsToHMS } from \"../../../helpers/helpers\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\n\r\nconst ElapsedTime = () => {\r\n const { duration, currentTime } = useAppSelector(\r\n ({ controller: { duration, currentTime } }) => ({ duration, currentTime }),\r\n shallowEqual\r\n );\r\n useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n return (\r\n <>\r\n <div\r\n className={`pl-mr-auto !pl-text-white pl-w-full pl-max-w-max pl-text-[12px] pl-font-bold ${conditions(ConditionName.isFullScreen) ? \"pl-ml-8\" : \"pl-ml-4\"} ${conditions(ConditionName.isTouchScreenPortrait) && \"!pl-ml-0\"}`}\r\n >\r\n <span>{secondsToHMS(duration)}</span>\r\n <span> / </span>\r\n <span>{secondsToHMS(currentTime)}</span>\r\n </div>\r\n </>\r\n );\r\n};\r\n\r\nexport default ElapsedTime;\r\n","import Image from \"next/legacy/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { handleLock } from \"../../../helpers/redux/actions/controller.actions\";\r\n\r\nconst Unlock = () => {\r\n\r\n return (\r\n <Image \r\n src={IMAGES.unlock} \r\n alt=\"unlock-icon\" \r\n width={20} \r\n height={20}\r\n onClick={() => handleLock(\"lock\")}\r\n />\r\n );\r\n};\r\n\r\nexport default Unlock;\r\n","import Image from \"next/legacy/image\";\r\nimport { useEffect } from \"react\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport store from \"../../../helpers/redux/store\";\r\nimport { notShowingLoaderTime, showLoaderTime } from \"../../../helpers/environment\";\r\nimport { setShowCheckInternetSnackBar } from \"../../../helpers/redux/slices/videoDataSlice\";\r\n\r\nconst CheckInternet = () => {\r\n const dispatch = useAppDispatch();\r\n const { isLoading } = useAppSelector(({ controller: { isLoading } }) => ({ isLoading }), shallowEqual);\r\n const { showCheckInternetSnackBar } = useAppSelector(({ videoData: { showCheckInternetSnackBar } }) => ({ showCheckInternetSnackBar }), shallowEqual);\r\n\r\n useEffect(() => {\r\n let timeout: any = null;\r\n clearTimeout(timeout);\r\n if (conditions(ConditionName.isLoading)) {\r\n timeout = setTimeout(() => {\r\n const isLoading = store.getState().controller.isLoading;\r\n if (isLoading) dispatch(setShowCheckInternetSnackBar(true));\r\n },showLoaderTime)\r\n timeout = setTimeout(() => {\r\n dispatch(setShowCheckInternetSnackBar(false));\r\n dispatch(setActiveElements(false));\r\n }, notShowingLoaderTime)\r\n } else {\r\n dispatch(setShowCheckInternetSnackBar(false));\r\n clearTimeout(timeout);\r\n dispatch(setActiveElements(false));\r\n }\r\n\r\n return () => clearTimeout(timeout);\r\n }, [isLoading])\r\n\r\n return (\r\n <div className={`pl-absolute pl-bottom-0 pl-w-full pl-flex pl-justify-center pl-mb-[20px] animate__animated animate__faster ${showCheckInternetSnackBar ? \"animate__fadeIn\" : \"animate__fadeOut\"} ${conditions(ConditionName.showMiniPlayer) ? \"pl-z-[10]\" : \"pl-z-[-1]\"}`}>\r\n <div className=\"pl-flex pl-items-center pl-gap-3 pl-bg-background pl-w-max pl-px-[18px] pl-py-4 pl-rounded-[8px]\">\r\n <Image\r\n src={IMAGES.infoCircle}\r\n alt=\"info-circle\"\r\n width={16}\r\n height={16}\r\n />\r\n <p className=\"pl-text-[12px] pl-text-white/[0.9]\">لطفا وضعیت اینترنت خود را بررسی کنید.</p>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default CheckInternet;","import dynamic from \"next/dynamic\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\n\r\nconst StaticVideoTag = dynamic(() => import(\"./staticVideoTag\"));\r\nconst NonStaticVideoTag = dynamic(() => import(\"./nonStaticVideoTag\"));\r\n\r\nconst VideoTag = () => {\r\n return <>{conditions(ConditionName.isStaticFormat) ? <StaticVideoTag /> : <NonStaticVideoTag /> }</>;\r\n};\r\n\r\nexport default VideoTag;\r\n","import { useEffect } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useAppDispatch, useAppSelector } from \"../redux/hooks\";\r\nimport { setIsFullScreen } from \"../redux/slices/controllerSlice\";\r\nimport { handleVideoElementSizeInfo } from \"../redux/actions/controller.actions\";\r\nimport { fullscreenLog } from \"../logs/logs\";\r\nimport { sendFluentLog } from \"../logs/fluentdLogger\";\r\n\r\nconst useFullScreen = () => {\r\n const dispatch = useAppDispatch();\r\n useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n\r\n useEffect(() => {\r\n const handleChangeFullScreen = () => {\r\n const isFullScreen = document.fullscreenElement;\r\n\r\n if (isFullScreen) dispatch(setIsFullScreen(true));\r\n else {\r\n dispatch(setIsFullScreen(false));\r\n handleVideoElementSizeInfo();\r\n sendFluentLog(fullscreenLog(\"exitFullScreen\"));\r\n }\r\n };\r\n\r\n if (document.addEventListener) {\r\n document.addEventListener(\"webkitfullscreenchange\", handleChangeFullScreen, false);\r\n document.addEventListener(\"mozfullscreenchange\", handleChangeFullScreen, false);\r\n document.addEventListener(\"fullscreenchange\", handleChangeFullScreen, false);\r\n document.addEventListener(\"MSFullscreenChange\", handleChangeFullScreen, false);\r\n }\r\n\r\n () => {\r\n document.removeEventListener(\"webkitfullscreenchange\", handleChangeFullScreen, false);\r\n document.removeEventListener(\"mozfullscreenchange\", handleChangeFullScreen, false);\r\n document.removeEventListener(\"fullscreenchange\", handleChangeFullScreen, false);\r\n document.removeEventListener(\"MSFullscreenChange\", handleChangeFullScreen, false);\r\n };\r\n }, []);\r\n};\r\n\r\nexport default useFullScreen;\r\n","import { useEffect, useRef } from \"react\";\r\nimport { checkParentTarget, isTouchScreen } from \"../helpers\";\r\nimport { activeElementsTime } from \"../environment\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useAppDispatch, useAppSelector } from \"../redux/hooks\";\r\nimport { setActiveElements } from \"../redux/slices/controllerSlice\";\r\nimport store from \"../redux/store\";\r\n\r\nconst useActiveInActive = (isRightDoubleTouched: boolean, isLeftDoubleTouched: boolean) => {\r\n const dispatch = useAppDispatch();\r\n const { activeElements } = useAppSelector(({ controller: { activeElements } }) => ({ activeElements }), shallowEqual);\r\n\r\n const timeoutRef = useRef<any>(null);\r\n const isRightDoubleTouchedRef = useRef<boolean>(isRightDoubleTouched);\r\n const isLeftDoubleTouchedRef = useRef<boolean>(isLeftDoubleTouched);\r\n\r\n useEffect(() => {\r\n isRightDoubleTouchedRef.current = isRightDoubleTouched;\r\n }, [isRightDoubleTouched]);\r\n\r\n useEffect(() => {\r\n isLeftDoubleTouchedRef.current = isLeftDoubleTouched;\r\n }, [isLeftDoubleTouched]);\r\n\r\n useEffect(() => {\r\n let shouldInActiveElements = false;\r\n\r\n const handlePointerMove = (event: any) => {\r\n const { activeElements, isEnded } = store.getState().controller;\r\n if (isEnded) dispatch(setActiveElements(true));\r\n else if (event.pointerType === \"mouse\") {\r\n clearTimeout(timeoutRef.current);\r\n if (!activeElements) dispatch(setActiveElements(true));\r\n else if (\r\n [\"player-tag\", \"main-content\", \"player-controllbar\", \"video-opacity\", \"playerElements\", \"touchBackward\", \"touchForward\"].includes(event.target.id)\r\n )\r\n shouldInActiveElements = true;\r\n timeoutRef.current = setTimeout(() => {\r\n const { settingPopover, speedPopover, qualityLevelsPopover } = store.getState().popovers;\r\n const { play } = store.getState().controller;\r\n if (!settingPopover && !speedPopover && !qualityLevelsPopover && play && shouldInActiveElements) dispatch(setActiveElements(false));\r\n }, activeElementsTime);\r\n }\r\n };\r\n\r\n const handleTouchStart = (event: any) => {\r\n setTimeout(() => {\r\n const { activeElements, isEnded, firstPlay } = store.getState().controller;\r\n clearTimeout(timeoutRef.current);\r\n if (isEnded) return dispatch(setActiveElements(true));\r\n if (isTouchScreen() && !firstPlay && !isRightDoubleTouchedRef.current && !isLeftDoubleTouchedRef.current) {\r\n if (\r\n [\"player-tag\", \"main-content\", \"video-opacity\", \"touchBackward\", \"touchForward\"].includes(event.target.id) ||\r\n checkParentTarget(event, \"playerElements\")\r\n ) {\r\n dispatch(setActiveElements(!activeElements));\r\n timeoutRef.current = setTimeout(() => {\r\n const { settingPopover, speedPopover, qualityLevelsPopover } = store.getState().popovers;\r\n if (!settingPopover && !speedPopover && !qualityLevelsPopover) dispatch(setActiveElements(false));\r\n }, activeElementsTime);\r\n } else {\r\n timeoutRef.current = setTimeout(() => {\r\n const { settingPopover, speedPopover, qualityLevelsPopover } = store.getState().popovers;\r\n if (!settingPopover && !speedPopover && !qualityLevelsPopover) dispatch(setActiveElements(false));\r\n }, activeElementsTime);\r\n }\r\n }\r\n }, 200);\r\n };\r\n\r\n const handleTouchMove = () => {\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => {\r\n const { activeElements, isEnded } = store.getState().controller;\r\n const { settingPopover, speedPopover, qualityLevelsPopover } = store.getState().popovers;\r\n if (isEnded) dispatch(setActiveElements(true));\r\n else if (!settingPopover && !speedPopover && !qualityLevelsPopover && activeElements && !isEnded)\r\n dispatch(setActiveElements(!activeElements));\r\n }, activeElementsTime);\r\n };\r\n\r\n document.getElementById(\"video-area\")!.addEventListener(\"touchstart\", handleTouchStart);\r\n document.getElementById(\"video-area\")!.addEventListener(\"touchmove\", handleTouchMove);\r\n document.getElementById(\"video-area\")!.addEventListener(\"pointermove\", handlePointerMove);\r\n\r\n return () => {\r\n const videoArea = document.getElementById(\"video-area\")!;\r\n if (videoArea) {\r\n videoArea.removeEventListener(\"touchstart\", handleTouchStart);\r\n videoArea.removeEventListener(\"touchmove\", handleTouchMove);\r\n videoArea.removeEventListener(\"pointermove\", handlePointerMove);\r\n }\r\n };\r\n }, [activeElements, isRightDoubleTouched, isLeftDoubleTouched]);\r\n};\r\n\r\nexport default useActiveInActive;\r\n","import { useEffect } from \"react\";\r\nimport { videoTag } from \"../constants\";\r\nimport { conditions } from \"../conditions/conditions\";\r\nimport { ConditionName } from \"../interfaces/enums\";\r\nimport { handleVideoElementSizeInfo } from \"../redux/actions/controller.actions\";\r\nimport { useAppSelector } from \"../redux/hooks\";\r\nimport { isTouchScreen } from \"../helpers\";\r\nimport { shallowEqual } from \"react-redux\";\r\n\r\nconst useHandleResize = () => {\r\n\r\n const { firstPlay, showMiniPlayer, isFullScreen } = useAppSelector(\r\n ({ controller: { firstPlay, showMiniPlayer, isFullScreen } }) => ({\r\n firstPlay,\r\n showMiniPlayer,\r\n isFullScreen,\r\n }),\r\n shallowEqual\r\n );\r\n\r\n useEffect(() => {\r\n if (videoTag()) {\r\n let timeout: any;\r\n const handleResize = () => {\r\n if (!conditions(ConditionName.showMiniPlayer)) {\r\n timeout = setTimeout(\r\n () => {\r\n handleVideoElementSizeInfo();\r\n },\r\n isTouchScreen() ? 0 : 300\r\n );\r\n }\r\n };\r\n handleResize();\r\n window.addEventListener(\"resize\", handleResize);\r\n\r\n return () => {\r\n window.removeEventListener(\"resize\", handleResize);\r\n clearTimeout(timeout);\r\n };\r\n }\r\n }, [firstPlay, showMiniPlayer, isFullScreen, videoTag()]);\r\n}\r\n\r\nexport default useHandleResize;"]}
|