@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.
Files changed (84) hide show
  1. package/core.js +1 -1
  2. package/default.js +1 -1
  3. package/embed.js +2 -2
  4. package/index.d.ts +4 -4
  5. package/package.json +2 -2
  6. package/plugins/ads.d.ts +4 -4
  7. package/plugins/ads.js +2 -2
  8. package/plugins/airplay.d.ts +4 -4
  9. package/plugins/airplay.js +1 -1
  10. package/plugins/analytics.d.ts +4 -4
  11. package/plugins/analytics.js +1 -1
  12. package/plugins/asel.d.ts +4 -4
  13. package/plugins/asel.js +1 -1
  14. package/plugins/audio.d.ts +4 -4
  15. package/plugins/audio.js +1 -1
  16. package/plugins/chapters.d.ts +4 -4
  17. package/plugins/chapters.js +1 -1
  18. package/plugins/chromecast.d.ts +4 -4
  19. package/plugins/chromecast.js +1 -1
  20. package/plugins/comscore.d.ts +4 -4
  21. package/plugins/comscore.js +1 -1
  22. package/plugins/consent.d.ts +4 -4
  23. package/plugins/consent.js +1 -1
  24. package/plugins/context-menu.d.ts +4 -4
  25. package/plugins/context-menu.js +1 -1
  26. package/plugins/cuepoints.d.ts +4 -4
  27. package/plugins/cuepoints.js +1 -1
  28. package/plugins/dash.d.ts +4 -4
  29. package/plugins/dash.js +2 -5
  30. package/plugins/drm.d.ts +4 -4
  31. package/plugins/drm.js +1 -1
  32. package/plugins/endscreen.d.ts +4 -4
  33. package/plugins/endscreen.js +1 -1
  34. package/plugins/fas.d.ts +4 -4
  35. package/plugins/fas.js +1 -1
  36. package/plugins/float-on-scroll.d.ts +4 -4
  37. package/plugins/float-on-scroll.js +1 -1
  38. package/plugins/ga4.d.ts +4 -4
  39. package/plugins/ga4.js +1 -1
  40. package/plugins/gemius.d.ts +4 -4
  41. package/plugins/gemius.js +1 -1
  42. package/plugins/google-analytics.d.ts +4 -4
  43. package/plugins/google-analytics.js +1 -1
  44. package/plugins/hls.d.ts +4 -4
  45. package/plugins/hls.js +1 -1
  46. package/plugins/id3.d.ts +4 -4
  47. package/plugins/id3.js +1 -1
  48. package/plugins/iframe.d.ts +4 -4
  49. package/plugins/iframe.js +1 -1
  50. package/plugins/keyboard.d.ts +4 -4
  51. package/plugins/keyboard.js +1 -1
  52. package/plugins/media-session.d.ts +4 -4
  53. package/plugins/media-session.js +1 -1
  54. package/plugins/message.d.ts +4 -4
  55. package/plugins/message.js +1 -1
  56. package/plugins/ovp.d.ts +10 -4
  57. package/plugins/ovp.js +1 -1
  58. package/plugins/playlist.d.ts +4 -4
  59. package/plugins/playlist.js +1 -1
  60. package/plugins/preview.d.ts +4 -4
  61. package/plugins/preview.js +1 -1
  62. package/plugins/qsel.d.ts +4 -4
  63. package/plugins/qsel.js +1 -1
  64. package/plugins/qul.d.ts +4 -4
  65. package/plugins/qul.js +1 -1
  66. package/plugins/rts.d.ts +4 -4
  67. package/plugins/rts.js +7 -7
  68. package/plugins/share.d.ts +4 -4
  69. package/plugins/share.js +1 -1
  70. package/plugins/speed.d.ts +4 -4
  71. package/plugins/speed.js +1 -1
  72. package/plugins/ssai.d.ts +4 -4
  73. package/plugins/ssai.js +2 -2
  74. package/plugins/subtitles.d.ts +4 -4
  75. package/plugins/subtitles.js +1 -1
  76. package/plugins/thumbnails.d.ts +4 -4
  77. package/plugins/thumbnails.js +1 -1
  78. package/plugins/tizen.d.ts +4 -4
  79. package/plugins/tizen.js +1 -1
  80. package/plugins/vtsel.d.ts +4 -4
  81. package/plugins/vtsel.js +1 -1
  82. package/plugins/webos.d.ts +4 -4
  83. package/plugins/webos.js +1 -1
  84. 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
- }) | BitrateInfo | {
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 | BitrateInfo;
1574
- after?: Level | BitrateInfo;
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,(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=(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 n="fp-on",s="fp-invis";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=o(),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("fp-menu-container"),this.menuContainer.append(this.summaryEle,this.menu),this.menuContainer.addEventListener("click",t=>{if(t.defaultPrevented)return;t.preventDefault();const n=this.menuContainer.open;n||(i(),document.active_menu=this.menuContainer),this.menuContainer.open=!n,e.root.classList.toggle("has-menu-opened",!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||o()),this.summaryEle.setAttribute("aria-label",e.menuTitle||"Menu"),e.summaryTitle&&(this.summaryEle.textContent=e.summaryTitle),e.summaryIcon){const n=t(this.player,e.summaryIcon);n.setAttribute("tabindex",""),this.summaryEle.append(n)}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,t){const n=document.createElement("li");n.setAttribute("role","menuitem"),n.setAttribute("aria-selected","false"),n.setAttribute("tabindex","0"),e.icon&&n.append(e.icon);const s=document.createElement("span");s.textContent=e.text,n.append(s),n.addEventListener("click",()=>{this.select_item(t),"function"==typeof e.onclick&&e.onclick()}),this.olEle.appendChild(n),e.selected&&this.select_item(t)}select_item(e){this.options.forEach((t,s)=>{t.classList.toggle(n,s===e)})}unselect_item(){this.options.forEach(e=>{e.classList.remove(n)})}toggle_visibility(e){this.classList.toggle(s,e),this.menu.style.setProperty("display",e?"none":"flex")}}function i(){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 o(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function l(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("click",(function(e){this.active_menu&&!e.composedPath().includes(this.active_menu)&&(i(),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){}}();var r,a=Object.freeze({__proto__:null,SET_QUALITY:"quality:set",TRACKS:"quality:tracks",SWITCH:"quality:update",QUALITIES:"qualities"});const u=((r=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,"flowplayer-quality-menu",FlowplayerMenu)}init(n,s,i){if(!1===n.qsel)return;const o=t(i,"flowplayer-quality-menu");o instanceof FlowplayerMenu&&o.setMenuAttrs({summaryTitle:"HD",menuTitle:i.i18n("qsel.menu_title"),class:"fp-qsel",options_event:r.events.TRACKS,item_selected_event:r.events.SWITCH}),i.on("mount",(function(){var e;null===(e=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(i,i.hasState("is-tv")?"flowplayer-tv-menu":"flowplayer-control"))||void 0===e||e.append(o)})),i.on("qualities",t=>{if(!Array.isArray(t.detail))return;const s=t.detail,a=e(n,"qsel.labels",[]);l(o,r.events.TRACKS,s.flatMap((e,t)=>"boolean"!=typeof a[t]||a[t]?{text:m(e,a[t]),onclick:c.bind(0,i,e)}:[])),o instanceof FlowplayerMenu&&o.toggle_visibility(s.length<2)})}}).pluginName="qsel",r.events=a,r);function c(e,t){e.emit("quality:set",t)}function m(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,u)}));
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
- }) | BitrateInfo | {
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 | BitrateInfo;
1518
- after?: Level | BitrateInfo;
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,(function(){"use strict";const e="application/vnd.apple.mpegURL";document.createElement("video").canPlayType(e);function t(t){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(e)&&(null===(n=null==t?void 0:t.hls)||void 0===n?void 0:n.native)}function n(e,t){t.id&&clearInterval(t.id)}function o(e,t){i(e.original_src,(e,o,i)=>{200!=o&&n(0,t)})}function i(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 r(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){}}();function s(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(a(o.pathname,0),i+"/"+a(o.pathname,0))].join("")}class QULPlugin{init(e,r,a){var u,l,c;const f=(null===(u=e.qul)||void 0===u?void 0:u.device_id)||(null===(l=e.qul)||void 0===l?void 0:l.dId)||a.deviceId();let v,p=null===(c=e.qul)||void 0===c?void 0:c.token;const m={};a.on("src",(function(i){var r;i.data&&(v=null===(r=i.data)||void 0===r?void 0:r.src,n(0,m),"string"==typeof v&&v.match(/\.m3u8$/)&&p&&(i.data.src=s(v,p,f),t(e)&&Object.assign(m,function(e,t){var i;const r=(null===(i=null==t?void 0:t.qul)||void 0===i?void 0:i.interval)||2e4,s={interval:Math.min(2e4,r)};return e.once("reap",(function(){n(0,s)})),s.id=setInterval(o,s.interval,e,s),setTimeout(o,0,e,s),s}(a,a.opts))))})),a.on("config",(function(e){var t,n,o,i,r,d;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===(d=null===(r=e.data)||void 0===r?void 0:r.qul)||void 0===d?void 0:d.dId);u&&u!==p&&function(e,t){p=e,a.setSrc({type:"application/x-mpegurl",src:s(v,p,t)})}(u,l)})),a.on("error",(function(e){var t,o;const r=((null===(t=e.data)||void 0===t?void 0:t.code)||"").toString();if(!r.match(/^(qul|http)/))return;n(0,m),e.preventDefault();const s=null===(o=e.data)||void 0===o?void 0:o.resp;if(s)return d(a,s,r);i(a.original_src,(e,t,n)=>{!isNaN(Number(t))&&Number(t)<400||d(a,n,null==t?void 0:t.toString())})}))}}QULPlugin.pluginName="qul",QULPlugin.events={QUL_ERROR:"qul:error"};function d(e,t,n){const o=(null==t?void 0:t.message)||"an error occurred during this session",i=(null==t?void 0:t.key)?e.i18n(t.key,o):o;e.pause();const s=r("qul:error",{code:n,resp:t});if(e.dispatchEvent(s),s.defaultPrevented)return;const d=window.customElements.get("flowplayer-error"),a=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(e,"flowplayer-ui");if(a&&d){if(e.setState("is-error",!0),!e.root.querySelector("#qul_error")){const t=new d(e);t.id="qul_error",a.append(t)}!function(e,t,n){const o=r(t,n);e.dispatchEvent(o)}(e.root.querySelector("#qul_error"),"error",{formatted_data:{message:i}})}}function a(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)}));
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
- }) | BitrateInfo | {
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 | BitrateInfo;
1724
- after?: Level | BitrateInfo;
1723
+ before?: Level | Representation;
1724
+ after?: Level | Representation;
1725
1725
  plugin: string;
1726
1726
  automatic: boolean;
1727
1727
  /* Excluded from this release type: downscale */