cloudinary-video-player 3.6.4-edge.0 → 3.6.4-edge.1
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/dist/adaptive-streaming.js +5 -5
- package/dist/adaptive-streaming.min.js +4 -4
- package/dist/chapters.js +3 -3
- package/dist/chapters.min.js +3 -3
- package/dist/cld-video-player.css +2 -2
- package/dist/cld-video-player.js +38 -38
- package/dist/cld-video-player.light.js +38 -38
- package/dist/cld-video-player.light.min.js +4 -4
- package/dist/cld-video-player.min.css +3 -3
- package/dist/cld-video-player.min.js +4 -4
- package/dist/colors.js +2 -2
- package/dist/colors.min.js +2 -2
- package/dist/dash.js +2 -2
- package/dist/dash.min.js +2 -2
- package/dist/debug.js +3 -3
- package/dist/debug.min.js +3 -3
- package/dist/ima.js +2 -2
- package/dist/ima.min.js +2 -2
- package/dist/interaction-areas.js +4 -4
- package/dist/interaction-areas.min.js +3 -3
- package/dist/node_modules_lodash_throttle_js.js +2 -2
- package/dist/playlist.js +9 -9
- package/dist/playlist.min.js +3 -3
- package/dist/recommendations-overlay.js +4 -4
- package/dist/recommendations-overlay.min.js +3 -3
- package/dist/share.js +3 -3
- package/dist/share.min.js +3 -3
- package/dist/shoppable.js +7 -7
- package/dist/shoppable.min.js +3 -3
- package/dist/visual-search.js +4 -4
- package/dist/visual-search.min.js +3 -3
- package/lib/adaptive-streaming.js +1 -1
- package/lib/all.js +1 -1
- package/lib/chapters.js +1 -1
- package/lib/cld-video-player.js +1 -1
- package/lib/debug.js +1 -1
- package/lib/interaction-areas.js +1 -1
- package/lib/player.js +1 -1
- package/lib/playlist.js +1 -1
- package/lib/recommendations-overlay.js +1 -1
- package/lib/share.js +1 -1
- package/lib/shoppable.js +1 -1
- package/lib/videoPlayer.js +1 -1
- package/lib/visual-search.js +1 -1
- package/package.json +5 -2
package/lib/debug.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[40],{8592:(e,a
|
|
1
|
+
(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[40],{8592:(e,i,a)=>{a.d(i,{$n:()=>o,Lp:()=>t,mM:()=>s});const o={fastStart:{capLevelToPlayerSize:!0,ignoreDevicePixelRatio:!0,maxDevicePixelRatio:2,abrEwmaDefaultEstimate:4194304,abrEwmaDefaultEstimateMax:4194304,enableWorker:!1,startLevel:0},balanced:{capLevelToPlayerSize:!0,ignoreDevicePixelRatio:!0,maxDevicePixelRatio:2,abrEwmaDefaultEstimate:4194304,abrEwmaDefaultEstimateMax:4194304,enableWorker:!1},highQuality:{capLevelToPlayerSize:!0,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:2,abrEwmaDefaultEstimate:4194304,abrEwmaDefaultEstimateMax:4194304,enableWorker:!1}},s=Object.keys(o),t=window.matchMedia&&window.matchMedia("(dynamic-range: high)").matches},9017:(e,i,a)=>{a.d(i,{F0:()=>r,Fg:()=>t,IT:()=>n,T$:()=>u,Vv:()=>c,Yx:()=>l,be:()=>s,q3:()=>g,sb:()=>o});const o="cld-ia-layout-state",s="vp-ia",t="interaction-areas-container",r={PORTRAIT:"portrait",LANDSCAPE:"landscape",All:"all",CENTER:"center"},n={PULSING:"pulsing",SHADOWED:"shadowed"},l={[r.PORTRAIT]:"https://res.cloudinary.com/prod/raw/upload/v1623772481/video-player/vtts/portrait.vtt",[r.LANDSCAPE]:"https://res.cloudinary.com/prod/raw/upload/v1623772303/video-player/vtts/landscape.vtt",[r.All]:"https://res.cloudinary.com/prod/raw/upload/v1623250266/video-player/vtts/all.vtt",[r.CENTER]:"https://res.cloudinary.com/prod/raw/upload/v1623250265/video-player/vtts/center.vtt"},u="https://res.cloudinary.com/prod/image/upload/v1626764643/video-player/interaction-area-hand.svg",c=4500,g=250},9754:(e,i,a)=>{a.r(i),a.d(i,{playerValidators:()=>h,sourceValidators:()=>f});var o=a(608),s=a(9017),t=a(8592),r=a(8552),n=a.n(r),l=a(8446),u=a.n(l),c=a(7531),g=a.n(c),d=a(8953),m=a.n(d),b=a(7571),p=a.n(b),y=a(5779);const v=e=>m()(e)?`:(${Object.values(e).join("/")})`:"",S={isString:e=>({value:p(),message:i=>`'${i}' should be a string${v(e)}`}),isNumber:e=>({value:g(),message:i=>`'${i}' should be a number${v(e)}`}),isBoolean:()=>({value:n(),message:e=>`'${e}' should be a boolean`}),isFunction:()=>({value:u(),message:e=>`'${e}' should be a function`}),isPlainObject:()=>({value:m(),message:e=>`'${e}' should be an object`}),isObject:()=>({value:e=>e&&"object"==typeof e,message:e=>`'${e}' should be an object`}),isArray:()=>({value:Array.isArray,message:e=>`'${e}' should be an array`}),isArrayOfNumbers:()=>({value:e=>Array.isArray(e)&&e.every(g()),message:e=>`'${e}' should be an array of numbers`}),isArrayOfStrings:()=>({value:e=>Array.isArray(e)&&e.every(p()),message:e=>`'${e}' should be an array of strings`}),isArrayOfObjects:e=>({value:i=>i.every(i=>{for(let a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const o=i[a],s=e[a];if(!s||!(0,y.QF)(s(o),o,a))return!1}return!0}),message:()=>"invalid array"}),or:function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return()=>({value:e=>i.some(i=>(0,y.O6)(i).value(e)),message:e=>i.map(i=>(0,y.O6)(i).message(e)).join(" or ")})}},h={videojsOptions:{loop:S.isBoolean,controls:S.isBoolean,autoplay:S.isBoolean,autoplayMode:S.isString(o.HJ),bigPlayButton:S.isBoolean,playbackRates:S.isArray,showLogo:S.isBoolean,logoImageUrl:S.isString,logoOnclickUrl:S.isString,videoJS:S.isPlainObject,maxTries:S.isNumber,muted:S.isBoolean,playsinline:S.isBoolean,videoTimeout:S.isNumber,preload:S.isString,sourceTransformation:S.isPlainObject,allowUsageReport:S.isBoolean,interactionAreas:{theme:{template:S.isString(s.IT)},layout:{enable:S.isBoolean,showAgain:S.isBoolean}}},playerOptions:{debug:S.isBoolean,queryParams:S.isPlainObject,publicId:S.isString,fluid:S.isBoolean,withCredentials:S.isBoolean,analytics:S.isBoolean,cloudinaryAnalytics:S.or(S.isBoolean,S.isPlainObject),hideContextMenu:S.isBoolean,playedEventPercents:S.isArrayOfNumbers,showJumpControls:S.isBoolean,chaptersButton:S.isBoolean,pictureInPictureToggle:S.isBoolean,seekThumbnails:S.isBoolean,aiHighlightsGraph:S.isBoolean,floatingWhenNotVisible:S.isString(o.rT),playedEventTimes:S.isArray,playlistWidget:{direction:S.isString,total:S.isNumber},colors:{base:S.isString,accent:S.isString,text:S.isString},ads:{adTagUrl:S.isString,showCountdown:S.isBoolean,adLabel:S.isString,locale:S.isString,prerollTimeout:S.isNumber,postrollTimeout:S.isNumber,adsInPlaylist:S.isString(o.KE)},cloudinary:{autoShowRecommendations:S.isBoolean,sourceTypes:S.isArrayOfStrings,transformation:S.isObject,fontFace:S.isString,posterOptions:{publicId:S.isString,transformation:S.isObject}}}},f={raw_transformation:S.isString,resourceType:S.isString,shoppable:S.isPlainObject,chapters:S.or(S.isBoolean,S.isPlainObject),visualSearch:S.or(S.isBoolean),download:S.isBoolean,title:S.or(S.isString,S.isBoolean),description:S.or(S.isString,S.isBoolean),interactionAreas:{enable:S.isBoolean,template:S.or(S.isString(s.F0),S.isArray),vttUrl:S.isString,onClick:S.isFunction},textTracks:{options:{theme:S.isString,fontFace:S.isString,fontSize:S.isString,gravity:S.isString,box:S.isPlainObject,style:S.isPlainObject,wordHighlightStyle:S.isPlainObject},captions:{label:S.isString,language:S.isString,default:S.isBoolean,url:S.isString,maxWords:S.isNumber,wordHighlight:S.isBoolean,timeOffset:S.isNumber},subtitles:S.isArrayOfObjects({label:S.isString,language:S.isString,default:S.isBoolean,url:S.isString,maxWords:S.isNumber,wordHighlight:S.isBoolean,timeOffset:S.isNumber})},info:{title:S.isString,subtitle:S.isString,description:S.isString},cloudinary:{sourceTypes:S.isArrayOfStrings,transformation:S.isObject},adaptiveStreaming:{strategy:S.isString(t.mM)},videoSources:S.isArray}},8552:(e,i,a)=>{var o=a(7148),s=a(2934);e.exports=function(e){return!0===e||!1===e||s(e)&&"[object Boolean]"==o(e)}},7531:(e,i,a)=>{var o=a(7148),s=a(2934);e.exports=function(e){return"number"==typeof e||s(e)&&"[object Number]"==o(e)}}}]);
|
package/lib/interaction-areas.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[404,691],{9454:(t,e,o)=>{o.d(e,{default:()=>
|
|
1
|
+
(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[404,691],{9454:(t,e,o)=>{o.d(e,{default:()=>a,w:()=>r});var n=o(7764);const i={colorsDark:{base:"#000000",accent:"#0D9AFF",text:"#FFFFFF"},colorsLight:{base:"#FFFFFF",accent:"#0D9AFF",text:"#000000"}},r=t=>(0,n.T4)(t)?i.colorsLight:i.colorsDark,a=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=r(t.options_);e.colors=Object.assign({},o,e.colors);const n=t.el();return e.colors.base&&n.style.setProperty("--color-base",e.colors.base),e.colors.accent&&n.style.setProperty("--color-accent",e.colors.accent),e.colors.text&&n.style.setProperty("--color-text",e.colors.text),{updateColors:t=>{const o=Object.assign({},e.colors,t);o.base&&n.style.setProperty("--color-base",o.base),o.accent&&n.style.setProperty("--color-accent",o.accent),o.text&&n.style.setProperty("--color-text",o.text),e.colors=o},getColors:()=>e.colors}}},9017:(t,e,o)=>{o.d(e,{F0:()=>a,Fg:()=>r,IT:()=>s,T$:()=>l,Vv:()=>d,Yx:()=>c,be:()=>i,q3:()=>u,sb:()=>n});const n="cld-ia-layout-state",i="vp-ia",r="interaction-areas-container",a={PORTRAIT:"portrait",LANDSCAPE:"landscape",All:"all",CENTER:"center"},s={PULSING:"pulsing",SHADOWED:"shadowed"},c={[a.PORTRAIT]:"https://res.cloudinary.com/prod/raw/upload/v1623772481/video-player/vtts/portrait.vtt",[a.LANDSCAPE]:"https://res.cloudinary.com/prod/raw/upload/v1623772303/video-player/vtts/landscape.vtt",[a.All]:"https://res.cloudinary.com/prod/raw/upload/v1623250266/video-player/vtts/all.vtt",[a.CENTER]:"https://res.cloudinary.com/prod/raw/upload/v1623250265/video-player/vtts/center.vtt"},l="https://res.cloudinary.com/prod/image/upload/v1626764643/video-player/interaction-area-hand.svg",d=4500,u=250},1066:(t,e,o)=>{o.d(e,{interactionAreasService:()=>k});var n=o(6673),i=o.n(n),r=o(2832),a=o.n(r),s=o(2858),c=o.n(s),l=o(5114),d=o.n(l),u=o(9017),v=o(7134),p=o(9454);const h=t=>{let{text:e,onClick:o,theme:n="",loadingDelay:i=0}=t;return(0,v.It)({tag:"button",attr:{class:`vp-theme-button theme-${n}`},onClick:o,children:[{tag:"div",attr:{class:"vp-loading-bar"},style:{"animation-duration":`${i}ms`}},{tag:"div",attr:{class:"content"},children:e}]})},f=(t,e)=>t.id||t.type||`id_${e}`,m=(t,e,o,n,i)=>{let{playerOptions:r,videojsOptions:s}=t;const c=(0,p.w)(s),l=r&&r.colors?r.colors.accent:c.accent,d=a()(s,"interactionDisplay.theme.template",u.IT.PULSING);return(0,v.It)({tag:"div",attr:{class:`${u.be}-item theme-${d}`,"data-id":f(e,o)},style:{left:`${e.left}%`,top:`${e.top}%`,width:`${e.width}%`,height:`${e.height}%`,transitionDuration:`${n}ms`},event:{name:"click",callback:i},children:[{tag:"div",attr:{class:`${u.be}-area-marker`},children:[{tag:"div",attr:{class:`${u.be}-marker-shadow`},style:{[d===u.IT.SHADOWED?"backgroundColor":"borderColor"]:l}},{tag:"div",attr:{class:`${u.be}-marker-main`},style:{borderColor:l}}]}]})},g=(t,e)=>t/(100/+e),y=(t,e)=>{const o=T(t);o?o.replaceWith(e):t.el().appendChild(e)},b=(t,e,o)=>t.querySelector(`[data-id=${f(e,o)}]`),x=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d();localStorage.setItem(u.sb,JSON.parse(t)),e()},T=t=>t.el().querySelector(`.${u.Fg}`),$=t=>{const e=T(t);e&&e.parentNode.removeChild(e)};var w=o(7764),E=o(1104);const k=(t,e,o)=>{let n=!1,r=null,s=null,l=d();function p(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=C();return t||e&&e.enable}function k(){s&&t.videojs.removeRemoteTextTrack(s);const e=p(),o=C();if(!e||n)return null;if(Array.isArray(o.template))F(o.template),O();else{const e=o.vttUrl||u.Yx[o.template];e&&(s=(0,w.eo)(t.videojs,e),function(e){if(!e)return;let o=null;e.addEventListener("cuechange",()=>{const n=e.activeCues&&e.activeCues[0];if(n){const t=Math.max(Math.floor(1e3*(n.endTime-n.startTime)),u.q3),e=JSON.parse(n.text);F(e,o,t),!o&&O(),o=e}else $(t.videojs),o=null})}(s))}}function C(){const{cldSrc:t}=r;return t&&t.interactionAreas()}function j(){$(t.videojs),k(),t.play()}function D(){if(p())if(e=o.interactionDisplay,a()(e,"layout.enable",!0)&&"true"!==localStorage.getItem(u.sb)){let e=null;const n=a()(o,"interactionDisplay.layout.showAgain",!1);t.pause(),function(t,e){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1;const i=`checkbox_${Math.round(1e4*Math.random())}`,r=(0,v.It)({tag:"div",attr:{class:`${u.Fg} ${u.be}-layout-message ${o?"":"clickable"}`},onClick:o?null:()=>x(n,e),children:[{tag:"img",attr:{class:`${u.be}-layout-icon`,src:u.T$}},{tag:"h3",attr:{class:`${u.be}-layout-message-title`},children:"Tap on dots to zoom for a product."},h({text:"Got it",theme:"transparent-white",loadingDelay:o?0:u.Vv,onClick:o?()=>x(n,e):null}),o&&{tag:"div",attr:{class:`${u.be}-layout-message-do-not-show`},children:[{tag:"input",attr:{type:"checkbox",class:`${u.be}-layout-message-checkbox`,id:i},event:{name:"input",callback:t=>{n=t.target.checked}}},{tag:"label",attr:{class:`${u.be}-layout-message-checkbox-title`,for:i},children:"Don׳t show it again"}]}].filter(t=>t)});y(t,r)}(t.videojs,()=>{clearTimeout(e),j()},n),n||(e=setTimeout(j,u.Vv))}else j();var e}function A(e){let{event:o,item:a,index:s}=e;const c=C();c.onClick&&c.onClick({item:a,index:s,event:o,zoom:(e,o)=>{!function(e,o,a){const s=t.currentTime(),c=(()=>{const t=C();return!(!t||void 0===t.syncOffsetTime)&&t.syncOffsetTime})(),{cldSrc:d}=r,p=d.getInitOptions(),h=o||{transformation:p.transformation},f=!e&&((t,e)=>{const{videoHeight:o,videoWidth:n}=t,i=g(n,e.left),r=g(o,e.top),a=g(n,e.width),s=g(o,e.height),c=n/o,l=a/s,d=Math.round(l>1||c>1?s*l:a),u=Math.round(d/c),v=Math.round(i-(d-a)/2),p=Math.round(r-(u-s)/2);return{width:d,height:u,x:Math.min(Math.max(v,0),n-d),y:Math.min(Math.max(p,0),o-u),crop:"crop"}})(t.videoElement,a),m=f?i().obj.merge({transformation:f},h):h,b=d.isRawUrl?r.src:{publicId:d.publicId()};t.source(f?{publicId:d.publicId()}:e,m).play(),c&&t.currentTime(s),n=!0,function(){const e=(0,v.n)("div",{class:"go-back-button"});e.addEventListener("click",()=>{l()},!1);const o=(0,v.n)("div",{class:u.Fg},e);y(t.videojs,o)}(),l=()=>{if(n){n=!1;const e=t.currentTime(),o=t.duration();t.source(b,p).play(),c&&e<o&&t.currentTime(e),k()}}}(e,o,a)}})}function F(n,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const a={playerOptions:e,videojsOptions:o};if(i)((t,e,o,n,i,r)=>{const a=T(t);o.forEach((t,o)=>{const s=b(a,t,o),c=f(t),l=n.some(t=>f(t)===c);l&&s?(0,v.cu)(s,{left:`${t.left}%`,top:`${t.top}%`,width:`${t.width}%`,height:`${t.height}%`,transitionDuration:`${i}ms`}):l||s||a.appendChild(m(e,t,o,i,e=>{r({event:e,item:t,index:o})}))}),n.forEach((t,e)=>{const n=b(a,t,e),i=f(t),r=!o.some(t=>f(t)===i);n&&r&&n.parentNode.removeChild(n)})})(t.videojs,a,n,i,r,A);else{const e=n.map((t,e)=>m(a,t,e,r,o=>{A({event:o,item:t,index:e})}));y(t.videojs,(0,v.n)("div",{class:u.Fg},e))}}function O(){p()&&((t,e)=>{const o=T(t);if(!o)return;const{videoHeight:n,videoWidth:i}=e,r=i/n,a=r*e.clientHeight;o.style.width=`${e.clientWidth<a?"100%":a}px`,o.style.height=e.clientWidth<a?e.clientWidth/r+"px":"100%"})(t.videojs,t.videoElement)}!function(){if(r=r||t.videojs.currentSource(),p()){t.videojs.el().classList.add("interaction-areas"),t.videojs.one(E.f.PLAY,()=>{"object"==typeof t.videojs.ima?t.on("adsready",()=>{t.videojs.ima.addEventListener(window.google.ima.AdEvent.Type.ALL_ADS_COMPLETED,D)}):D()});const e=c()(O,100);t.videojs.on(E.f.FULL_SCREEN_CHANGE,()=>{setTimeout(e,100)});const o=(0,v.q2)(window,"resize",O,!1);t.videojs.on(E.f.DISPOSE,o)}t.videojs.on(E.f.ENDED,()=>{l()}),t.videojs.on(E.f.ERROR,()=>{t.pause()})}()}},8812:(t,e,o)=>{var n=o(2140),i=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(i,""):t}},2140:t=>{var e=/\s/;t.exports=function(t){for(var o=t.length;o--&&e.test(t.charAt(o)););return o}},6177:(t,e,o)=>{var n=o(8953),i=o(3664),r=o(5378),a=Math.max,s=Math.min;t.exports=function(t,e,o){var c,l,d,u,v,p,h=0,f=!1,m=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var o=c,n=l;return c=l=void 0,h=e,u=t.apply(n,o)}function b(t){var o=t-p;return void 0===p||o>=e||o<0||m&&t-h>=d}function x(){var t=i();if(b(t))return T(t);v=setTimeout(x,function(t){var o=e-(t-p);return m?s(o,d-(t-h)):o}(t))}function T(t){return v=void 0,g&&c?y(t):(c=l=void 0,u)}function $(){var t=i(),o=b(t);if(c=arguments,l=this,p=t,o){if(void 0===v)return function(t){return h=t,v=setTimeout(x,e),f?y(t):u}(p);if(m)return clearTimeout(v),v=setTimeout(x,e),y(p)}return void 0===v&&(v=setTimeout(x,e)),u}return e=r(e)||0,n(o)&&(f=!!o.leading,d=(m="maxWait"in o)?a(r(o.maxWait)||0,e):d,g="trailing"in o?!!o.trailing:g),$.cancel=function(){void 0!==v&&clearTimeout(v),h=0,c=p=l=v=void 0},$.flush=function(){return void 0===v?u:T(i())},$}},5114:t=>{t.exports=function(){}},3664:(t,e,o)=>{var n=o(1433);t.exports=function(){return n.Date.now()}},2858:(t,e,o)=>{var n=o(6177),i=o(8953);t.exports=function(t,e,o){var r=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return i(o)&&(r="leading"in o?!!o.leading:r,a="trailing"in o?!!o.trailing:a),n(t,e,{leading:r,maxWait:e,trailing:a})}},5378:(t,e,o)=>{var n=o(8812),i=o(8953),r=o(5414),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var o=s.test(t);return o||c.test(t)?l(t.slice(2),o?2:8):a.test(t)?NaN:+t}}}]);
|