@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
@@ -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 */
@@ -1486,7 +1486,7 @@ PROGRESS = "progress";
1486
1486
  */
1487
1487
  declare type QselOption = (Level & {
1488
1488
  level: number;
1489
- }) | BitrateInfo | {
1489
+ }) | Representation | {
1490
1490
  name: string | number;
1491
1491
  encodingId: string;
1492
1492
  spatialLayerId: number;
@@ -1534,8 +1534,8 @@ QUALITY_CHANGE = "qualitychange";
1534
1534
  * @public
1535
1535
  */
1536
1536
  declare type QualityChangeEventDetail = {
1537
- before?: Level | BitrateInfo;
1538
- after?: Level | BitrateInfo;
1537
+ before?: Level | Representation;
1538
+ after?: Level | Representation;
1539
1539
  plugin: string;
1540
1540
  automatic: boolean;
1541
1541
  /* Excluded from this release type: downscale */
@@ -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.context_menu=t())}(this,(function(){"use strict";const e=document.createElement;function t(t,n){const o=n.href?function(t){const n=e("a");return n.href=t,n}(n.href):e("span"),c=n.onclick;return n.class&&(o.className=n.class),n.text&&(o.innerText=n.text),c&&o.addEventListener("click",(function(e){c(e,t)})),o}var n;const o=[{text:"Flowplayer © "+(new Date).getFullYear()},{href:"https://flowplayer.com",text:"About this player"},{href:"https://flowplayer.com/license/",text:"GPL based license"}];let c=!1;const s=e=>{e.classList.remove(".fp-active"),c=!1};document.addEventListener("click",e=>{2!=e.button&&0!=c&&s(c)}),document.addEventListener("keyup",(function(){c&&s(c)}));const i=((n=class ContextMenu{init(e,n,s){const i=e.context_menu||o,l=document.createElement("div");l.className=".fp-context-menu .fp-menu",l.append(...i.map(e=>t(s,e)));const r=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(s,"flowplayer-ui");r&&r.addEventListener("contextmenu",(function(e){if(!l.parentNode)return;e.preventDefault(),s.emit("contextmenu");const t=l.getBoundingClientRect();l.style.left=e.clientX-window.scrollX-t.left+2+"px",l.style.right=e.clientY+window.scrollY-t.top-5+"px",l.classList.contains(".fp-active")||(l.classList.contains(".fp-active"),c=l)}))}}).pluginName="context-menu",n);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,i)}));
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.context_menu=t())}(this,function(){"use strict";const e="contextmenu",t=document.createElement;function n(e,n){const o=n.href?function(e){const n=t("a");return n.href=e,n}(n.href):t("span"),s=n.onclick;return n.class&&(o.className=n.class),n.text&&(o.innerText=n.text),s&&o.addEventListener("click",function(t){s(t,e)}),o}var o;const s=".fp-active",c=[{text:"Flowplayer © "+(new Date).getFullYear()},{href:"https://flowplayer.com",text:"About this player"},{href:"https://flowplayer.com/license/",text:"GPL based license"}];let i=!1;const l=e=>{e.classList.remove(s),i=!1};document.addEventListener("click",e=>{2!=e.button&&0!=i&&l(i)}),document.addEventListener("keyup",function(){i&&l(i)});const r=((o=class ContextMenu{init(t,o,l){const r=t.context_menu||c,u=document.createElement("div");u.className=".fp-context-menu .fp-menu",u.append(...r.map(e=>n(l,e)));const f=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(l,"flowplayer-ui");f&&f.addEventListener(e,function(t){if(!u.parentNode)return;t.preventDefault(),l.emit(e);const n=u.getBoundingClientRect();u.style.left=t.clientX-window.scrollX-n.left+2+"px",u.style.right=t.clientY+window.scrollY-n.top-5+"px",u.classList.contains(s)||(u.classList.contains(s),i=u)})}}).pluginName="context-menu",o);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,r)});
@@ -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 */
@@ -1596,7 +1596,7 @@ PROGRESS = "progress";
1596
1596
  */
1597
1597
  declare type QselOption = (Level & {
1598
1598
  level: number;
1599
- }) | BitrateInfo | {
1599
+ }) | Representation | {
1600
1600
  name: string | number;
1601
1601
  encodingId: string;
1602
1602
  spatialLayerId: number;
@@ -1644,8 +1644,8 @@ QUALITY_CHANGE = "qualitychange";
1644
1644
  * @public
1645
1645
  */
1646
1646
  declare type QualityChangeEventDetail = {
1647
- before?: Level | BitrateInfo;
1648
- after?: Level | BitrateInfo;
1647
+ before?: Level | Representation;
1648
+ after?: Level | Representation;
1649
1649
  plugin: string;
1650
1650
  automatic: boolean;
1651
1651
  /* Excluded from this release type: downscale */
@@ -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.cuepoints=t())}(this,(function(){"use strict";var e=Object.freeze({__proto__:null,CUEPOINTS:"cuepoints",CUEPOINT_START:"cuepointstart",CUEPOINT_END:"cuepointend"});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 o=window.customElements.get(t);if(!o)throw new Error(`no default flowplayer component with the name ${t} exists`);const r=window.customElements.get(n);return"function"!=typeof r?o:r})(e._customElements,t))(e);function n(e,t,n){const o=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(o),e}function o(e){const t=e._customElements.get("flowplayer-cue");t&&Array.from(e.root.querySelectorAll(t)).forEach(e=>{e.remove()})}function r(e,o){var r;const i=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(e,"flowplayer-timeline-bar"),s=e.duration,c=null===(r=null==e?void 0:e.opts)||void 0===r?void 0:r.draw_cuepoints;i&&!e.hasState("is-live")&&isFinite(s)&&Array.isArray(o)&&c&&o.forEach(o=>{if(void 0===o.startTime||o.startTime<0||!o.endTime||o.startTime===o.endTime)return;const r=Math.round(o.startTime/s*1e3)/10;if(r>100||r<0)return;const c=o.endTime-o.startTime,u=t(e,"flowplayer-cue");n(u,"cue:attributes",{left:r+"%",width:c/s*100+"%"}),i.append(u)})}!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 FlowplayerComponent extends HTMLElement{constructor(e){super(),this.player=e}}class CueComponent extends FlowplayerComponent{constructor(e){super(e),this.className="fp-cuepoint",this.addEventListener("cue:attributes",e=>{this.style.setProperty("left",e.detail.left),this.style.setProperty("width",e.detail.width)})}}var i;const s=((i=class Cuepoints{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-cue",CueComponent)}init(e,t,n){if(!n.reaper)return;const s=n.addTextTrack("metadata","fp-cuepoints");s.removeCue=function(e){this===i&&TextTrack.prototype.removeCue.call(s,e)},n.reaper.set("cuepoints",[]),n.on("config",(function(t){var o;if(!n.reaper)return;(null===(o=t.data)||void 0===o?void 0:o.cuepoints)!==n.reaper.get("cuepoints")&&n.emit("cuepoints",{cuepoints:e.cuepoints})})),n.on("durationchange",()=>{n.reaper&&(o(n),r(n,n.reaper.get("cuepoints")))}),n.on("cuepoints",e=>{var t;if(!n.reaper)return;const i=(null===(t=e.data)||void 0===t?void 0:t.cuepoints)||[];n.reaper.set("cuepoints",i),Array.from(s.cues||{length:0}).forEach(e=>s.removeCue.call(this.constructor,e)),o(n),i.map((function(e){return function(e,t){try{const n=new VTTCue(t.startTime,t.endTime,t.text||"");return n.id=t.id||"",n.onenter=e.emit.bind(e,"cuepointstart",{cuepoint:t}),n.onexit=e.emit.bind(e,"cuepointend",{cuepoint:t}),n}catch(e){if(t.startTime===t.endTime)return console.warn("Cue(:error)> startTime cannot equal endTime on this platform");throw e}}(n,e)})).forEach((function(e){e&&s.addCue(e)})),r(n,i)})}}).pluginName="cuepoints",i.events=e,i);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,s)}));
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.cuepoints=t())}(this,function(){"use strict";const e="cuepoints",t="cuepointstart",n="cuepointend";var o=Object.freeze({__proto__:null,CUEPOINTS:e,CUEPOINT_START:t,CUEPOINT_END:n});const r="flowplayer-cue",i=(e,t)=>new(((e,t)=>{const n=e.get(t);if(!n)throw new Error(`no flowplayer component with the name ${t} exists`);const o=window.customElements.get(t);if(!o)throw new Error(`no default flowplayer component with the name ${t} exists`);const r=window.customElements.get(n);return"function"!=typeof r?o:r})(e._customElements,t))(e);function s(e,t,n){const o=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(o),e}function c(e){const t=e._customElements.get(r);t&&Array.from(e.root.querySelectorAll(t)).forEach(e=>{e.remove()})}function u(e,t){var n;const o=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(e,"flowplayer-timeline-bar"),c=e.duration,u=null===(n=null==e?void 0:e.opts)||void 0===n?void 0:n.draw_cuepoints;o&&!e.hasState("is-live")&&isFinite(c)&&Array.isArray(t)&&u&&t.forEach(t=>{if(void 0===t.startTime||t.startTime<0||!t.endTime||t.startTime===t.endTime)return;const n=Math.round(t.startTime/c*1e3)/10;if(n>100||n<0)return;const u=t.endTime-t.startTime,a=i(e,r);s(a,"cue:attributes",{left:n+"%",width:u/c*100+"%"}),o.append(a)})}!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 FlowplayerComponent extends HTMLElement{constructor(e){super(),this.player=e}}class CueComponent extends FlowplayerComponent{constructor(e){super(e),this.className="fp-cuepoint",this.addEventListener("cue:attributes",e=>{this.style.setProperty("left",e.detail.left),this.style.setProperty("width",e.detail.width)})}}var a;const l=((a=class Cuepoints{constructor(e){((e,t,n)=>{window.customElements.get(t)||window.customElements.define(t,n),e.customElements.get(t)||e.customElements.set(t,t)})(e,r,CueComponent)}init(o,r,i){if(!i.reaper)return;const s=i.addTextTrack("metadata","fp-cuepoints");s.removeCue=function(e){this===a&&TextTrack.prototype.removeCue.call(s,e)},i.reaper.set("cuepoints",[]),i.on("config",function(t){var n;if(!i.reaper)return;(null===(n=t.data)||void 0===n?void 0:n.cuepoints)!==i.reaper.get("cuepoints")&&i.emit(e,{cuepoints:o.cuepoints})}),i.on("durationchange",()=>{i.reaper&&(c(i),u(i,i.reaper.get("cuepoints")))}),i.on(e,e=>{var o;if(!i.reaper)return;const r=(null===(o=e.data)||void 0===o?void 0:o.cuepoints)||[];i.reaper.set("cuepoints",r),Array.from(s.cues||{length:0}).forEach(e=>s.removeCue.call(this.constructor,e)),c(i),r.map(function(e){return function(e,o){try{const r=new VTTCue(o.startTime,o.endTime,o.text||"");return r.id=o.id||"",r.onenter=e.emit.bind(e,t,{cuepoint:o}),r.onexit=e.emit.bind(e,n,{cuepoint:o}),r}catch(e){if(o.startTime===o.endTime)return console.warn("Cue(:error)> startTime cannot equal endTime on this platform");throw e}}(i,e)}).forEach(function(e){e&&s.addCue(e)}),u(i,r)})}}).pluginName="cuepoints",a.events=o,a);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,l)});
package/plugins/dash.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import type { BitrateInfo } from 'dashjs';
2
1
  import type * as DashJS from 'dashjs';
3
2
  import type { Get } from 'type-fest';
4
3
  import type { Level } from 'hls.js';
5
4
  import type { MediaPlayerClass } from 'dashjs';
6
5
  import type { MediaSettings } from 'dashjs';
7
6
  import type { ProtectionDataSet } from 'dashjs';
7
+ import type { Representation } from 'dashjs';
8
8
  import type { TupleToUnion } from 'type-fest';
9
9
 
10
10
  declare namespace allEvents {
@@ -1533,7 +1533,7 @@ PROGRESS = "progress";
1533
1533
  */
1534
1534
  declare type QselOption = (Level & {
1535
1535
  level: number;
1536
- }) | BitrateInfo | {
1536
+ }) | Representation | {
1537
1537
  name: string | number;
1538
1538
  encodingId: string;
1539
1539
  spatialLayerId: number;
@@ -1581,8 +1581,8 @@ QUALITY_CHANGE = "qualitychange";
1581
1581
  * @public
1582
1582
  */
1583
1583
  declare type QualityChangeEventDetail = {
1584
- before?: Level | BitrateInfo;
1585
- after?: Level | BitrateInfo;
1584
+ before?: Level | Representation;
1585
+ after?: Level | Representation;
1586
1586
  plugin: string;
1587
1587
  automatic: boolean;
1588
1588
  /* Excluded from this release type: downscale */