@flowplayer/player 3.14.1 → 3.15.0-rc.10
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/core/events.d.ts +575 -68
- package/core/events.js +286 -34
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/flowplayer.css +1 -1
- package/index.d.ts +1480 -91
- package/package.json +1 -1
- package/plugins/ads.d.ts +3744 -112
- package/plugins/ads.js +1 -1
- package/plugins/airplay.d.ts +1440 -116
- package/plugins/airplay.js +1 -1
- package/plugins/analytics.d.ts +1409 -82
- package/plugins/analytics.js +1 -1
- package/plugins/asel.d.ts +1409 -82
- package/plugins/asel.js +1 -1
- package/plugins/audio.d.ts +1409 -82
- package/plugins/audio.js +1 -1
- package/plugins/chapters.d.ts +1409 -82
- package/plugins/chapters.js +1 -1
- package/plugins/chromecast.d.ts +1464 -80
- package/plugins/chromecast.js +1 -1
- package/plugins/comscore.d.ts +1409 -82
- package/plugins/consent.d.ts +1409 -82
- package/plugins/consent.js +1 -1
- package/plugins/context-menu.d.ts +1443 -116
- package/plugins/cuepoints.d.ts +1443 -116
- package/plugins/cuepoints.js +1 -1
- package/plugins/dash.d.ts +1445 -115
- package/plugins/dash.js +1 -1
- package/plugins/drm.d.ts +1409 -82
- package/plugins/drm.js +1 -1
- package/plugins/endscreen.d.ts +1442 -115
- package/plugins/endscreen.js +1 -1
- package/plugins/fas.d.ts +1409 -82
- package/plugins/float-on-scroll.d.ts +1443 -116
- package/plugins/float-on-scroll.js +1 -1
- package/plugins/ga4.d.ts +1409 -82
- package/plugins/gemius.d.ts +1439 -112
- package/plugins/google-analytics.d.ts +1409 -82
- package/plugins/health.d.ts +1435 -107
- package/plugins/health.js +1 -1
- package/plugins/hls.d.ts +1431 -104
- package/plugins/hls.js +1 -1
- package/plugins/id3.d.ts +1409 -82
- package/plugins/id3.js +1 -1
- package/plugins/iframe.d.ts +1440 -116
- package/plugins/iframe.js +1 -1
- package/plugins/keyboard.d.ts +1409 -82
- package/plugins/media-session.d.ts +1409 -82
- package/plugins/message.d.ts +1409 -82
- package/plugins/message.js +1 -1
- package/plugins/ovp.d.ts +1435 -110
- package/plugins/ovp.js +1 -1
- package/plugins/playlist.d.ts +1409 -82
- package/plugins/playlist.js +1 -1
- package/plugins/preview.d.ts +1409 -82
- package/plugins/preview.js +1 -1
- package/plugins/qsel.d.ts +1409 -82
- package/plugins/qsel.js +1 -1
- package/plugins/qul.d.ts +1441 -114
- package/plugins/qul.js +1 -1
- package/plugins/rts.d.ts +1409 -82
- package/plugins/rts.js +1 -1
- package/plugins/share.d.ts +1409 -82
- package/plugins/share.js +1 -1
- package/plugins/speed.d.ts +1434 -107
- package/plugins/speed.js +1 -1
- package/plugins/ssai.d.ts +1412 -82
- package/plugins/ssai.js +1 -1
- package/plugins/subtitles.d.ts +1426 -102
- package/plugins/thumbnails.d.ts +1434 -107
- package/plugins/thumbnails.js +1 -1
- package/plugins/tizen.d.ts +1409 -82
- package/plugins/tizen.js +1 -1
- package/plugins/vtsel.d.ts +1409 -82
- package/plugins/vtsel.js +1 -1
- package/plugins/webos.d.ts +1409 -82
- package/plugins/webos.js +1 -1
- package/util/loader.d.ts +1436 -101
- package/util/loader.js +13 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t="undefined"!=typeof globalThis?globalThis:t||self).flowplayer=t.flowplayer||{},t.flowplayer.float_on_scroll=e())}(this,(function(){"use strict";const t="float:pop:in";var e=Object.freeze({__proto__:null,POP_IN:t,POP_OUT:"float:pop:out",EXT_BTN_CLICK:"float:exit"});const n=(t,e)=>new(((t,e)=>{const n=t.get(e);if(!n)throw new Error(`no flowplayer component with the name ${e} exists`);const o=window.customElements.get(e);if(!o)throw new Error(`no default flowplayer component with the name ${e} exists`);const
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t="undefined"!=typeof globalThis?globalThis:t||self).flowplayer=t.flowplayer||{},t.flowplayer.float_on_scroll=e())}(this,(function(){"use strict";const t="float:pop:in";var e=Object.freeze({__proto__:null,POP_IN:t,POP_OUT:"float:pop:out",EXT_BTN_CLICK:"float:exit"});const n=(t,e)=>new(((t,e)=>{const n=t.get(e);if(!n)throw new Error(`no flowplayer component with the name ${e} exists`);const o=window.customElements.get(e);if(!o)throw new Error(`no default flowplayer component with the name ${e} exists`);const i=window.customElements.get(n);return"function"!=typeof i?o:i})(t._customElements,e))(t),o=(t,e,n)=>{window.customElements.get(e)||window.customElements.define(e,n),t.customElements.get(e)||t.customElements.set(e,e)};function i(t){return function(t){const e=t.getBoundingClientRect(),n=window.innerHeight,o=e.y;return o>n||o+e.height<0?0:e.y<0?(e.height+o)/e.height:n-e.y>e.height?1:Math.abs((n-e.y)/e.height)}(t)>.8}function l(t,e){0==e.reaper||e.floating||a(e,t,"float:pop:out")}function s(e,n){0!=n.reaper&&n.floating&&a(n,e,t)}function r(t,e,o){const i=document.createElement("div");return i.classList.add("fp-exit-float"),i.append(Object.assign(n(t,"flowplayer-close-icon"),{role:"button"})),i.addEventListener("click",()=>{if(o.was_user_toggled=!0,!t.opts.float_default)return t.emit("float:exit");t.togglePlay(!1),s(e,t)}),i}function a(e,n,o){o&&e.emit(o),setTimeout((function(){const i=n.querySelector(".fp-float-wrapper"),l=n.clientWidth/n.clientHeight;if(!i)return;i.style.height=o===t?"auto":i.clientWidth/l+"px";const s=i.querySelector(".fp-ad-container > div");s&&(s.style.position=o==t?"absolute":"static"),e.emit("resize",{contentRect:{height:o===t?n.clientHeight:i.clientHeight,width:i.clientWidth}})}))}class FlowplayerComponent extends HTMLElement{constructor(t){super(),this.player=t}}class FlowplayerIcon extends FlowplayerComponent{constructor(t,e){super(t),this.classList.add("fp-icon",e.name),e.title&&this.setAttribute("title",e.title),e.title&&this.setAttribute("aria-label",e.title),e.translation_key&&this.setAttribute("aria-label",t.i18n(e.translation_key)),this.setAttribute("tabindex","0"),this.setAttribute("focusable","true")}}const c={translation_key:"core.mute",name:"fp-mute"},u={translation_key:"core.mute",name:"fp-unmute"},f={translation_key:"core.close",name:"fp-close"};var p;const d=((p=class FloatOnScroll{constructor(t){this.flowplayer=t,o(this.flowplayer,"flowplayer-mute-icon",class extends FlowplayerIcon{constructor(t){super(t,c)}}),o(this.flowplayer,"flowplayer-unmute-icon",class extends FlowplayerIcon{constructor(t){super(t,u)}}),o(this.flowplayer,"flowplayer-close-icon",class extends FlowplayerIcon{constructor(t){super(t,f)}})}init(e,o,c){if(!1===e.float_on_scroll)return;if(function(){try{return window.self!==window.top}catch(t){return!0}}())return console.warn("iframe detected - floating player not supported in iframe");void 0===e.float_default&&(e.float_default=!0);if(this.flowplayer.instances.find(t=>t.root.classList.contains(FloatOnScroll.SINGLETON_CLASS)))return e.float_on_scroll=!1,console.warn("disabling float on scroll for player index=%s as it is a singleton behavior\n\tto disable this warning manually configure float_on_scroll: false",this.flowplayer.instances.indexOf(c));o.classList.add(FloatOnScroll.SINGLETON_CLASS),e.autopause&&c.setOpts({autopause:!1});const u={pop_out_container:void 0,was_user_toggled:!1};c.popIn=s.bind(this,o,c),c.popOut=l.bind(this,o,c);const f=window.scrollY;c.on("mount",(function(){u.pop_out_container=function(t,e){const n=document.createElement("div");return n.classList.add("fp-float-wrapper"),t.appendChild(n),Array.from(t.childNodes).forEach((function(t){t instanceof Element&&(t===n||t.classList.contains("fp-ratio"))||n.appendChild(t)})),e.getFullsceenTarget=()=>n,n}(o,c)})),c.on("renderplugin",(function(t){var e;t.preventDefault(),t.detail&&(null===(e=u.pop_out_container)||void 0===e||e.append(t.detail));const n=t.detail.querySelector("flowplayer-ad-controls");n&&n.append(r(c,o,u))}));const p=function(t,e){const n=t._customElements.get(e);return n&&t.root.querySelector(n)||void 0}(c,"flowplayer-header");p&&function(t,e,o,i){const l=document.createElement("div");l.classList.add("fp-mute-float"),l.append(...Object.assign([n(i,"flowplayer-mute-icon"),n(i,"flowplayer-unmute-icon")],{role:"button"})),l.addEventListener("click",(function(){i.toggleMute()})),t.append(r(i,o,e),l)}(p,u,o,c);const d=function(t,e){const n=t||60,o=Math.ceil(1e3/n);let i=Date.now(),l=-1;return function(...t){return l>-1||Date.now()<i||(l=requestAnimationFrame((function(){l=-1,e(),i=Date.now()+o}))),l}}(0,(function(){if(i(o)){if(c.hasState("is-fullscreen"))return;c.popIn()}})),w=function(){a(c,o)};c.on("viewleave",t=>{e.float_default&&window.scrollY!==f&&!u.was_user_toggled&&function(t){return!(Array.from(document.querySelectorAll(".fp-engine")).find(t=>t.hasState("is-popped-out"))||t.paused&&(!t.ads||!t.ads.adPlaying))}(c)&&(t.preventDefault(),c.popOut())}),c.on("viewenter",(function(){u.was_user_toggled=!1})),c.on("float:pop:out",(function(){c.floating=!0,c.setState("is-popped-out",!0),e.float_default&&(window.addEventListener("scroll",d),window.addEventListener("resize",w))})),c.on(t,(function(){c.floating=!1,c.setState("is-popped-out",!1),e.float_default&&(window.removeEventListener("scroll",d),window.removeEventListener("resize",w))}))}}).events=e,p.SINGLETON_CLASS="float-on-scroll-enabled",p);return function(t,e){if("object"==typeof exports&&"undefined"!=typeof module)return e;if(null===document.currentScript)return e;"flowplayer"in t||(t.flowplayer={extensions:[]});const n=t.flowplayer;return"function"==typeof n?(n(e),e):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(e)||n.extensions.push(e),e)}(window,d)}));
|