@flowplayer/player 3.29.0 → 3.30.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.
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/index.d.ts +4 -4
- package/package.json +2 -2
- package/plugins/ads.d.ts +4 -4
- package/plugins/ads.js +2 -2
- package/plugins/airplay.d.ts +4 -4
- package/plugins/airplay.js +1 -1
- package/plugins/analytics.d.ts +4 -4
- package/plugins/analytics.js +1 -1
- package/plugins/asel.d.ts +4 -4
- package/plugins/asel.js +1 -1
- package/plugins/audio.d.ts +4 -4
- package/plugins/audio.js +1 -1
- package/plugins/chapters.d.ts +4 -4
- package/plugins/chapters.js +1 -1
- package/plugins/chromecast.d.ts +4 -4
- package/plugins/chromecast.js +1 -1
- package/plugins/comscore.d.ts +4 -4
- package/plugins/comscore.js +1 -1
- package/plugins/consent.d.ts +4 -4
- package/plugins/consent.js +1 -1
- package/plugins/context-menu.d.ts +4 -4
- package/plugins/context-menu.js +1 -1
- package/plugins/cuepoints.d.ts +4 -4
- package/plugins/cuepoints.js +1 -1
- package/plugins/dash.d.ts +4 -4
- package/plugins/dash.js +2 -5
- package/plugins/drm.d.ts +4 -4
- package/plugins/drm.js +1 -1
- package/plugins/endscreen.d.ts +4 -4
- package/plugins/endscreen.js +1 -1
- package/plugins/fas.d.ts +4 -4
- package/plugins/fas.js +1 -1
- package/plugins/float-on-scroll.d.ts +4 -4
- package/plugins/float-on-scroll.js +1 -1
- package/plugins/ga4.d.ts +4 -4
- package/plugins/ga4.js +1 -1
- package/plugins/gemius.d.ts +4 -4
- package/plugins/gemius.js +1 -1
- package/plugins/google-analytics.d.ts +4 -4
- package/plugins/google-analytics.js +1 -1
- package/plugins/hls.d.ts +4 -4
- package/plugins/hls.js +1 -1
- package/plugins/id3.d.ts +4 -4
- package/plugins/id3.js +1 -1
- package/plugins/iframe.d.ts +4 -4
- package/plugins/iframe.js +1 -1
- package/plugins/keyboard.d.ts +4 -4
- package/plugins/keyboard.js +1 -1
- package/plugins/media-session.d.ts +4 -4
- package/plugins/media-session.js +1 -1
- package/plugins/message.d.ts +4 -4
- package/plugins/message.js +1 -1
- package/plugins/ovp.d.ts +10 -4
- package/plugins/ovp.js +1 -1
- package/plugins/playlist.d.ts +4 -4
- package/plugins/playlist.js +1 -1
- package/plugins/preview.d.ts +4 -4
- package/plugins/preview.js +1 -1
- package/plugins/qsel.d.ts +4 -4
- package/plugins/qsel.js +1 -1
- package/plugins/qul.d.ts +4 -4
- package/plugins/qul.js +1 -1
- package/plugins/rts.d.ts +4 -4
- package/plugins/rts.js +7 -7
- package/plugins/share.d.ts +4 -4
- package/plugins/share.js +1 -1
- package/plugins/speed.d.ts +4 -4
- package/plugins/speed.js +1 -1
- package/plugins/ssai.d.ts +4 -4
- package/plugins/ssai.js +2 -2
- package/plugins/subtitles.d.ts +4 -4
- package/plugins/subtitles.js +1 -1
- package/plugins/thumbnails.d.ts +4 -4
- package/plugins/thumbnails.js +1 -1
- package/plugins/tizen.d.ts +4 -4
- package/plugins/tizen.js +1 -1
- package/plugins/vtsel.d.ts +4 -4
- package/plugins/vtsel.js +1 -1
- package/plugins/webos.d.ts +4 -4
- package/plugins/webos.js +1 -1
- package/util/loader.d.ts +4 -4
package/plugins/qsel.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BitrateInfo } from 'dashjs';
|
|
2
1
|
import type { Get } from 'type-fest';
|
|
3
2
|
import type { Level } from 'hls.js';
|
|
3
|
+
import type { Representation } from 'dashjs';
|
|
4
4
|
import type { TupleToUnion } from 'type-fest';
|
|
5
5
|
|
|
6
6
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -1508,7 +1508,7 @@ export declare type QselEvents = typeof events_2;
|
|
|
1508
1508
|
*/
|
|
1509
1509
|
declare type QselOption = (Level & {
|
|
1510
1510
|
level: number;
|
|
1511
|
-
}) |
|
|
1511
|
+
}) | Representation | {
|
|
1512
1512
|
name: string | number;
|
|
1513
1513
|
encodingId: string;
|
|
1514
1514
|
spatialLayerId: number;
|
|
@@ -1570,8 +1570,8 @@ QUALITY_CHANGE = "qualitychange";
|
|
|
1570
1570
|
* @public
|
|
1571
1571
|
*/
|
|
1572
1572
|
declare type QualityChangeEventDetail = {
|
|
1573
|
-
before?: Level |
|
|
1574
|
-
after?: Level |
|
|
1573
|
+
before?: Level | Representation;
|
|
1574
|
+
after?: Level | Representation;
|
|
1575
1575
|
plugin: string;
|
|
1576
1576
|
automatic: boolean;
|
|
1577
1577
|
/* Excluded from this release type: downscale */
|
package/plugins/qsel.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.qsel=t())}(this,
|
|
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.qsel=t())}(this,function(){"use strict";function e(e,t,n){const s=function(e){return Array.isArray(e)?e.slice(0):e.split(".")}(t);for(;s.length;){if(null==e)return n;const t=s.shift();if("string"!=typeof t)return n;e=e[t]}return null==e?n:e}const t="click",n="qualities",s=(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}}const i="has-menu-opened",o="fp-menu-container",l="fp-on",r="fp-invis",a="details[open]."+o;class FlowplayerMenu extends FlowplayerComponent{constructor(e){super(e),this.player=e,this.menuContainer=document.createElement("details"),this.summaryEle=document.createElement("summary"),this.menuHeader=document.createElement("div"),this.menuTitle=document.createElement("h3"),this.olEle=document.createElement("ol"),this.olEle.id=c(),this.menu=document.createElement("div"),this.closeEle=document.createElement("span"),this.menuHeader.classList.add("fp-menu-header"),this.menuHeader.append(this.menuTitle,this.closeEle),this.menu.classList.add("fp-menu"),this.menu.append(this.menuHeader,this.olEle),this.closeEle.classList.add("fp-close"),this.closeEle.textContent="×",this.menuContainer.classList.add(o),this.menuContainer.append(this.summaryEle,this.menu),this.menuContainer.addEventListener(t,t=>{if(t.defaultPrevented)return;t.preventDefault();const n=this.menuContainer.open;n||(u(),document.active_menu=this.menuContainer),this.menuContainer.open=!n,e.root.classList.toggle(i,!n),this.summaryEle.setAttribute("aria-expanded",n?"false":"true")}),this.addEventListener("focusin",e=>{const t=e.target;t instanceof HTMLLIElement&&t.setAttribute("aria-selected","true")}),this.addEventListener("focusout",e=>{const t=e.target;t instanceof HTMLLIElement&&t.setAttribute("aria-selected","false")}),this.append(this.menuContainer),this.olEle.setAttribute("aria-labelledby",this.summaryEle.id),this.olEle.setAttribute("role","menu"),this.summaryEle.setAttribute("aria-haspopup","true"),this.summaryEle.setAttribute("aria-controls",this.olEle.id),this.summaryEle.setAttribute("tabindex","0"),this.summaryEle.setAttribute("aria-expanded","false"),this.summaryEle.setAttribute("role","button")}get options(){return this.olEle.querySelectorAll("li")}setMenuAttrs(e){if(this.className=e.class,this.toggle_visibility(!0),this.summaryEle.id||(this.summaryEle.id=e.id||c()),this.summaryEle.setAttribute("aria-label",e.menuTitle||"Menu"),e.summaryTitle&&(this.summaryEle.textContent=e.summaryTitle),e.summaryIcon){const t=s(this.player,e.summaryIcon);t.setAttribute("tabindex",""),this.summaryEle.append(t)}e.menuTitle&&(this.menuTitle.textContent=e.menuTitle),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,n){const s=document.createElement("li");s.setAttribute("role","menuitem"),s.setAttribute("aria-selected","false"),s.setAttribute("tabindex","0"),e.icon&&s.append(e.icon);const i=document.createElement("span");i.textContent=e.text,s.append(i),s.addEventListener(t,()=>{this.select_item(n),"function"==typeof e.onclick&&e.onclick()}),this.olEle.appendChild(s),e.selected&&this.select_item(n)}select_item(e){this.options.forEach((t,n)=>{t.classList.toggle(l,n===e)})}unselect_item(){this.options.forEach(e=>{e.classList.remove(l)})}toggle_visibility(e){this.classList.toggle(r,e),this.menu.style.setProperty("display",e?"none":"flex")}}function u(){Array.from(document.querySelectorAll(".fp-engine")).forEach(e=>{var t;const n=e.root.querySelector(a);n&&(n.open=!1,null===(t=n.querySelector("summary"))||void 0===t||t.removeAttribute("aria-expanded"),e.root.classList.toggle(i,!1))})}function c(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function m(e,t,n){const s=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(s),e}document.addEventListener(t,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){}}();const d="flowplayer-quality-menu",h="quality:set";var p,f=Object.freeze({__proto__:null,SET_QUALITY:h,TRACKS:"quality:tracks",SWITCH:"quality:update",QUALITIES:n});const y=((p=class Qsel{constructor(e){((e,t,n)=>{window.customElements.get(t)||window.customElements.define(t,n),e.customElements.get(t)||e.customElements.set(t,t)})(e,d,class extends FlowplayerMenu{})}init(t,i,o){if(!1===t.qsel)return;const l=s(o,d);l instanceof FlowplayerMenu&&l.setMenuAttrs({summaryTitle:"HD",menuTitle:o.i18n("qsel.menu_title"),class:"fp-qsel",options_event:p.events.TRACKS,item_selected_event:p.events.SWITCH}),o.on("mount",function(){var e;null===(e=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(o,o.hasState("is-tv")?"flowplayer-tv-menu":"flowplayer-control"))||void 0===e||e.append(l)}),o.on(n,n=>{if(!Array.isArray(n.detail))return;const s=n.detail,i=e(t,"qsel.labels",[]);m(l,p.events.TRACKS,s.flatMap((e,t)=>"boolean"!=typeof i[t]||i[t]?{text:v(e,i[t]),onclick:E.bind(0,o,e)}:[])),l instanceof FlowplayerMenu&&l.toggle_visibility(s.length<2)})}}).pluginName="qsel",p.events=f,p);function E(e,t){e.emit(h,t)}function v(e,t){return t||(e.height?`${e.height}p${e.height>719?" HD":""}`:e.width?`${e.width}p${e.height>1279?" HD":""}`:"name"in e&&e.name?e.name:"0p")}return 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;return"function"==typeof n?(n(t),t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t),t)}(window,y)});
|
package/plugins/qul.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BitrateInfo } from 'dashjs';
|
|
2
1
|
import type { Get } from 'type-fest';
|
|
3
2
|
import type { Level } from 'hls.js';
|
|
3
|
+
import type { Representation } from 'dashjs';
|
|
4
4
|
import type { TupleToUnion } from 'type-fest';
|
|
5
5
|
|
|
6
6
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -1466,7 +1466,7 @@ PROGRESS = "progress";
|
|
|
1466
1466
|
*/
|
|
1467
1467
|
declare type QselOption = (Level & {
|
|
1468
1468
|
level: number;
|
|
1469
|
-
}) |
|
|
1469
|
+
}) | Representation | {
|
|
1470
1470
|
name: string | number;
|
|
1471
1471
|
encodingId: string;
|
|
1472
1472
|
spatialLayerId: number;
|
|
@@ -1514,8 +1514,8 @@ QUALITY_CHANGE = "qualitychange";
|
|
|
1514
1514
|
* @public
|
|
1515
1515
|
*/
|
|
1516
1516
|
declare type QualityChangeEventDetail = {
|
|
1517
|
-
before?: Level |
|
|
1518
|
-
after?: Level |
|
|
1517
|
+
before?: Level | Representation;
|
|
1518
|
+
after?: Level | Representation;
|
|
1519
1519
|
plugin: string;
|
|
1520
1520
|
automatic: boolean;
|
|
1521
1521
|
/* Excluded from this release type: downscale */
|
package/plugins/qul.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.qul=t())}(this,
|
|
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.qul=t())}(this,function(){"use strict";const e="error";const t="application/vnd.apple.mpegURL";document.createElement("video").canPlayType(t);function n(e){var n;return void 0===window.MediaSource&&void 0===window.WebKitMediaSource||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),o=/Android/.test(t)&&!/Firefox/.test(t),i=/^((?!chrome|android).)*safari/i.test(t),r=/chrome|crios/i.test(t)&&!/opr|opera|chromium|edg|ucbrowser|googlebot/i.test(t),s=/firefox|fxios/i.test(t)&&!/seamonkey/i.test(t),d=/edg/i.test(t),a=/opr|opera/i.test(t),u=/SamsungBrowser/.test(t),l=u&&/SMART-TV/.test(t);return{controls:!n,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:o,iphone:n,safari:i,edge:d,opera:a,chrome:r,firefox:s,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:u,samsung_tv:u&&l,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}().video(t)&&(null===(n=null==e?void 0:e.hls)||void 0===n?void 0:n.native)}function o(e,t){t.id&&clearInterval(t.id)}function i(e,t){r(e.original_src,(e,n,i)=>{200!=n&&o(0,t)})}function r(e,t){const n=new XMLHttpRequest;n.onload=function(){if(200==n.status)return t(void 0,n.status);try{const e=JSON.parse(n.responseText);t(void 0,"qul:"+n.status,e)}catch(e){t(e)}},n.open("GET",function(e){const t=document.createElement("a");t.href=e;const n="bust="+Date.now();return[t.protocol,"//",t.hostname,t.pathname,t.search,t.search.length?"&":"?",n].join("")}(e)),n.send()}function s(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return t&&Object.defineProperty(n,"data",{get:()=>t}),n}!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){}}();const d="qul:error";function a(e,t,n){const o=document.createElement("a");o.href=e;let i=encodeURIComponent(t);return n&&(i+="/dId:"+encodeURIComponent(n)),[o.protocol,"//",o.hostname,o.pathname.replace(l(o.pathname,0),i+"/"+l(o.pathname,0))].join("")}class QULPlugin{init(t,s,d){var l,c,f;const v=(null===(l=t.qul)||void 0===l?void 0:l.device_id)||(null===(c=t.qul)||void 0===c?void 0:c.dId)||d.deviceId();let p,m=null===(f=t.qul)||void 0===f?void 0:f.token;const g={};d.on("src",function(e){var r;e.data&&(p=null===(r=e.data)||void 0===r?void 0:r.src,o(0,g),"string"==typeof p&&p.match(/\.m3u8$/)&&m&&(e.data.src=a(p,m,v),n(t)&&Object.assign(g,function(e,t){var n;const r=(null===(n=null==t?void 0:t.qul)||void 0===n?void 0:n.interval)||2e4,s={interval:Math.min(2e4,r)};return e.once("reap",function(){o(0,s)}),s.id=setInterval(i,s.interval,e,s),setTimeout(i,0,e,s),s}(d,d.opts))))}),d.on("config",function(e){var t,n,o,i,r,s;const u=null===(n=null===(t=e.data)||void 0===t?void 0:t.qul)||void 0===n?void 0:n.token,l=(null===(i=null===(o=e.data)||void 0===o?void 0:o.qul)||void 0===i?void 0:i.device_id)||(null===(s=null===(r=e.data)||void 0===r?void 0:r.qul)||void 0===s?void 0:s.dId);u&&u!==m&&function(e,t){m=e,d.setSrc({type:"application/x-mpegurl",src:a(p,m,t)})}(u,l)}),d.on(e,function(e){var t,n;const i=((null===(t=e.data)||void 0===t?void 0:t.code)||"").toString();if(!i.match(/^(qul|http)/))return;o(0,g),e.preventDefault();const s=null===(n=e.data)||void 0===n?void 0:n.resp;if(s)return u(d,s,i);r(d.original_src,(e,t,n)=>{!isNaN(Number(t))&&Number(t)<400||u(d,n,null==t?void 0:t.toString())})})}}QULPlugin.pluginName="qul",QULPlugin.events={QUL_ERROR:d};function u(t,n,o){const i=(null==n?void 0:n.message)||"an error occurred during this session",r=(null==n?void 0:n.key)?t.i18n(n.key,i):i;t.pause();const a=s(d,{code:o,resp:n});if(t.dispatchEvent(a),a.defaultPrevented)return;const u=window.customElements.get("flowplayer-error"),l=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(t,"flowplayer-ui");if(l&&u){if(t.setState("is-error",!0),!t.root.querySelector("#qul_error")){const e=new u(t);e.id="qul_error",l.append(e)}!function(e,t,n){const o=s(t,n);e.dispatchEvent(o)}(t.root.querySelector("#qul_error"),e,{formatted_data:{message:r}})}}function l(e,t){return e.split("/").reverse().slice(0,t+1).reverse().join("/")}return 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;return"function"==typeof n?(n(t),t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t),t)}(window,QULPlugin)});
|
package/plugins/rts.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BitrateInfo } from 'dashjs';
|
|
2
1
|
import type { Get } from 'type-fest';
|
|
3
2
|
import type { Level } from 'hls.js';
|
|
4
3
|
import type { MediaStreamSource } from '@millicast/sdk';
|
|
4
|
+
import type { Representation } from 'dashjs';
|
|
5
5
|
import type { TupleToUnion } from 'type-fest';
|
|
6
6
|
|
|
7
7
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -1672,7 +1672,7 @@ PROGRESS = "progress";
|
|
|
1672
1672
|
*/
|
|
1673
1673
|
declare type QselOption = (Level & {
|
|
1674
1674
|
level: number;
|
|
1675
|
-
}) |
|
|
1675
|
+
}) | Representation | {
|
|
1676
1676
|
name: string | number;
|
|
1677
1677
|
encodingId: string;
|
|
1678
1678
|
spatialLayerId: number;
|
|
@@ -1720,8 +1720,8 @@ QUALITY_CHANGE = "qualitychange";
|
|
|
1720
1720
|
* @public
|
|
1721
1721
|
*/
|
|
1722
1722
|
declare type QualityChangeEventDetail = {
|
|
1723
|
-
before?: Level |
|
|
1724
|
-
after?: Level |
|
|
1723
|
+
before?: Level | Representation;
|
|
1724
|
+
after?: Level | Representation;
|
|
1725
1725
|
plugin: string;
|
|
1726
1726
|
automatic: boolean;
|
|
1727
1727
|
/* Excluded from this release type: downscale */
|