@flowplayer/player 3.4.7-rc.0 → 3.4.7-rc.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/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +3 -3
- package/flowplayer.css +1 -1
- package/package.json +5 -2
- package/plugins/acl.js +1 -0
- package/plugins/ads.js +2 -2
- package/plugins/analytics.js +1 -1
- package/plugins/asel.js +1 -1
- package/plugins/chapters.js +1 -1
- package/plugins/dash.js +1 -1
- package/plugins/endscreen.js +1 -1
- package/plugins/google-analytics.js +1 -1
- package/plugins/health.js +1 -1
- package/plugins/keyboard.js +1 -1
- package/plugins/ovp.js +1 -1
- package/plugins/playlist.js +1 -1
- package/plugins/preview.js +1 -1
- package/plugins/qsel.js +1 -1
- package/plugins/qul.js +1 -1
- package/plugins/rts.js +1 -0
- package/plugins/share.js +1 -1
- package/plugins/speed.js +1 -1
- package/plugins/subtitles.js +1 -1
- package/plugins/thumbnails.js +1 -1
- package/plugins/tizen.js +1 -0
- package/plugins/webos.js +1 -0
- package/plugins/millicast.js +0 -1
package/plugins/subtitles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.subtitles=t())}(this,(function(){"use strict";function e(e,t,n){const i=function(e){return Array.isArray(e)?e.slice(0):e.split(".")}(t);for(;i.length;){if(null==e)return n;const t=i.shift();if("string"!=typeof t)return n;e=e[t]}return null==e?n:e}function t(e,t){e.innerHTML="",t.forEach((function(t){const n=document.createElement("pre");n.classList.add("fp-cue"),function(e,t){const n=e.style,i=t.size;n.setProperty("--caption-size",i.toString());const s=t.position;s&&"auto"!==s&&t?n.setProperty("--caption-position",s.toString()):n.removeProperty("--caption-position");const o="captions-align-"+t.align;Array.from(e.classList).forEach((function(n){n!=o&&("captions-vertical"==n&&t.vertical||n.startsWith("captions")&&e.classList.remove(n))})),e.classList.add(o),e.classList.toggle("captions-vertical",!!t.vertical)}(e,t),n.appendChild(t.getCueAsHTML()),e.appendChild(n)}))}var n;function i(e,t){if(function(e){return Object.values(n).includes(e)}(t=t||n.Anonymous))return e instanceof HTMLVideoElement&&(e.poster="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),"crossOrigin"in e?e.crossOrigin=t:e.setAttribute("crossorigin",t),e}function s(e){const t=document.createElement("a");return t.href=e,t.origin}function o(e,t){const n=document.createElement("track");n.className="fp-track renderable",n.kind=t.kind||"captions",n.id=["fp",t.lang].join("-");const o=n.track;return"string"!=typeof t.crossorigin&&function(e,t){try{return e.src.startsWith("blob:"),s(e.src)!==s(t)}catch(e){return console.error(e),!0}}(e,t.src)&&(i(e),t.crossorigin=e.getAttribute("crossorigin")),"crossorigin"in t&&i(e,t.crossorigin),Object.keys(t).forEach(e=>{"default"!==e&&(n[e]=t[e])}),o.mode=t.default?"hidden":"disabled",n.onload=function(){},o.oncuechange=function(t){e.emit(t.type,{track:t.target})},e.appendChild(n),n}!function(e){e.Anonymous="anonymous",e.UseCredentials="use-credentials",e.Empty=""}(n||(n={}));const r=(e,t)=>new(((e,t)=>{const n=e.get(t);if(!n)throw new Error(`no flowplayer component with the name ${t} exists`);const i=window.customElements.get(t);if(!i)throw new Error(`no default flowplayer component with the name ${t} exists`);const s=window.customElements.get(n);return"function"!=typeof s?i:s})(e._customElements,t))(e);class FlowplayerComponent extends HTMLElement{constructor(e){super(),this.player=e}}const l="fp-on",c="fp-invis";class FlowplayerMenu extends FlowplayerComponent{constructor(e){super(e),this.player=e,this.menuContainer=document.createElement("details"),this.summaryEle=document.createElement("summary"),this.olEle=document.createElement("ol"),this.olEle.id=u(),this.menu=document.createElement("div"),this.closeEle=document.createElement("span"),this.menu.classList.add("fp-menu"),this.menu.append(this.closeEle,this.olEle),this.closeEle.classList.add("fp-close"),this.closeEle.textContent="×",this.menuContainer.append(this.summaryEle,this.menu),this.menuContainer.addEventListener("click",t=>{t.preventDefault();const n=this.menuContainer.open;n||(a(),document.active_menu=this.menuContainer),this.menuContainer.open=!n,e.root.classList.toggle("has-menu-opened",!n),this.olEle.setAttribute("aria-expanded",n?"false":"true")}),this.append(this.menuContainer),this.summaryEle.setAttribute("aria-haspopup","true"),this.summaryEle.setAttribute("aria-controls",this.olEle.id),this.summaryEle.setAttribute("tabindex","0"),this.summaryEle.setAttribute("role","button")}get options(){return this.olEle.querySelectorAll("li")}setMenuAttrs(e){if(this.summaryEle.id||(this.summaryEle.id=e.id||u()),this.className=`${e.class} ${c}`,this.menuContainer.classList.add("fp-menu-container"),this.olEle.setAttribute("aria-labelledby",this.summaryEle.id),this.olEle.setAttribute("role","menu"),this.summaryEle.setAttribute("aria-label",e.menuTitle||"Menu"),e.summaryTitle&&(this.summaryEle.textContent=e.summaryTitle),e.summaryIcon){const t=r(this.player,e.summaryIcon);t.setAttribute("tabindex",""),this.summaryEle.append(t)}if(e.menuTitle){const t=document.createElement("h3");t.textContent=e.menuTitle,this.menu.prepend(t)}this.menu.classList.toggle("fp-icons",!!e.icons),this.addEventListener(e.options_event,e=>{this.render(e.data)}),e.item_selected_event&&this.addEventListener(e.item_selected_event,e=>{void 0!==e.data&&this.select_item(e.data.selected_index)})}render(e){this.olEle&&(this.olEle.innerHTML="",e&&e.forEach(this.menuOption,this),this.classList.toggle(c,!(null==e?void 0:e.length)))}menuOption(e,t){const n=document.createElement("li");n.setAttribute("role","menuitem"),n.setAttribute("tabindex","0"),e.icon&&n.append(e.icon);const i=document.createElement("span");i.textContent=e.text,n.append(i),n.addEventListener("click",()=>{this.select_item(t),"function"==typeof e.onclick&&e.onclick()}),this.olEle.appendChild(n)}select_item(e){this.options.forEach((t,n)=>{t.classList.toggle(l,n===e&&("flowplayer-subtitles-menu"!==this.localName||!t.classList.contains(l)))})}unselect_item(){this.options.forEach(e=>{e.classList.remove(l)})}}function a(){Array.from(document.querySelectorAll(".fp-engine")).forEach(e=>{var t;const n=e.root.querySelector("details[open].fp-menu-container");n&&(n.open=!1,null===(t=n.querySelector("summary"))||void 0===t||t.removeAttribute("aria-expanded"),e.root.classList.toggle("has-menu-opened",!1))})}function u(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function d(e,t,n){const i=function(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return t&&Object.defineProperty(n,"data",{get:()=>t}),n}(t,n);return e.dispatchEvent(i),e}function m(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}document.addEventListener("click",(function(e){this.active_menu&&!e.composedPath().includes(this.active_menu)&&(a(),this.active_menu=void 0)})),function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}}();class FlowplayerSubtitlesMenu extends FlowplayerMenu{constructor(e){super(e),e.on(Subtitles.events.TRACK_UPDATED,e=>this.summaryEle.classList.toggle("fp-color-text",!!e.detail))}}class Subtitles{constructor(e){((e,t,n)=>{window.customElements.get(t)||window.customElements.define(t,n),e.customElements.get(t)||e.customElements.set(t,t)})(e,"flowplayer-subtitles-menu",FlowplayerSubtitlesMenu)}init(n,i,s){const l=r(s,"flowplayer-subtitles-menu");l instanceof FlowplayerMenu&&l.setMenuAttrs({class:"fp-cc",summaryTitle:s.i18n("cc.button","CC"),menuTitle:s.i18n("cc.menu_title","Subtitles"),options_event:Subtitles.events.TRACKS,item_selected_event:Subtitles.events.SWITCH});const c=function(e){const t=document.createElement("div");return t.classList.add("fp-captions"),t.ontouchend=t=>e.emit(t.type),t.onclick=t=>e.emit(t.type),t}(s);let a,u=[],f=[];function p(e){if(e==a)return h();h(),e.mode="hidden",a=e,s.emit("cuechange",{track:e}),s.emit("tracks:text:updated",a)}function h(){a&&(s.emit("tracks:text:updated"),a.mode="disabled",a=void 0,t(c,[]))}!function(e){if(!function(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",n=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),i=/Android/.test(t)&&!/Firefox/.test(t),s=/^((?!chrome|android).)*safari/i.test(t),o=/SamsungBrowser/.test(t),r=o&&/SMART-TV/.test(t);return{controls:!n,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:i,iphone:n,safari:s,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:o,samsung_tv:o&&r,touch:!!("ontouchstart"in window)}}().ios)return;e.on("webkitbeginfullscreen",()=>{a&&(a.mode="showing")}),e.on("webkitendfullscreen",()=>{const e=f.find(e=>"showing"===e.mode);if(e&&(e.mode="hidden"),e!==a){if(!e)return h();p(e),d(l,Subtitles.events.SWITCH,{selected_index:f.indexOf(e)})}})}(s),s.on("mount",(function(){var e;const t=m(s,"flowplayer-control");if(!t)return null===(e=m(s,"flowplayer-ui"))||void 0===e?void 0:e.appendChild(c);t.insertAdjacentElement("beforebegin",c),t.append(l),l instanceof FlowplayerMenu&&l.menuContainer.addEventListener("click",()=>{var e;1===f.length&&(null===(e=l.querySelector("li"))||void 0===e||e.click())})})),s.on("config",(function(e){var t,n;const i=null===(n=null===(t=e.data)||void 0===t?void 0:t.subtitles)||void 0===n?void 0:n.tracks;i&&u!==i&&(u=i,0===u.length&&(d(l,Subtitles.events.TRACKS,[]),h(),f=[]),Array.from(s.querySelectorAll(".fp-track")).forEach(e=>{["captions","subtitles","descriptions"].includes(e.kind)&&s.removeChild(e)}),u.forEach(e=>o(s,e)))})),s.textTracks.addEventListener("addtrack",()=>{const t=Array.from(s.textTracks).filter((function(e){return~["captions","subtitles","descriptions"].indexOf(e.kind)}));if(f.length===t.length&&f.every((e,n)=>e===t[n]))return;let i;t.map((function(e){return~["showing","hidden"].indexOf(e.mode)&&(i=e,e.mode="disabled"),e.oncuechange=e.oncuechange||function(e){s.emit(e.type,{track:e.target})},e})),d(l,Subtitles.events.TRACKS,t.map((function(e){return{text:e.label,onclick:p.bind(0,e)}}))),f=t.slice();const o=e(n,"subtitles.show");if(i=(!1!==o?i:void 0)||f.find(e=>e.label===(null==a?void 0:a.label)),!i)return h();p(i),d(l,Subtitles.events.SWITCH,{selected_index:f.indexOf(i)})}),s.on("cuechange",(function(n){var i;const s=null===(i=n.data)||void 0===i?void 0:i.track;if(!s||!["captions","subtitles","descriptions"].includes(s.kind))return;const o=Array.from(e(s,"activeCues",[])).filter((e,t,n)=>t===n.findIndex(t=>e.id===t.id)).sort((e,t)=>"number"!=typeof e.line||"number"!=typeof t.line?0:e.line-t.line);t(c,o)}))}}return Subtitles.events={TRACKS:"subs:tracks",SWITCH:"subs:change",TRACK_UPDATED:"tracks:text:updated"},function(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const n=e.flowplayer;"function"==typeof n?n(t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t))}(window,Subtitles),Subtitles}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.subtitles=t())}(this,(function(){"use strict";function e(e,t,n){const i=function(e){return Array.isArray(e)?e.slice(0):e.split(".")}(t);for(;i.length;){if(null==e)return n;const t=i.shift();if("string"!=typeof t)return n;e=e[t]}return null==e?n:e}function t(e,t){e.innerHTML="",t.forEach((function(t){const n=document.createElement("pre");n.classList.add("fp-cue"),function(e,t){const n=e.style,i=t.size;n.setProperty("--caption-size",i.toString());const s=t.position;s&&"auto"!==s&&t?n.setProperty("--caption-position",s.toString()):n.removeProperty("--caption-position");const o="captions-align-"+t.align;Array.from(e.classList).forEach((function(n){n!=o&&("captions-vertical"==n&&t.vertical||n.startsWith("captions")&&e.classList.remove(n))})),e.classList.add(o),e.classList.toggle("captions-vertical",!!t.vertical)}(e,t),n.appendChild(t.getCueAsHTML()),e.appendChild(n)}))}var n;function i(e,t){if(function(e){return Object.values(n).includes(e)}(t=t||n.Anonymous))return e instanceof HTMLVideoElement&&(e.poster="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),"crossOrigin"in e?e.crossOrigin=t:e.setAttribute("crossorigin",t),e}function s(e){const t=document.createElement("a");return t.href=e,t.origin}function o(e,t){const n=document.createElement("track");n.className="fp-track renderable",n.kind=t.kind||"captions",n.id=["fp",t.lang].join("-");const o=n.track;return"string"!=typeof t.crossorigin&&function(e,t){try{return e.src.startsWith("blob:"),s(e.src)!==s(t)}catch(e){return console.error(e),!0}}(e,t.src)&&(i(e),t.crossorigin=e.getAttribute("crossorigin")),"crossorigin"in t&&i(e,t.crossorigin),Object.keys(t).forEach(e=>{"default"!==e&&(n[e]=t[e])}),o.mode=t.default?"hidden":"disabled",n.onload=function(){},o.oncuechange=function(t){e.emit(t.type,{track:t.target})},e.appendChild(n),n}!function(e){e.Anonymous="anonymous",e.UseCredentials="use-credentials",e.Empty=""}(n||(n={}));const r="is-source-processing",l=(e,t)=>new(((e,t)=>{const n=e.get(t);if(!n)throw new Error(`no flowplayer component with the name ${t} exists`);const i=window.customElements.get(t);if(!i)throw new Error(`no default flowplayer component with the name ${t} exists`);const s=window.customElements.get(n);return"function"!=typeof s?i:s})(e._customElements,t))(e);class FlowplayerComponent extends HTMLElement{constructor(e){super(),this.player=e}}const c="fp-on",a="fp-invis";class FlowplayerMenu extends FlowplayerComponent{constructor(e){super(e),this.player=e,this.menuContainer=document.createElement("details"),this.summaryEle=document.createElement("summary"),this.olEle=document.createElement("ol"),this.olEle.id=d(),this.menu=document.createElement("div"),this.closeEle=document.createElement("span"),this.menu.classList.add("fp-menu"),this.menu.append(this.closeEle,this.olEle),this.closeEle.classList.add("fp-close"),this.closeEle.textContent="×",this.menuContainer.append(this.summaryEle,this.menu),this.menuContainer.addEventListener("click",t=>{t.preventDefault();const n=this.menuContainer.open;n||(u(),document.active_menu=this.menuContainer),this.menuContainer.open=!n,e.root.classList.toggle("has-menu-opened",!n),this.olEle.setAttribute("aria-expanded",n?"false":"true")}),this.append(this.menuContainer),this.summaryEle.setAttribute("aria-haspopup","true"),this.summaryEle.setAttribute("aria-controls",this.olEle.id),this.summaryEle.setAttribute("tabindex","0"),this.summaryEle.setAttribute("role","button")}get options(){return this.olEle.querySelectorAll("li")}setMenuAttrs(e){if(this.summaryEle.id||(this.summaryEle.id=e.id||d()),this.className=e.class,this.menuContainer.classList.add("fp-menu-container"),this.toggle_visibility(!0),this.olEle.setAttribute("aria-labelledby",this.summaryEle.id),this.olEle.setAttribute("role","menu"),this.summaryEle.setAttribute("aria-label",e.menuTitle||"Menu"),e.summaryTitle&&(this.summaryEle.textContent=e.summaryTitle),e.summaryIcon){const t=l(this.player,e.summaryIcon);t.setAttribute("tabindex",""),this.summaryEle.append(t)}if(e.menuTitle){const t=document.createElement("h3");t.textContent=e.menuTitle,this.menu.prepend(t)}this.menu.classList.toggle("fp-icons",!!e.icons),this.addEventListener(e.options_event,e=>{this.render(e.data)}),e.item_selected_event&&this.addEventListener(e.item_selected_event,e=>{void 0!==e.data&&this.select_item(e.data.selected_index)})}render(e){this.olEle&&(this.olEle.innerHTML="",e&&e.forEach(this.menuOption,this),this.toggle_visibility(!(null==e?void 0:e.length)))}menuOption(e,t){const n=document.createElement("li");n.setAttribute("role","menuitem"),n.setAttribute("tabindex","0"),e.icon&&n.append(e.icon);const i=document.createElement("span");i.textContent=e.text,n.append(i),n.addEventListener("click",()=>{this.select_item(t),"function"==typeof e.onclick&&e.onclick()}),this.olEle.appendChild(n)}select_item(e){this.options.forEach((t,n)=>{t.classList.toggle(c,n===e&&("flowplayer-subtitles-menu"!==this.localName||!t.classList.contains(c)))})}unselect_item(){this.options.forEach(e=>{e.classList.remove(c)})}toggle_visibility(e){this.classList.toggle(a,e),this.menu.style.setProperty("display",e?"none":"block")}}function u(){Array.from(document.querySelectorAll(".fp-engine")).forEach(e=>{var t;const n=e.root.querySelector("details[open].fp-menu-container");n&&(n.open=!1,null===(t=n.querySelector("summary"))||void 0===t||t.removeAttribute("aria-expanded"),e.root.classList.toggle("has-menu-opened",!1))})}function d(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function m(e,t,n){const i=function(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return t&&Object.defineProperty(n,"data",{get:()=>t}),n}(t,n);return e.dispatchEvent(i),e}function p(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}document.addEventListener("click",(function(e){this.active_menu&&!e.composedPath().includes(this.active_menu)&&(u(),this.active_menu=void 0)})),function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}}();class FlowplayerSubtitlesMenu extends FlowplayerMenu{constructor(e){super(e),e.on(Subtitles.events.TRACK_UPDATED,e=>this.summaryEle.classList.toggle("fp-color-text",!!e.detail))}}class Subtitles{constructor(e){((e,t,n)=>{window.customElements.get(t)||window.customElements.define(t,n),e.customElements.get(t)||e.customElements.set(t,t)})(e,"flowplayer-subtitles-menu",FlowplayerSubtitlesMenu)}init(n,i,s){const c=l(s,"flowplayer-subtitles-menu");c instanceof FlowplayerMenu&&c.setMenuAttrs({class:"fp-cc",summaryTitle:s.i18n("cc.button","CC"),menuTitle:s.i18n("cc.menu_title","Subtitles"),options_event:Subtitles.events.TRACKS,item_selected_event:Subtitles.events.SWITCH});const a=function(e){const t=document.createElement("div");return t.classList.add("fp-captions"),t.ontouchend=t=>e.emit(t.type),t.onclick=t=>e.emit(t.type),t}(s);let u,d=[],f=[];function h(e){if(e==u)return y();y(),e.mode="hidden",u=e,s.emit("cuechange",{track:e}),s.emit("tracks:text:updated",u)}function y(){u&&(s.emit("tracks:text:updated"),u.mode="disabled",u=void 0,t(a,[]))}!function(e){if(!function(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",n=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),i=/Android/.test(t)&&!/Firefox/.test(t),s=/^((?!chrome|android).)*safari/i.test(t),o=/SamsungBrowser/.test(t),r=o&&/SMART-TV/.test(t);return{controls:!n,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:i,iphone:n,safari:s,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:o,samsung_tv:o&&r,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}().ios)return;e.on("webkitbeginfullscreen",()=>{u&&(u.mode="showing")}),e.on("webkitendfullscreen",()=>{const e=f.find(e=>"showing"===e.mode);if(e&&(e.mode="hidden"),e!==u){if(!e)return y();h(e),m(c,Subtitles.events.SWITCH,{selected_index:f.indexOf(e)})}})}(s),s.on("mount",(function(){var e,t;const n=p(s,"flowplayer-control");if(!n)return null===(e=p(s,"flowplayer-ui"))||void 0===e?void 0:e.appendChild(a);n.insertAdjacentElement("beforebegin",a),null===(t=s.hasState("is-tv")?p(s,"flowplayer-tv-menu"):n)||void 0===t||t.append(c),c instanceof FlowplayerMenu&&c.menuContainer.addEventListener("click",()=>{var e;1===f.length&&(null===(e=c.querySelector("li"))||void 0===e||e.click())})})),s.on("config",(function(e){var t,n;const i=null===(n=null===(t=e.data)||void 0===t?void 0:t.subtitles)||void 0===n?void 0:n.tracks;i&&d!==i&&(d=i,0===d.length&&(m(c,Subtitles.events.TRACKS,[]),y(),f=[]),Array.from(s.querySelectorAll(".fp-track")).forEach(e=>{["captions","subtitles","descriptions"].includes(e.kind)&&s.removeChild(e)}),d.forEach(e=>o(s,e)))})),s.textTracks.addEventListener("addtrack",()=>{const t=Array.from(s.textTracks).filter((function(e){return~["captions","subtitles","descriptions"].indexOf(e.kind)}));if(f.length===t.length&&f.every((e,n)=>e===t[n]))return;let i;t.map((function(e){return~["showing","hidden"].indexOf(e.mode)&&(i=e,e.mode="disabled"),e.oncuechange=e.oncuechange||function(e){s.emit(e.type,{track:e.target})},e})),m(c,Subtitles.events.TRACKS,t.map((function(e){return{text:e.label,onclick:h.bind(0,e)}}))),f=t.slice();const o=e(n,"subtitles.show");if(i=(!1!==o?i:void 0)||f.find(e=>e.label===(null==u?void 0:u.label)),!i)return y();h(i),m(c,Subtitles.events.SWITCH,{selected_index:f.indexOf(i)})}),s.on("cuechange",(function(n){var i;const s=null===(i=n.data)||void 0===i?void 0:i.track;if(!s||!["captions","subtitles","descriptions"].includes(s.kind))return;const o=Array.from(e(s,"activeCues",[])).filter((e,t,n)=>t===n.findIndex(t=>e.id===t.id)).sort((e,t)=>"number"!=typeof e.line||"number"!=typeof t.line?0:e.line-t.line);t(a,o)})),s.on(["playlist/advance","src"],e=>{s.currentSrc&&("src"===e.type&&["is-playlist",r].some(e=>s.root.classList.contains(e))||(delete s.opts.subtitles,d=[],f=[],y(),m(c,Subtitles.events.TRACKS,[])))})}}return Subtitles.events={TRACKS:"subs:tracks",SWITCH:"subs:change",TRACK_UPDATED:"tracks:text:updated"},function(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const n=e.flowplayer;"function"==typeof n?n(t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t))}(window,Subtitles),Subtitles}));
|
package/plugins/thumbnails.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.thumbnails=t())}(this,(function(){"use strict";var e;function t(t,n){if(function(t){return Object.values(e).includes(t)}(n=n||e.Anonymous))return t instanceof HTMLVideoElement&&(t.poster="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),"crossOrigin"in t?t.crossOrigin=n:t.setAttribute("crossorigin",n),t}function n(e){const t=document.createElement("a");return t.href=e,t.origin}!function(e){e.Anonymous="anonymous",e.UseCredentials="use-credentials",e.Empty=""}(e||(e={}));function r(e,t){return e.querySelector("track[id='"+t+"']")}function o(e,r){const o=document.createElement("track");return o.src=r,function(e,t){try{return e.src.startsWith("blob:"),n(e.src)!==n(t)}catch(e){return console.error(e),!0}}(e,r)&&(t(e),t(o)),o}
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.thumbnails=t())}(this,(function(){"use strict";var e;function t(t,n){if(function(t){return Object.values(e).includes(t)}(n=n||e.Anonymous))return t instanceof HTMLVideoElement&&(t.poster="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),"crossOrigin"in t?t.crossOrigin=n:t.setAttribute("crossorigin",n),t}function n(e){const t=document.createElement("a");return t.href=e,t.origin}!function(e){e.Anonymous="anonymous",e.UseCredentials="use-credentials",e.Empty=""}(e||(e={}));function r(e,t){return e.querySelector("track[id='"+t+"']")}function o(e,r){const o=document.createElement("track");return o.src=r,function(e,t){try{return e.src.startsWith("blob:"),n(e.src)!==n(t)}catch(e){return console.error(e),!0}}(e,r)&&(t(e),t(o)),o}var s=Object.freeze({__proto__:null,THUMBNAILS_RENDER:"thumbnails:render",THUMBNAILS_HIDE:"thumbnails:hide"});class Pipe{constructor(e){this.data=e}static of(e){return new Pipe(e)}static maybe(e,t,...n){return null==e?e:t.apply(e,[e,...n])}tap(e,...t){return e.apply(this,[this.data,...t]),new Pipe(this.data)}fmap(e,...t){const n=e.apply(this,[this.data,...t]);return new Pipe(n)}unwrap(){return this.data}}function i(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}const u=(e,t)=>new(((e,t)=>{const n=e.get(t);if(!n)throw new Error(`no flowplayer component with the name ${t} exists`);const r=window.customElements.get(t);if(!r)throw new Error(`no default flowplayer component with the name ${t} exists`);const o=window.customElements.get(n);return"function"!=typeof o?r:o})(e._customElements,t))(e);class FlowplayerComponent extends HTMLElement{constructor(e){super(),this.player=e}}class FlowplayerThumbnails extends FlowplayerComponent{constructor(e){super(e),this.className="fp-thumbnail-carousel",this.carousel=this.makeCarousel(),e.on("thumbnails:render",this.onRender.bind(this,e)),e.on("thumbnails:hide",()=>e.root.classList.remove("with-thumbnails"))}onRender(e,t){var n;if(!e.reaper)return;const r=null===(n=t.detail)||void 0===n?void 0:n.timestamp;if("number"!=typeof r)return;const o=Thumbnails.activeThumbnails(e,r);o&&this.renderCarousel(e,o)}renderCarousel(e,{previous:t,current:n,next:r}){e.root.classList.add("with-thumbnails"),t&&this.renderCarouselItem(this.carousel.previous,t),n&&this.renderCarouselItem(this.carousel.current,n),r&&this.renderCarouselItem(this.carousel.next,r)}makeCarousel(){return{previous:this.makeCarouselItem("previous"),current:this.makeCarouselItem("current"),next:this.makeCarouselItem("next")}}makeCarouselItem(e){const t=document.createElement("div");return t.classList.add("thumbnail",e),this.append(t),t}renderCarouselItem(e,t){const n=e.style;n.backgroundImage=`url("${t.url}")`,n.backgroundPositionX="-"+t.x+"px ",n.backgroundPositionY="-"+t.y+"px",n.height=t.h+"px",n.width=t.w+"px"}}function a(e){const t=document.createElement("a");return t.href=e,t}const l=/#xywh=(\d+),(\d+),(\d+),(\d+)$/,c=/^(https:|https:|\/)/;function m(e,t){const n=a(e.src),r=a(t),[o,s,i,u,c]=(r.hash.match(l)||[]).map(e=>parseInt(e,10));return{x:s,y:i,w:u,h:c,url:d(t,n)}}function d(e,t){if(e.match(c))return e;try{return new URL(e,t.href).toString()}catch(e){return""}}const h="is-source-processing";class Thumbnails{constructor(e){((e,t,n)=>{window.customElements.get(t)||window.customElements.define(t,n),e.customElements.get(t)||e.customElements.set(t,t)})(e,"flowplayer-thumbnails-carousel",FlowplayerThumbnails)}static activeThumbnails(e,t){var n,o;const s=r(e,"thumbnails");if(!s)return;const i=Array.from(s.track.cues||{length:0}),u=i.find(e=>e.startTime<=t&&t<=e.endTime);if(!u)return{};const a=i.indexOf(u);return{previous:m(s,(null===(n=i[a-1])||void 0===n?void 0:n.text)||""),current:m(s,(null==u?void 0:u.text)||""),next:m(s,(null===(o=i[a+1])||void 0===o?void 0:o.text)||"")}}init(e,t,n){const s=i(n,"flowplayer-ui"),a=i(n,"flowplayer-control");n.reaper&&s&&a&&(s.insertBefore(u(n,"flowplayer-thumbnails-carousel"),a),n.once("mount",(function(){var e;i(e=n,"flowplayer-timeline-bar")&&(e.on("timeline/gesture/move",({data:t})=>{const n=null==t?void 0:t.percent;if("number"!=typeof n)return;if(!Number.isFinite(e.duration))return;const r=Pipe.of(e.duration*(n/100)).fmap(Math.min,e.duration).fmap(Math.max,0).unwrap();requestAnimationFrame(()=>{e.emit("thumbnails:render",{timestamp:r})})}),e.on("timeline/gesture/end",()=>{e.emit("thumbnails:hide")}))})),n.textTracks.addEventListener("addtrack",(function(e){const t=e.track;"thumbnails"===(null==t?void 0:t.id)&&(t.mode="hidden")})),n.on("config",(function(){var t;const r=null===(t=null==e?void 0:e.thumbnails)||void 0===t?void 0:t.src;if("string"==typeof r)return function(e,t){if(function(e,t){return e.querySelector("track[src='"+t+"']")}(e,t))return;const n=o(e,t);return n.kind="metadata",n.id="thumbnails",n.src=t,e.append(n),n}(n,r)})),n.on(["playlist/advance","src"],t=>{n.currentSrc&&("src"===t.type&&["is-playlist",h].some(e=>n.root.classList.contains(e))||(delete e.thumbnails,function(e){const t=r(e,"thumbnails");t&&t.remove()}(n)))}))}}return Thumbnails.events=s,function(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const n=e.flowplayer;"function"==typeof n?n(t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t))}(window,Thumbnails),Thumbnails}));
|
package/plugins/tizen.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.tizen=t())}(this,(function(){"use strict";var e={BACK:"Back",BACK1:"XF86Back",EXIT:"Exit",ENTER:"Enter",PLAY:"MediaPlay",PAUSE:"MediaPause",REWIND:"MediaRewind",FORWARD:"MediaFastForward",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown"};const t="is-hovered",n=(e,t)=>new(((e,t)=>{const n=e.get(t);if(!n)throw new Error(`no flowplayer component with the name ${t} exists`);const s=window.customElements.get(t);if(!s)throw new Error(`no default flowplayer component with the name ${t} exists`);const i=window.customElements.get(n);return"function"!=typeof i?s:i})(e._customElements,t))(e);class FlowplayerComponent extends HTMLElement{constructor(e){super(),this.player=e}}class TvMenu extends FlowplayerComponent{constructor(e){super(e),this.classList.add("tv-menu")}append(e){super.append(e.menu)}is_empty(){const e=this.querySelectorAll(".fp-menu");return!(e&&Array.from(e).find(e=>"none"!==e.style.display))}}const s="is-tv-seeking";let i=void 0;function o(e,t){e.enqueueSeek(t)&&function(e){e.setState("is-kb-active",!0),clearTimeout(i),i=setTimeout((function(){e.setState("is-kb-active",!1)}),2500)}(e)}class Tizen extends class TvPlugin{constructor(e){this.umd=e,this.should_restart=!1,this.previous_current_time=0,((e,t,n)=>{window.customElements.get(t)||window.customElements.define(t,n),e.customElements.get(t)||e.customElements.set(t,t)})(e,"flowplayer-tv-menu",TvMenu)}init(e,t,s){s.setState("is-tv",!0),this.menu=n(s,"flowplayer-tv-menu"),t.append(this.menu)}keydown_listener(e,t,n,s,i){var o,r;const a=this.is_linearAd_on(n);return a||e!==t.ARROW_UP||s.classList.contains("is-open")||s.is_empty()?!a&&s.classList.contains("is-open")?this.menu_handler(e,t,s):void this.main_handler(e,t,n,a,i):(s.classList.add("is-open"),null===(r=null===(o=Array.from(s.querySelectorAll(".fp-menu")).find(e=>"block"===e.style.display))||void 0===o?void 0:o.querySelector("li"))||void 0===r?void 0:r.focus())}menu_handler(e,t,n){var s,i,o;if([t.BACK,t.BACK1,t.EXIT].includes(e))return n.classList.remove("is-open");if([t.ARROW_UP,t.ARROW_DOWN,t.ARROW_RIGHT,t.ARROW_LEFT,t.ENTER].includes(e)){const n=document.activeElement,r=null===(s=document.activeElement)||void 0===s?void 0:s.closest(".fp-menu");if(!n||!r)return;if(e===t.ENTER)return n.dispatchEvent(new Event("click"));if(e===t.ARROW_DOWN&&n.nextSibling)return n.nextSibling.focus();if(e===t.ARROW_UP&&n.previousSibling)return n.previousSibling.focus();if(e===t.ARROW_RIGHT&&r.nextSibling)return null===(i=r.nextSibling.querySelector("li"))||void 0===i?void 0:i.focus();if(e===t.ARROW_LEFT&&r.previousSibling)return null===(o=r.previousSibling.querySelector("li"))||void 0===o?void 0:o.focus()}}main_handler(e,t,n,s,i){switch(e){case t.ENTER:return this.on_enter(n,s);case t.PLAY:return this.on_play(n,s);case t.PAUSE:return n.togglePlay(!1);case t.FORWARD:case t.ARROW_RIGHT:return this.on_seek(n,i||10,s);case t.REWIND:case t.ARROW_LEFT:return this.on_seek(n,-(i||10),s);case t.BACK:case t.BACK2:case t.BACK1:case t.EXIT:return this.on_exit(n,s);case t.ARROW_DOWN:return this.on_arrow_down(n,s)}}on_play(e,n){return n?e.togglePlay(!0):(this.is_live_status_focused()&&!e.hasState(t)&&this.live_status_toggle_focus(e,!1),e.hasState(s)?void this.on_seek_end(e,!1):e.togglePlay(!0))}on_enter(e,t){var n;return t?e.togglePlay():this.is_live_status_focused()?(null===(n=e.root.querySelector(".fp-live-status"))||void 0===n||n.dispatchEvent(new Event("click")),this.live_status_toggle_focus(e,!1)):e.hasState(s)?this.on_seek_end(e,!1):e.togglePlay()}on_exit(e,n){return n?e.emit("fullscreen:exit"):this.is_live_status_focused()?this.live_status_toggle_focus(e,!1):e.hasState(s)?this.on_seek_end(e,!0):e.hasState(t)?e.setState(t,!1):e.emit("fullscreen:exit")}on_arrow_down(e,n){if(clearTimeout(this.hover_timeout),this.hover_timeout=setTimeout(()=>{e.setState(t,!1),this.live_status_toggle_focus(e,!1)},2e3),!e.hasState(t)&&!e.hasState("is-paused"))return e.setState(t,!0);n||!e.hasState("is-live")||e.hasState("no-timeline")||this.live_status_toggle_focus(e,!0)}on_seek(e,t,n){n||e.hasState("is-live")&&e.hasState("no-timeline")||(e.hasState(s)||(this.should_restart=!e.hasState("is-paused"),this.previous_current_time=e.currentTime),e.paused||e.togglePlay(!1),e.setState(s,!0),o(e,t))}on_seek_end(e,t){e.setState(s,!1),t&&(e.currentTime=this.previous_current_time),t&&!this.should_restart||e.togglePlay(!0)}live_status_toggle_focus(e,t){const n=e.root.querySelector(".fp-live-status");n&&(t?n.focus():n.blur())}is_live_status_focused(){var e;const t=document.activeElement;return null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("fp-live-status")}is_linearAd_on(e){var t,n;return!(!e.hasState("ad-paused")&&!e.hasState("ad-playing")||!(null===(n=null===(t=null==e?void 0:e.ads)||void 0===t?void 0:t.adapter)||void 0===n?void 0:n._adLinear))}}{init(t,n,s){(function(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",n=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),s=/Android/.test(t)&&!/Firefox/.test(t),i=/^((?!chrome|android).)*safari/i.test(t),o=/SamsungBrowser/.test(t),r=o&&/SMART-TV/.test(t);return{controls:!n,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:s,iphone:n,safari:i,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:o,samsung_tv:o&&r,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}})().tizen&&(super.init(t,n,s),document.addEventListener("keydown",n=>{setTimeout(()=>{var i;!n.defaultPrevented&&Object.values(e).includes(n.key)&&this.keydown_listener(n.key,e,s,this.menu,null===(i=t.tizen)||void 0===i?void 0:i.seek_step)},0)}))}}return Tizen.events={EXIT_FULLSCREEN:"fullscreen:exit"},function(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const n=e.flowplayer;"function"==typeof n?n(t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t))}(window,Tizen),Tizen}));
|
package/plugins/webos.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.webos=t())}(this,(function(){"use strict";const e="is-hovered",t=(e,t)=>new(((e,t)=>{const s=e.get(t);if(!s)throw new Error(`no flowplayer component with the name ${t} exists`);const n=window.customElements.get(t);if(!n)throw new Error(`no default flowplayer component with the name ${t} exists`);const i=window.customElements.get(s);return"function"!=typeof i?n:i})(e._customElements,t))(e);class FlowplayerComponent extends HTMLElement{constructor(e){super(),this.player=e}}class TvMenu extends FlowplayerComponent{constructor(e){super(e),this.classList.add("tv-menu")}append(e){super.append(e.menu)}is_empty(){const e=this.querySelectorAll(".fp-menu");return!(e&&Array.from(e).find(e=>"none"!==e.style.display))}}const s="is-tv-seeking";let n=void 0;function i(e,t){e.enqueueSeek(t)&&function(e){e.setState("is-kb-active",!0),clearTimeout(n),n=setTimeout((function(){e.setState("is-kb-active",!1)}),2500)}(e)}var o={EXIT:461,ENTER:13,PLAY:415,PAUSE:19,REWIND:412,FORWARD:417,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40};class Webos extends class TvPlugin{constructor(e){this.umd=e,this.should_restart=!1,this.previous_current_time=0,((e,t,s)=>{window.customElements.get(t)||window.customElements.define(t,s),e.customElements.get(t)||e.customElements.set(t,t)})(e,"flowplayer-tv-menu",TvMenu)}init(e,s,n){n.setState("is-tv",!0),this.menu=t(n,"flowplayer-tv-menu"),s.append(this.menu)}keydown_listener(e,t,s,n,i){var o,r;const a=this.is_linearAd_on(s);return a||e!==t.ARROW_UP||n.classList.contains("is-open")||n.is_empty()?!a&&n.classList.contains("is-open")?this.menu_handler(e,t,n):void this.main_handler(e,t,s,a,i):(n.classList.add("is-open"),null===(r=null===(o=Array.from(n.querySelectorAll(".fp-menu")).find(e=>"block"===e.style.display))||void 0===o?void 0:o.querySelector("li"))||void 0===r?void 0:r.focus())}menu_handler(e,t,s){var n,i,o;if([t.BACK,t.BACK1,t.EXIT].includes(e))return s.classList.remove("is-open");if([t.ARROW_UP,t.ARROW_DOWN,t.ARROW_RIGHT,t.ARROW_LEFT,t.ENTER].includes(e)){const s=document.activeElement,r=null===(n=document.activeElement)||void 0===n?void 0:n.closest(".fp-menu");if(!s||!r)return;if(e===t.ENTER)return s.dispatchEvent(new Event("click"));if(e===t.ARROW_DOWN&&s.nextSibling)return s.nextSibling.focus();if(e===t.ARROW_UP&&s.previousSibling)return s.previousSibling.focus();if(e===t.ARROW_RIGHT&&r.nextSibling)return null===(i=r.nextSibling.querySelector("li"))||void 0===i?void 0:i.focus();if(e===t.ARROW_LEFT&&r.previousSibling)return null===(o=r.previousSibling.querySelector("li"))||void 0===o?void 0:o.focus()}}main_handler(e,t,s,n,i){switch(e){case t.ENTER:return this.on_enter(s,n);case t.PLAY:return this.on_play(s,n);case t.PAUSE:return s.togglePlay(!1);case t.FORWARD:case t.ARROW_RIGHT:return this.on_seek(s,i||10,n);case t.REWIND:case t.ARROW_LEFT:return this.on_seek(s,-(i||10),n);case t.BACK:case t.BACK2:case t.BACK1:case t.EXIT:return this.on_exit(s,n);case t.ARROW_DOWN:return this.on_arrow_down(s,n)}}on_play(t,n){return n?t.togglePlay(!0):(this.is_live_status_focused()&&!t.hasState(e)&&this.live_status_toggle_focus(t,!1),t.hasState(s)?void this.on_seek_end(t,!1):t.togglePlay(!0))}on_enter(e,t){var n;return t?e.togglePlay():this.is_live_status_focused()?(null===(n=e.root.querySelector(".fp-live-status"))||void 0===n||n.dispatchEvent(new Event("click")),this.live_status_toggle_focus(e,!1)):e.hasState(s)?this.on_seek_end(e,!1):e.togglePlay()}on_exit(t,n){return n?t.emit("fullscreen:exit"):this.is_live_status_focused()?this.live_status_toggle_focus(t,!1):t.hasState(s)?this.on_seek_end(t,!0):t.hasState(e)?t.setState(e,!1):t.emit("fullscreen:exit")}on_arrow_down(t,s){if(clearTimeout(this.hover_timeout),this.hover_timeout=setTimeout(()=>{t.setState(e,!1),this.live_status_toggle_focus(t,!1)},2e3),!t.hasState(e)&&!t.hasState("is-paused"))return t.setState(e,!0);s||!t.hasState("is-live")||t.hasState("no-timeline")||this.live_status_toggle_focus(t,!0)}on_seek(e,t,n){n||e.hasState("is-live")&&e.hasState("no-timeline")||(e.hasState(s)||(this.should_restart=!e.hasState("is-paused"),this.previous_current_time=e.currentTime),e.paused||e.togglePlay(!1),e.setState(s,!0),i(e,t))}on_seek_end(e,t){e.setState(s,!1),t&&(e.currentTime=this.previous_current_time),t&&!this.should_restart||e.togglePlay(!0)}live_status_toggle_focus(e,t){const s=e.root.querySelector(".fp-live-status");s&&(t?s.focus():s.blur())}is_live_status_focused(){var e;const t=document.activeElement;return null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("fp-live-status")}is_linearAd_on(e){var t,s;return!(!e.hasState("ad-paused")&&!e.hasState("ad-playing")||!(null===(s=null===(t=null==e?void 0:e.ads)||void 0===t?void 0:t.adapter)||void 0===s?void 0:s._adLinear))}}{init(e,t,s){(function(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",s=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),n=/Android/.test(t)&&!/Firefox/.test(t),i=/^((?!chrome|android).)*safari/i.test(t),o=/SamsungBrowser/.test(t),r=o&&/SMART-TV/.test(t);return{controls:!s,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:n,iphone:s,safari:i,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:o,samsung_tv:o&&r,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}})().webOS&&(super.init(e,t,s),document.addEventListener("keydown",t=>{setTimeout(()=>{var n;!t.defaultPrevented&&Object.values(o).includes(t.keyCode)&&this.keydown_listener(t.keyCode,o,s,this.menu,null===(n=e.webos)||void 0===n?void 0:n.seek_step)},0)}))}}return Webos.events={EXIT_FULLSCREEN:"fullscreen:exit"},function(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const s=e.flowplayer;"function"==typeof s?s(t):(Array.isArray(s.extensions)||(s.extensions=[]),~s.extensions.indexOf(t)||s.extensions.push(t))}(window,Webos),Webos}));
|