@wix/video 1.83.0 → 1.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/cjs/Video.module.scss +1 -1
  2. package/dist/cjs/custom-element/utils.js +0 -7
  3. package/dist/cjs/custom-element/utils.js.map +1 -1
  4. package/dist/cjs/custom-element/videoLayout.js.map +1 -1
  5. package/dist/cjs/storybook/Container.js +5 -21
  6. package/dist/cjs/storybook/Container.js.map +1 -1
  7. package/dist/esm/Video.module.scss +1 -1
  8. package/dist/esm/custom-element/utils.js +0 -7
  9. package/dist/esm/custom-element/utils.js.map +1 -1
  10. package/dist/esm/custom-element/videoLayout.js.map +1 -1
  11. package/dist/esm/storybook/Container.js +4 -14
  12. package/dist/esm/storybook/Container.js.map +1 -1
  13. package/dist/statics/janet/iframe.html +1 -1
  14. package/dist/statics/janet/{main.3d3bf84f.iframe.bundle.js → main.7beb1923.iframe.bundle.js} +4 -5
  15. package/dist/statics/janet/main.7beb1923.iframe.bundle.js.map +1 -0
  16. package/dist/statics/janet/project.json +1 -1
  17. package/dist/statics/manifest.json +2 -2
  18. package/dist/statics/manifest.min.json +2 -2
  19. package/dist/statics/video.css +1 -1
  20. package/dist/statics/video.css.map +1 -1
  21. package/dist/statics/video.min.css +1 -1
  22. package/dist/statics/video.rtl.css +1 -1
  23. package/dist/statics/video.rtl.min.css +1 -1
  24. package/dist/statics/video.umd.js +2 -2
  25. package/dist/statics/video.umd.js.map +1 -1
  26. package/dist/statics/video.umd.min.js +1 -1
  27. package/dist/statics/video.umd.min.js.map +1 -1
  28. package/dist/tsconfig.tsbuildinfo +1 -1
  29. package/dist/types/custom-element/utils.d.ts +1 -1
  30. package/dist/types/custom-element/utils.d.ts.map +1 -1
  31. package/dist/types/custom-element/videoLayout.d.ts +1 -1
  32. package/dist/types/custom-element/videoLayout.d.ts.map +1 -1
  33. package/dist/types/storybook/Container.d.ts +5 -1
  34. package/dist/types/storybook/Container.d.ts.map +1 -1
  35. package/package.json +2 -2
  36. package/dist/statics/janet/main.3d3bf84f.iframe.bundle.js.map +0 -1
@@ -1 +1 @@
1
- {"generatedAt":1767513113540,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":true,"hasStorybookEslint":false,"refCount":0,"monorepo":"Turborepo","packageManager":{"type":"yarn","version":"4.12.0"},"typescriptOptions":{"check":false,"reactDocgen":false},"language":"typescript","storybookPackages":{"@wix/yoshi-storybook-dependencies":{"version":"6.163.0"}},"framework":{},"addons":{"@storybook/addon-controls":{"version":"6.5.16"},"@storybook/addon-docs":{"version":"6.5.16"}}}
1
+ {"generatedAt":1767603104920,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":true,"hasStorybookEslint":false,"refCount":0,"monorepo":"Turborepo","packageManager":{"type":"yarn","version":"4.12.0"},"typescriptOptions":{"check":false,"reactDocgen":false},"language":"typescript","storybookPackages":{"@wix/yoshi-storybook-dependencies":{"version":"6.163.0"}},"framework":{},"addons":{"@storybook/addon-controls":{"version":"6.5.16"},"@storybook/addon-docs":{"version":"6.5.16"}}}
@@ -1,4 +1,4 @@
1
1
  {
2
- "video.css": "https://static.parastorage.com/services/video/0491a30f8ecf789e08a3eb51c33cb6f7516a5e5576359282eca34ed7/video.css",
3
- "video.js": "https://static.parastorage.com/services/video/0491a30f8ecf789e08a3eb51c33cb6f7516a5e5576359282eca34ed7/video.umd.js"
2
+ "video.css": "https://static.parastorage.com/services/video/3b2a44b9844e90ddc23a5d3f8be35b079a64f477e3efc597c24087ec/video.css",
3
+ "video.js": "https://static.parastorage.com/services/video/3b2a44b9844e90ddc23a5d3f8be35b079a64f477e3efc597c24087ec/video.umd.js"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
- "video.css": "https://static.parastorage.com/services/video/0491a30f8ecf789e08a3eb51c33cb6f7516a5e5576359282eca34ed7/video.min.css",
3
- "video.js": "https://static.parastorage.com/services/video/0491a30f8ecf789e08a3eb51c33cb6f7516a5e5576359282eca34ed7/video.umd.min.js"
2
+ "video.css": "https://static.parastorage.com/services/video/3b2a44b9844e90ddc23a5d3f8be35b079a64f477e3efc597c24087ec/video.min.css",
3
+ "video.js": "https://static.parastorage.com/services/video/3b2a44b9844e90ddc23a5d3f8be35b079a64f477e3efc597c24087ec/video.umd.min.js"
4
4
  }
@@ -1,7 +1,7 @@
1
1
  /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
2
2
  !*** css ../../../node_modules/@wix/yoshi-style-dependencies/css-loader.js??ruleSet[1].rules[2].rules[1].oneOf[1]!../../../node_modules/@wix/yoshi-style-dependencies/postcss-loader.js??ruleSet[1].rules[2].rules[2]!../../../node_modules/@wix/yoshi-style-dependencies/resolve-url-loader.js!../../../node_modules/@wix/yoshi-style-dependencies/sass-loader.js??ruleSet[1].rules[2].rules[4]!./Video.module.scss ***!
3
3
  \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
4
- .nhOWNx{width:100%;height:100%;display:block;position:relative;container-type:size}.Jy9J5J{width:100%;height:100%;-o-object-fit:var(--poster-fit, cover);object-fit:var(--poster-fit, cover);-o-object-position:var(--poster-align, center);object-position:var(--poster-align, center)}.b5Y937{height:100%;width:100%;top:0;left:0;position:absolute;-o-object-fit:var(--video-fit, cover);object-fit:var(--video-fit, cover);opacity:0;--position-left: calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));--position-top: calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));-o-object-position:clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%);object-position:clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%)}
4
+ .nhOWNx{width:100%;height:100%;display:block;position:relative;container-type:size}.Jy9J5J{width:100%;height:100%;-o-object-fit:var(--poster-fit, cover);object-fit:var(--poster-fit, cover);-o-object-position:var(--poster-align, center);object-position:var(--poster-align, center)}.b5Y937{height:100%;width:100%;top:0;left:0;position:absolute;-o-object-fit:var(--video-fit, cover);object-fit:var(--video-fit, cover);opacity:0;--position-left: calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));--position-top: calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));-o-object-position:var(--video-position, clamp(100%, var(--position-left), 0%) clamp(100%, var(--position-top), 0%));object-position:var(--video-position, clamp(100%, var(--position-left), 0%) clamp(100%, var(--position-top), 0%))}
5
5
  /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
6
6
  !*** css ../../../node_modules/@wix/yoshi-style-dependencies/css-loader.js??ruleSet[1].rules[2].rules[1].oneOf[1]!../../../node_modules/@wix/yoshi-style-dependencies/postcss-loader.js??ruleSet[1].rules[2].rules[2]!../../../node_modules/@wix/yoshi-style-dependencies/resolve-url-loader.js!../../../node_modules/@wix/yoshi-style-dependencies/sass-loader.js??ruleSet[1].rules[2].rules[4]!../../image/dist/esm/Image.module.scss ***!
7
7
  \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@@ -1 +1 @@
1
- {"version":3,"file":"video.css","mappings":";;;AAAA,QACE,WACA,YACA,cACA,kBACA,oBAGF,QACE,WACA,YACA,2EACA,2FAGF,QACE,YACA,WACA,MACA,OACA,kBACA,yEACA,UACA,kFACA,iFACA,iL;;;;ACzBF,QACE,cACA,WACA,YAEA,YACE,yCAGF,+BACE,iBACA,8BAEA,+CACE,Y","sources":["webpack://_wix_video/./Video.module.scss","webpack://_wix_video/../../image/dist/esm/Image.module.scss"],"sourcesContent":[".video-container {\n width: 100%;\n height: 100%;\n display: block;\n position: relative;\n container-type: size;\n}\n\n.video-poster-img {\n width: 100%;\n height: 100%;\n object-fit: var(--poster-fit, cover);\n object-position: var(--poster-align, center);\n}\n\n.video {\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n position: absolute;\n object-fit: var(--video-fit, cover);\n opacity: 0;\n --position-left: calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));\n --position-top: calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));\n object-position: clamp(100%, var(--position-left), 0%) clamp(100%, var(--position-top), 0%);\n}\n",".image {\n display: block;\n width: 100%;\n height: 100%;\n\n img {\n max-width: var(--wix-img-max-width, 100%);\n }\n\n &[data-animate-blur] img {\n filter: blur(9px);\n transition: filter 0.8s ease-in;\n\n &[data-load-done] {\n filter: none;\n }\n }\n}\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"video.css","mappings":";;;AAAA,QACE,WACA,YACA,cACA,kBACA,oBAGF,QACE,WACA,YACA,2EACA,2FAGF,QACE,YACA,WACA,MACA,OACA,kBACA,yEACA,UACA,kFACA,iFACA,uO;;;;ACzBF,QACE,cACA,WACA,YAEA,YACE,yCAGF,+BACE,iBACA,8BAEA,+CACE,Y","sources":["webpack://_wix_video/./Video.module.scss","webpack://_wix_video/../../image/dist/esm/Image.module.scss"],"sourcesContent":[".video-container {\n width: 100%;\n height: 100%;\n display: block;\n position: relative;\n container-type: size;\n}\n\n.video-poster-img {\n width: 100%;\n height: 100%;\n object-fit: var(--poster-fit, cover);\n object-position: var(--poster-align, center);\n}\n\n.video {\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n position: absolute;\n object-fit: var(--video-fit, cover);\n opacity: 0;\n --position-left: calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));\n --position-top: calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));\n object-position: var(--video-position, clamp(100%, var(--position-left), 0%) clamp(100%, var(--position-top), 0%));\n}\n",".image {\n display: block;\n width: 100%;\n height: 100%;\n\n img {\n max-width: var(--wix-img-max-width, 100%);\n }\n\n &[data-animate-blur] img {\n filter: blur(9px);\n transition: filter 0.8s ease-in;\n\n &[data-load-done] {\n filter: none;\n }\n }\n}\n"],"names":[],"sourceRoot":""}
@@ -1 +1 @@
1
- .nhOWNx{container-type:size;display:block;position:relative}.Jy9J5J,.nhOWNx{height:100%;width:100%}.Jy9J5J{-o-object-fit:var(--poster-fit,cover);object-fit:var(--poster-fit,cover);-o-object-position:var(--poster-align,center);object-position:var(--poster-align,center)}.b5Y937{--position-left:calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));--position-top:calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));left:0;-o-object-fit:var(--video-fit,cover);object-fit:var(--video-fit,cover);-o-object-position:clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%);object-position:clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%);opacity:0;position:absolute;top:0}.L36Tx5,.b5Y937{height:100%;width:100%}.L36Tx5{display:block}.L36Tx5 img{max-width:var(--wix-img-max-width,100%)}.L36Tx5[data-animate-blur] img{filter:blur(9px);transition:filter .8s ease-in}.L36Tx5[data-animate-blur] img[data-load-done]{filter:none}
1
+ .nhOWNx{container-type:size;display:block;position:relative}.Jy9J5J,.nhOWNx{height:100%;width:100%}.Jy9J5J{-o-object-fit:var(--poster-fit,cover);object-fit:var(--poster-fit,cover);-o-object-position:var(--poster-align,center);object-position:var(--poster-align,center)}.b5Y937{--position-left:calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));--position-top:calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));left:0;-o-object-fit:var(--video-fit,cover);object-fit:var(--video-fit,cover);-o-object-position:var(--video-position,clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%));object-position:var(--video-position,clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%));opacity:0;position:absolute;top:0}.L36Tx5,.b5Y937{height:100%;width:100%}.L36Tx5{display:block}.L36Tx5 img{max-width:var(--wix-img-max-width,100%)}.L36Tx5[data-animate-blur] img{filter:blur(9px);transition:filter .8s ease-in}.L36Tx5[data-animate-blur] img[data-load-done]{filter:none}
@@ -1,7 +1,7 @@
1
1
  /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
2
2
  !*** css ../../../node_modules/@wix/yoshi-style-dependencies/css-loader.js??ruleSet[1].rules[2].rules[1].oneOf[1]!../../../node_modules/@wix/yoshi-style-dependencies/postcss-loader.js??ruleSet[1].rules[2].rules[2]!../../../node_modules/@wix/yoshi-style-dependencies/resolve-url-loader.js!../../../node_modules/@wix/yoshi-style-dependencies/sass-loader.js??ruleSet[1].rules[2].rules[4]!./Video.module.scss ***!
3
3
  \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
4
- .nhOWNx{width:100%;height:100%;display:block;position:relative;container-type:size}.Jy9J5J{width:100%;height:100%;-o-object-fit:var(--poster-fit, cover);object-fit:var(--poster-fit, cover);-o-object-position:var(--poster-align, center);object-position:var(--poster-align, center)}.b5Y937{height:100%;width:100%;top:0;right:0;position:absolute;-o-object-fit:var(--video-fit, cover);object-fit:var(--video-fit, cover);opacity:0;--position-left: calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));--position-top: calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));-o-object-position:clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%);object-position:clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%)}
4
+ .nhOWNx{width:100%;height:100%;display:block;position:relative;container-type:size}.Jy9J5J{width:100%;height:100%;-o-object-fit:var(--poster-fit, cover);object-fit:var(--poster-fit, cover);-o-object-position:var(--poster-align, center);object-position:var(--poster-align, center)}.b5Y937{height:100%;width:100%;top:0;right:0;position:absolute;-o-object-fit:var(--video-fit, cover);object-fit:var(--video-fit, cover);opacity:0;--position-left: calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));--position-top: calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));-o-object-position:var(--video-position, clamp(100%, var(--position-left), 0%) clamp(100%, var(--position-top), 0%));object-position:var(--video-position, clamp(100%, var(--position-left), 0%) clamp(100%, var(--position-top), 0%))}
5
5
  /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
6
6
  !*** css ../../../node_modules/@wix/yoshi-style-dependencies/css-loader.js??ruleSet[1].rules[2].rules[1].oneOf[1]!../../../node_modules/@wix/yoshi-style-dependencies/postcss-loader.js??ruleSet[1].rules[2].rules[2]!../../../node_modules/@wix/yoshi-style-dependencies/resolve-url-loader.js!../../../node_modules/@wix/yoshi-style-dependencies/sass-loader.js??ruleSet[1].rules[2].rules[4]!../../image/dist/esm/Image.module.scss ***!
7
7
  \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@@ -1 +1 @@
1
- .nhOWNx{container-type:size;display:block;position:relative}.Jy9J5J,.nhOWNx{height:100%;width:100%}.Jy9J5J{-o-object-fit:var(--poster-fit,cover);object-fit:var(--poster-fit,cover);-o-object-position:var(--poster-align,center);object-position:var(--poster-align,center)}.b5Y937{--position-left:calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));--position-top:calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));-o-object-fit:var(--video-fit,cover);object-fit:var(--video-fit,cover);-o-object-position:clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%);object-position:clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%);opacity:0;position:absolute;right:0;top:0}.L36Tx5,.b5Y937{height:100%;width:100%}.L36Tx5{display:block}.L36Tx5 img{max-width:var(--wix-img-max-width,100%)}.L36Tx5[data-animate-blur] img{filter:blur(9px);transition:filter .8s ease-in}.L36Tx5[data-animate-blur] img[data-load-done]{filter:none}
1
+ .nhOWNx{container-type:size;display:block;position:relative}.Jy9J5J,.nhOWNx{height:100%;width:100%}.Jy9J5J{-o-object-fit:var(--poster-fit,cover);object-fit:var(--poster-fit,cover);-o-object-position:var(--poster-align,center);object-position:var(--poster-align,center)}.b5Y937{--position-left:calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));--position-top:calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));-o-object-fit:var(--video-fit,cover);object-fit:var(--video-fit,cover);-o-object-position:var(--video-position,clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%));object-position:var(--video-position,clamp(100%,var(--position-left),0%) clamp(100%,var(--position-top),0%));opacity:0;position:absolute;right:0;top:0}.L36Tx5,.b5Y937{height:100%;width:100%}.L36Tx5{display:block}.L36Tx5 img{max-width:var(--wix-img-max-width,100%)}.L36Tx5[data-animate-blur] img{filter:blur(9px);transition:filter .8s ease-in}.L36Tx5[data-animate-blur] img[data-load-done]{filter:none}
@@ -523,7 +523,7 @@ module.exports = _typeof, module.exports.__esModule = true, module.exports["defa
523
523
  /******/
524
524
  /******/ /* webpack/runtime/publicPath */
525
525
  /******/ (() => {
526
- /******/ __webpack_require__.p = "https://static.parastorage.com/services/video/0491a30f8ecf789e08a3eb51c33cb6f7516a5e5576359282eca34ed7/";
526
+ /******/ __webpack_require__.p = "https://static.parastorage.com/services/video/3b2a44b9844e90ddc23a5d3f8be35b079a64f477e3efc597c24087ec/";
527
527
  /******/ })();
528
528
  /******/
529
529
  /******/ /* webpack/runtime/jsonp chunk loading */
@@ -656,7 +656,7 @@ var external_React_ = __webpack_require__(883);
656
656
  // extracted by mini-css-extract-plugin
657
657
  /* harmony default export */ const Video_module = ({"video-container":"nhOWNx","videoContainer":"nhOWNx","video-poster-img":"Jy9J5J","videoPosterImg":"Jy9J5J","video":"b5Y937"});
658
658
  ;// ./custom-element/utils.ts
659
- const STATIC_VIDEO_URL='https://video.wixstatic.com/';const STATIC_ADAPTIVE_VIDEO_URL='https://files.wix.com/';const isAbsoluteUrl=url=>url.startsWith('http://')||url.startsWith('https://');function sortQualities(sources){return sources.sort((a,b)=>a.width*a.height-b.width*b.height);}function getCompleteUrl(url,staticVideoUrl){const completeUrl=isAbsoluteUrl(url)?new URL(url):new URL(url,staticVideoUrl);return completeUrl.href;}function getVideoQualityBySize(sources,_ref){let{width,height}=_ref;const targetQuality=sources.find(value=>value.width*value.height>width*height);return targetQuality||sources[sources.length-1];}function getScaleFactor(containerWidth,containerHeight,videoWidth,videoHeight){return{wScale:containerWidth/videoWidth,hScale:containerHeight/videoHeight};}function getVideoDimension(videoScale,videoWidth,videoHeight){const scale=Math.min(videoScale.wScale,videoScale.hScale);return{width:Math.round(videoWidth*scale),height:Math.round(videoHeight*scale)};}function setVideoFocalPoint(videoNode,focalPoint){const computedStyle=getComputedStyle(videoNode);const videoFit=computedStyle.getPropertyValue('--video-fit');if(videoFit==='contain'){videoNode.style.setProperty('object-position','center');return;}videoNode.style.removeProperty('object-position');const focalX=(focalPoint==null?void 0:focalPoint.x)??50;const focalY=(focalPoint==null?void 0:focalPoint.y)??50;videoNode.style.setProperty('--focal-x',focalX.toString());videoNode.style.setProperty('--focal-y',focalY.toString());}async function getVideoSource(width,height,uri,qualityPolicy,sources,adaptiveSources,duration,onError){const hasProgressiveSources=sources&&sources.length>0;const hasAbsoluteUri=uri&&isAbsoluteUrl(uri);const shouldSkipAdaptiveShortVideo=duration&&duration<40;if(qualityPolicy==='adaptive'&&adaptiveSources&&adaptiveSources.length>0&&!shouldSkipAdaptiveShortVideo){const hlsSource=adaptiveSources.find(s=>s.format==='hls');const Hls=await __webpack_require__.e(/*! import() */ 189).then(__webpack_require__.bind(__webpack_require__, /*! hls.js */ 189));if(hlsSource&&Hls&&Hls.default.isSupported()){const videoSourceUrl=getCompleteUrl(hlsSource.uri,STATIC_ADAPTIVE_VIDEO_URL);const patchVideoSource=videoNode=>{const hls=new Hls.default();hls.loadSource(videoSourceUrl);hls.attachMedia(videoNode);hls.on(Hls.default.Events.ERROR,(_,data)=>{if(data.fatal){switch(data.type){case Hls.default.ErrorTypes.NETWORK_ERROR:hls.startLoad();if(onError){onError(new Error(`HLS Network Error: ${data.details}.\nAttempting to reconnect...`));}break;case Hls.default.ErrorTypes.MEDIA_ERROR:hls.recoverMediaError();if(onError){onError(new Error(`HLS Media Error: ${data.details}.\nAttempting to recover...`));}break;default:hls.destroy();if(onError){onError(new Error(`HLS Unknown Error: ${data.details}.\nUnrecoverable playback error`));}break;}}});};return{videoSourceUrl,patchVideoSource};}}if(hasProgressiveSources){const highestQuality=sources[sources.length-1];if(qualityPolicy==='highest'){var _highestQuality$types;const url=(_highestQuality$types=highestQuality.types.find(type=>type.format==='mp4'))==null?void 0:_highestQuality$types.uri;if(url){const videoSourceUrl=getCompleteUrl(url,STATIC_VIDEO_URL);return{videoSourceUrl,patchVideoSource:videoNode=>{videoNode.src=videoSourceUrl;videoNode.load();}};}}else{var _targetQuality$types$;const videoWidth=parseInt(highestQuality.width.toString(),10);const videoHeight=parseInt(highestQuality.height.toString(),10);const scaleFactor=getScaleFactor(width,height,videoWidth,videoHeight);const videoScaledDimensions=getVideoDimension(scaleFactor,videoWidth,videoHeight);const targetQuality=getVideoQualityBySize(sources,videoScaledDimensions);const url=(_targetQuality$types$=targetQuality.types.find(type=>type.format==='mp4'))==null?void 0:_targetQuality$types$.uri;if(url){const videoSourceUrl=getCompleteUrl(url,STATIC_VIDEO_URL);return{videoSourceUrl,patchVideoSource:videoNode=>{videoNode.src=videoSourceUrl;videoNode.load();}};}}}if(hasAbsoluteUri){return{videoSourceUrl:uri,patchVideoSource:videoNode=>{videoNode.src=uri;videoNode.load();}};}return{videoSourceUrl:'',patchVideoSource:()=>{}};}
659
+ const STATIC_VIDEO_URL='https://video.wixstatic.com/';const STATIC_ADAPTIVE_VIDEO_URL='https://files.wix.com/';const isAbsoluteUrl=url=>url.startsWith('http://')||url.startsWith('https://');function sortQualities(sources){return sources.sort((a,b)=>a.width*a.height-b.width*b.height);}function getCompleteUrl(url,staticVideoUrl){const completeUrl=isAbsoluteUrl(url)?new URL(url):new URL(url,staticVideoUrl);return completeUrl.href;}function getVideoQualityBySize(sources,_ref){let{width,height}=_ref;const targetQuality=sources.find(value=>value.width*value.height>width*height);return targetQuality||sources[sources.length-1];}function getScaleFactor(containerWidth,containerHeight,videoWidth,videoHeight){return{wScale:containerWidth/videoWidth,hScale:containerHeight/videoHeight};}function getVideoDimension(videoScale,videoWidth,videoHeight){const scale=Math.min(videoScale.wScale,videoScale.hScale);return{width:Math.round(videoWidth*scale),height:Math.round(videoHeight*scale)};}function setVideoFocalPoint(videoNode,focalPoint){const focalX=(focalPoint==null?void 0:focalPoint.x)??50;const focalY=(focalPoint==null?void 0:focalPoint.y)??50;videoNode.style.setProperty('--focal-x',focalX.toString());videoNode.style.setProperty('--focal-y',focalY.toString());}async function getVideoSource(width,height,uri,qualityPolicy,sources,adaptiveSources,duration,onError){const hasProgressiveSources=sources&&sources.length>0;const hasAbsoluteUri=uri&&isAbsoluteUrl(uri);const shouldSkipAdaptiveShortVideo=duration&&duration<40;if(qualityPolicy==='adaptive'&&adaptiveSources&&adaptiveSources.length>0&&!shouldSkipAdaptiveShortVideo){const hlsSource=adaptiveSources.find(s=>s.format==='hls');const Hls=await __webpack_require__.e(/*! import() */ 189).then(__webpack_require__.bind(__webpack_require__, /*! hls.js */ 189));if(hlsSource&&Hls&&Hls.default.isSupported()){const videoSourceUrl=getCompleteUrl(hlsSource.uri,STATIC_ADAPTIVE_VIDEO_URL);const patchVideoSource=videoNode=>{const hls=new Hls.default();hls.loadSource(videoSourceUrl);hls.attachMedia(videoNode);hls.on(Hls.default.Events.ERROR,(_,data)=>{if(data.fatal){switch(data.type){case Hls.default.ErrorTypes.NETWORK_ERROR:hls.startLoad();if(onError){onError(new Error(`HLS Network Error: ${data.details}.\nAttempting to reconnect...`));}break;case Hls.default.ErrorTypes.MEDIA_ERROR:hls.recoverMediaError();if(onError){onError(new Error(`HLS Media Error: ${data.details}.\nAttempting to recover...`));}break;default:hls.destroy();if(onError){onError(new Error(`HLS Unknown Error: ${data.details}.\nUnrecoverable playback error`));}break;}}});};return{videoSourceUrl,patchVideoSource};}}if(hasProgressiveSources){const highestQuality=sources[sources.length-1];if(qualityPolicy==='highest'){var _highestQuality$types;const url=(_highestQuality$types=highestQuality.types.find(type=>type.format==='mp4'))==null?void 0:_highestQuality$types.uri;if(url){const videoSourceUrl=getCompleteUrl(url,STATIC_VIDEO_URL);return{videoSourceUrl,patchVideoSource:videoNode=>{videoNode.src=videoSourceUrl;videoNode.load();}};}}else{var _targetQuality$types$;const videoWidth=parseInt(highestQuality.width.toString(),10);const videoHeight=parseInt(highestQuality.height.toString(),10);const scaleFactor=getScaleFactor(width,height,videoWidth,videoHeight);const videoScaledDimensions=getVideoDimension(scaleFactor,videoWidth,videoHeight);const targetQuality=getVideoQualityBySize(sources,videoScaledDimensions);const url=(_targetQuality$types$=targetQuality.types.find(type=>type.format==='mp4'))==null?void 0:_targetQuality$types$.uri;if(url){const videoSourceUrl=getCompleteUrl(url,STATIC_VIDEO_URL);return{videoSourceUrl,patchVideoSource:videoNode=>{videoNode.src=videoSourceUrl;videoNode.load();}};}}}if(hasAbsoluteUri){return{videoSourceUrl:uri,patchVideoSource:videoNode=>{videoNode.src=uri;videoNode.load();}};}return{videoSourceUrl:'',patchVideoSource:()=>{}};}
660
660
  // EXTERNAL MODULE: ../../../node_modules/@babel/runtime/helpers/defineProperty.js
661
661
  var defineProperty = __webpack_require__(929);
662
662
  var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);