@flowplayer/player 3.15.1-rc → 3.16.0-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/events.d.ts +22 -2
- package/core/events.js +50 -50
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/flowplayer.css +1 -1
- package/index.d.ts +78 -35
- package/package.json +1 -1
- package/plugins/ads.d.ts +76 -33
- package/plugins/ads.js +1 -1
- package/plugins/airplay.d.ts +76 -33
- package/plugins/analytics.d.ts +76 -33
- package/plugins/analytics.js +1 -1
- package/plugins/asel.d.ts +221 -36
- package/plugins/asel.js +1 -1
- package/plugins/audio.d.ts +76 -33
- package/plugins/chapters.d.ts +76 -33
- package/plugins/chromecast.d.ts +76 -33
- package/plugins/chromecast.js +1 -1
- package/plugins/comscore.d.ts +76 -33
- package/plugins/consent.d.ts +76 -33
- package/plugins/context-menu.d.ts +76 -33
- package/plugins/cuepoints.d.ts +76 -33
- package/plugins/dash.d.ts +76 -33
- package/plugins/dash.js +1 -1
- package/plugins/drm.d.ts +76 -33
- package/plugins/endscreen.d.ts +76 -33
- package/plugins/fas.d.ts +76 -33
- package/plugins/float-on-scroll.d.ts +76 -33
- package/plugins/ga4.d.ts +76 -33
- package/plugins/gemius.d.ts +76 -33
- package/plugins/google-analytics.d.ts +76 -33
- package/plugins/health.d.ts +76 -33
- package/plugins/health.js +1 -1
- package/plugins/hls.d.ts +76 -33
- package/plugins/hls.js +1 -1
- package/plugins/id3.d.ts +76 -33
- package/plugins/iframe.d.ts +76 -33
- package/plugins/keyboard.d.ts +76 -33
- package/plugins/media-session.d.ts +76 -33
- package/plugins/message.d.ts +76 -33
- package/plugins/ovp.d.ts +76 -33
- package/plugins/playlist.d.ts +107 -33
- package/plugins/playlist.js +1 -1
- package/plugins/preview.d.ts +76 -33
- package/plugins/qsel.d.ts +76 -33
- package/plugins/qul.d.ts +76 -33
- package/plugins/rts.d.ts +76 -33
- package/plugins/share.d.ts +76 -33
- package/plugins/speed.d.ts +76 -33
- package/plugins/ssai.d.ts +76 -33
- package/plugins/ssai.js +1 -1
- package/plugins/subtitles.d.ts +76 -33
- package/plugins/thumbnails.d.ts +76 -33
- package/plugins/tizen.d.ts +76 -33
- package/plugins/vtsel.d.ts +76 -33
- package/plugins/webos.d.ts +76 -33
- package/util/loader.d.ts +76 -33
package/plugins/asel.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.asel=t())}(this,(function(){"use strict";
|
|
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.asel=t())}(this,(function(){"use strict";const e="audio:set",t="audio:tracks";var n=Object.freeze({__proto__:null,SET:e,SWITCH:"audio:update",TRACKS:t});function s(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 i=navigator.languages||[navigator.language];function o(t,n){t.emit(e,n),n.autoselect&&t._storage.setItem("@flowplayer/audio/track",n.lang)}function a(e){return e.toLowerCase()}function r(e,t,n){t=t.slice(0);const o={},r=e.getItem("@flowplayer/audio/track");let l=function(){try{return i.reduce((e,t)=>~t.indexOf("-")?e.concat(t,t.split("-")[0]):e.concat(t),[])}catch(e){return[]}}().map(a),c=-1;if("number"==typeof n)return n;for("string"==typeof n&&(n=n.toLowerCase(),~l.indexOf(n)&&l.splice(l.indexOf(n),1),l.unshift(a(n))),Array.isArray(n)&&(l=n.map(a));t.length;){++c;const e=t.shift();if(null==e?void 0:e.autoselect){if(r==e.lang)return console.debug("restoring lang from previous session: ",r),c;if(e.default&&(o.fallback=[c,e]),e.lang&&~l.indexOf(e.lang.toLowerCase())){const t=l.indexOf(e.lang);if(t<s(o,"by_lang.2",1/0)&&(o.by_lang=[c,e,t]),0===t)break}}}return s(o,"by_lang.0",s(o,"fallback.0",void 0))}const 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 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 c="fp-on",u="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=m(),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||(d(),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||m()),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)}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,n)=>{t.classList.toggle(c,n===e)})}unselect_item(){this.options.forEach(e=>{e.classList.remove(c)})}toggle_visibility(e){this.classList.toggle(u,e),this.menu.style.setProperty("display",e?"none":"flex")}}function d(){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 m(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function f(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)&&(d(),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 p;const h=((p=class Asel{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-audio-menu",FlowplayerMenu)}init(i,a,c){if(!1===i.asel)return;let u=[];const d=l(c,"flowplayer-audio-menu");d instanceof FlowplayerMenu&&d.setMenuAttrs({summaryTitle:c.i18n("audio.button_txt"),menuTitle:c.i18n("audio.menu_title"),class:"fp-asel",options_event:Asel.events.TRACKS,item_selected_event:Asel.events.SWITCH});const m=function(t){const s={tracks:[],events:n};return Object.assign(s,{set:function(n){if(!("number"!=typeof n||n<0||n>s.tracks.length-1))return t.emit(e,s.tracks[n]),s},get:function(e){if("number"==typeof e)return s.tracks[e]}}),s}(c);c.asel=m,c.on("mount",(function(){var e;null===(e=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(c,c.hasState("is-tv")?"flowplayer-tv-menu":"flowplayer-control"))||void 0===e||e.append(d)})),c.on("src",()=>{m.tracks=[],m.active_track=void 0,f(d,Asel.events.TRACKS,[])}),c.on(t,(function(e){if(!Array.isArray(e.data)||e.data.length===u.length&&e.data.every((e,t)=>e===u[t]))return;u=e.data,m.tracks=u.slice();const t=s(i,"asel.sort");"function"==typeof t&&m.tracks.sort(t),f(d,Asel.events.TRACKS,Array.from({length:m.tracks.length}).map((e,t)=>{const n=m.tracks[t];return{text:n.name||n.label||n.lang,onclick:o.bind(0,c,n)}})),m.active_track=m.tracks.find(e=>e.enabled),m.active_track&&f(d,Asel.events.SWITCH,{selected_index:m.tracks.indexOf(m.active_track)});const n=r(c._storage,m.tracks,s(i,"asel.default_lang",!1));return d instanceof FlowplayerMenu&&d.toggle_visibility(e.data.length<2),void 0!==n?m.set(n):void 0})),c.on("audio:update",(function(e){var t;null===(t=c.asel)||void 0===t||t.tracks.find((t,n)=>{var s,i;t!==e.detail&&t.id!==(null!==(i=null===(s=e.detail)||void 0===s?void 0:s.id)&&void 0!==i?i:-1)||(c.asel.active_track=t,f(d,Asel.events.SWITCH,{selected_index:n}))})})),c.audioTracks&&(c.audioTracks.addEventListener("addtrack",(function(){c.hls||c.emit(t,Array.from(c.audioTracks))})),c.on(e,(function(e){if(c.hls)return;const t=e.detail;m.active_track=t,t&&Array.from(c.audioTracks).forEach(e=>{e.enabled=t.id===e.id,e.enabled&&f(d,Asel.events.SWITCH,{selected_index:m.tracks.indexOf(t)})})})))}}).events=n,p);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,h)}));
|
package/plugins/audio.d.ts
CHANGED
|
@@ -350,6 +350,7 @@ declare type ErrorEventDetail = {
|
|
|
350
350
|
declare namespace events {
|
|
351
351
|
export {
|
|
352
352
|
MOUNT,
|
|
353
|
+
RETRY,
|
|
353
354
|
ERROR,
|
|
354
355
|
CONTEXT_MENU,
|
|
355
356
|
CLICK,
|
|
@@ -401,7 +402,8 @@ declare namespace events {
|
|
|
401
402
|
LANDSCAPE,
|
|
402
403
|
PORTRAIT,
|
|
403
404
|
DVR,
|
|
404
|
-
|
|
405
|
+
LIVE,
|
|
406
|
+
RECOVER
|
|
405
407
|
}
|
|
406
408
|
}
|
|
407
409
|
|
|
@@ -600,8 +602,6 @@ declare const /**
|
|
|
600
602
|
*/
|
|
601
603
|
LANDSCAPE = "landscape";
|
|
602
604
|
|
|
603
|
-
declare const LIVE = "is-live";
|
|
604
|
-
|
|
605
605
|
/**
|
|
606
606
|
* @public
|
|
607
607
|
* when src is a livestream
|
|
@@ -613,7 +613,9 @@ declare const /**
|
|
|
613
613
|
* @public
|
|
614
614
|
* when src is a livestream
|
|
615
615
|
*/
|
|
616
|
-
|
|
616
|
+
LIVE = "live";
|
|
617
|
+
|
|
618
|
+
declare const LIVE_2 = "is-live";
|
|
617
619
|
|
|
618
620
|
declare const LIVE_SEEKED = "is-live-seeked";
|
|
619
621
|
|
|
@@ -913,33 +915,27 @@ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
|
|
|
913
915
|
|
|
914
916
|
declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
|
|
915
917
|
|
|
916
|
-
declare type PlayerCustomEventsDetailMap = {
|
|
917
|
-
[
|
|
918
|
-
[
|
|
919
|
-
[CONTEXT_MENU]: ContextMenuEventDetail;
|
|
920
|
-
/* Excluded from this release type: beforeplay */
|
|
921
|
-
/* Excluded from this release type: beforepause */
|
|
922
|
-
/* Excluded from this release type: state */
|
|
918
|
+
declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
|
|
919
|
+
[REAP]: ReapEventDetail;
|
|
920
|
+
[SOURCE]: SourceEventDetail;
|
|
923
921
|
[CUEPOINT_START]: CuePointStartEventDetail;
|
|
924
922
|
[CUEPOINT_END]: CuePointEndEventDetail;
|
|
925
|
-
[
|
|
926
|
-
[
|
|
927
|
-
[
|
|
928
|
-
|
|
929
|
-
[
|
|
930
|
-
/* Excluded from this release type: config */
|
|
931
|
-
[QUALITIES]: QualitiesEventDetail;
|
|
932
|
-
/* Excluded from this release type: "error:fatal" */
|
|
933
|
-
[RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
|
|
923
|
+
[MOUNT]: MountEventDetail;
|
|
924
|
+
[LIVE]: LiveEventDetail;
|
|
925
|
+
[DVR]: DvrEventDetail;
|
|
926
|
+
[RETRY]: RetryEventDetail;
|
|
927
|
+
[RECOVER]: RecoverEventDetail;
|
|
934
928
|
/* Excluded from this release type: audioonlysource */
|
|
935
929
|
/* Excluded from this release type: renderplugin */
|
|
936
|
-
[DVR]: DvrEventDetail;
|
|
937
|
-
[LIVE_2]: LiveEventDetail;
|
|
938
930
|
/* Excluded from this release type: "seek:queued" */
|
|
939
931
|
/* Excluded from this release type: "seek:cancel" */
|
|
940
932
|
/* Excluded from this release type: "plugin:registered" */
|
|
941
933
|
/* Excluded from this release type: intersectionchange */
|
|
942
|
-
/* Excluded from this release type:
|
|
934
|
+
/* Excluded from this release type: beforeplay */
|
|
935
|
+
/* Excluded from this release type: beforepause */
|
|
936
|
+
/* Excluded from this release type: state */
|
|
937
|
+
/* Excluded from this release type: config */
|
|
938
|
+
/* Excluded from this release type: "error:fatal" */
|
|
943
939
|
};
|
|
944
940
|
|
|
945
941
|
declare type PlayerCustomEventsOverloads = {
|
|
@@ -978,11 +974,18 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
978
974
|
* Sent right before the player src attribute is set. This allows you to change the video URL before playback.
|
|
979
975
|
*/
|
|
980
976
|
on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
|
|
981
|
-
|
|
977
|
+
/**
|
|
978
|
+
* Emitted when an Error recovery is attempted
|
|
979
|
+
*/
|
|
980
|
+
on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
|
|
982
981
|
/**
|
|
983
982
|
* Sent when a flowplayer instance is about to be removed from the DOM, and any unsafe references are about to be reaped, which allows Single Page Applications to perform the necessary resource cleanups. This is important when working with front-end frameworks like React. This event should never be emitted directly, only listened to.
|
|
984
983
|
*/
|
|
985
984
|
on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
|
|
985
|
+
/**
|
|
986
|
+
* Emitted when a player will retry to reload
|
|
987
|
+
*/
|
|
988
|
+
on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
|
|
986
989
|
/* Excluded from this release type: on */
|
|
987
990
|
/**
|
|
988
991
|
* Emitted when the set of underlying qualities has changed.
|
|
@@ -1002,8 +1005,7 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
1002
1005
|
/**
|
|
1003
1006
|
* when src is a livestream
|
|
1004
1007
|
*/
|
|
1005
|
-
on(event: typeof
|
|
1006
|
-
/* Excluded from this release type: on */
|
|
1008
|
+
on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
|
|
1007
1009
|
/* Excluded from this release type: on */
|
|
1008
1010
|
/* Excluded from this release type: on */
|
|
1009
1011
|
/* Excluded from this release type: on */
|
|
@@ -1032,11 +1034,26 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
1032
1034
|
*/
|
|
1033
1035
|
off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
1034
1036
|
/* Excluded from this release type: poll */
|
|
1035
|
-
emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
|
|
1036
1037
|
/* Excluded from this release type: emit */
|
|
1037
|
-
|
|
1038
|
+
/* Excluded from this release type: emit */
|
|
1039
|
+
emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
|
|
1040
|
+
/* Excluded from this release type: emit */
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1043
|
+
declare type PlayerEmittableCustomEventsDetailMap = {
|
|
1044
|
+
[ERROR]: ErrorEventDetail;
|
|
1045
|
+
[CONTEXT_MENU]: ContextMenuEventDetail;
|
|
1046
|
+
[VIEW_ENTER]: ViewEnterEventDetail;
|
|
1047
|
+
[VIEW_LEAVE]: ViewLeaveEventDetail;
|
|
1048
|
+
[QUALITIES]: QualitiesEventDetail;
|
|
1049
|
+
[RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
|
|
1038
1050
|
};
|
|
1039
1051
|
|
|
1052
|
+
declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* @public
|
|
1056
|
+
*/
|
|
1040
1057
|
declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
|
|
1041
1058
|
|
|
1042
1059
|
declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
|
|
@@ -1230,9 +1247,23 @@ declare type RecommendationsReadyEventDetail = {
|
|
|
1230
1247
|
playlist: RecommendationItem[];
|
|
1231
1248
|
};
|
|
1232
1249
|
|
|
1233
|
-
|
|
1250
|
+
/**
|
|
1251
|
+
* @public
|
|
1252
|
+
* emitted when an Error recovery is attempted
|
|
1253
|
+
*/
|
|
1254
|
+
declare const /**
|
|
1255
|
+
@public
|
|
1256
|
+
* when a new player is inserted into the HTML
|
|
1257
|
+
*/ /**
|
|
1258
|
+
* @public
|
|
1259
|
+
* emitted when an Error recovery is attempted
|
|
1260
|
+
*/
|
|
1261
|
+
RECOVER = "recover";
|
|
1234
1262
|
|
|
1235
|
-
|
|
1263
|
+
/**
|
|
1264
|
+
* @public
|
|
1265
|
+
*/
|
|
1266
|
+
declare type RecoverEventDetail = null;
|
|
1236
1267
|
|
|
1237
1268
|
/* Excluded from this release type: REMOTE_SESSION_ENDED */
|
|
1238
1269
|
|
|
@@ -1256,9 +1287,21 @@ declare const /**
|
|
|
1256
1287
|
*/
|
|
1257
1288
|
RESIZE = "resize";
|
|
1258
1289
|
|
|
1259
|
-
|
|
1290
|
+
/**
|
|
1291
|
+
* @public
|
|
1292
|
+
*/
|
|
1293
|
+
declare const /**
|
|
1294
|
+
@public
|
|
1295
|
+
* when a new player is inserted into the HTML
|
|
1296
|
+
*/ /**
|
|
1297
|
+
* @public
|
|
1298
|
+
*/
|
|
1299
|
+
RETRY = "retry";
|
|
1260
1300
|
|
|
1261
|
-
|
|
1301
|
+
/**
|
|
1302
|
+
* @public
|
|
1303
|
+
*/
|
|
1304
|
+
declare type RetryEventDetail = null;
|
|
1262
1305
|
|
|
1263
1306
|
declare const RTL = "is-rtl";
|
|
1264
1307
|
|
|
@@ -1393,7 +1436,7 @@ declare namespace states {
|
|
|
1393
1436
|
RTL,
|
|
1394
1437
|
TV,
|
|
1395
1438
|
ENDED,
|
|
1396
|
-
LIVE,
|
|
1439
|
+
LIVE_2 as LIVE,
|
|
1397
1440
|
ERRORED,
|
|
1398
1441
|
WAITING,
|
|
1399
1442
|
AUTOPLAY,
|
package/plugins/chapters.d.ts
CHANGED
|
@@ -359,6 +359,7 @@ declare type ErrorEventDetail = {
|
|
|
359
359
|
declare namespace events {
|
|
360
360
|
export {
|
|
361
361
|
MOUNT,
|
|
362
|
+
RETRY,
|
|
362
363
|
ERROR,
|
|
363
364
|
CONTEXT_MENU,
|
|
364
365
|
CLICK,
|
|
@@ -410,7 +411,8 @@ declare namespace events {
|
|
|
410
411
|
LANDSCAPE,
|
|
411
412
|
PORTRAIT,
|
|
412
413
|
DVR,
|
|
413
|
-
|
|
414
|
+
LIVE,
|
|
415
|
+
RECOVER
|
|
414
416
|
}
|
|
415
417
|
}
|
|
416
418
|
|
|
@@ -609,8 +611,6 @@ declare const /**
|
|
|
609
611
|
*/
|
|
610
612
|
LANDSCAPE = "landscape";
|
|
611
613
|
|
|
612
|
-
declare const LIVE = "is-live";
|
|
613
|
-
|
|
614
614
|
/**
|
|
615
615
|
* @public
|
|
616
616
|
* when src is a livestream
|
|
@@ -622,7 +622,9 @@ declare const /**
|
|
|
622
622
|
* @public
|
|
623
623
|
* when src is a livestream
|
|
624
624
|
*/
|
|
625
|
-
|
|
625
|
+
LIVE = "live";
|
|
626
|
+
|
|
627
|
+
declare const LIVE_2 = "is-live";
|
|
626
628
|
|
|
627
629
|
declare const LIVE_SEEKED = "is-live-seeked";
|
|
628
630
|
|
|
@@ -922,33 +924,27 @@ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
|
|
|
922
924
|
|
|
923
925
|
declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
|
|
924
926
|
|
|
925
|
-
declare type PlayerCustomEventsDetailMap = {
|
|
926
|
-
[
|
|
927
|
-
[
|
|
928
|
-
[CONTEXT_MENU]: ContextMenuEventDetail;
|
|
929
|
-
/* Excluded from this release type: beforeplay */
|
|
930
|
-
/* Excluded from this release type: beforepause */
|
|
931
|
-
/* Excluded from this release type: state */
|
|
927
|
+
declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
|
|
928
|
+
[REAP]: ReapEventDetail;
|
|
929
|
+
[SOURCE]: SourceEventDetail;
|
|
932
930
|
[CUEPOINT_START]: CuePointStartEventDetail;
|
|
933
931
|
[CUEPOINT_END]: CuePointEndEventDetail;
|
|
934
|
-
[
|
|
935
|
-
[
|
|
936
|
-
[
|
|
937
|
-
|
|
938
|
-
[
|
|
939
|
-
/* Excluded from this release type: config */
|
|
940
|
-
[QUALITIES]: QualitiesEventDetail;
|
|
941
|
-
/* Excluded from this release type: "error:fatal" */
|
|
942
|
-
[RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
|
|
932
|
+
[MOUNT]: MountEventDetail;
|
|
933
|
+
[LIVE]: LiveEventDetail;
|
|
934
|
+
[DVR]: DvrEventDetail;
|
|
935
|
+
[RETRY]: RetryEventDetail;
|
|
936
|
+
[RECOVER]: RecoverEventDetail;
|
|
943
937
|
/* Excluded from this release type: audioonlysource */
|
|
944
938
|
/* Excluded from this release type: renderplugin */
|
|
945
|
-
[DVR]: DvrEventDetail;
|
|
946
|
-
[LIVE_2]: LiveEventDetail;
|
|
947
939
|
/* Excluded from this release type: "seek:queued" */
|
|
948
940
|
/* Excluded from this release type: "seek:cancel" */
|
|
949
941
|
/* Excluded from this release type: "plugin:registered" */
|
|
950
942
|
/* Excluded from this release type: intersectionchange */
|
|
951
|
-
/* Excluded from this release type:
|
|
943
|
+
/* Excluded from this release type: beforeplay */
|
|
944
|
+
/* Excluded from this release type: beforepause */
|
|
945
|
+
/* Excluded from this release type: state */
|
|
946
|
+
/* Excluded from this release type: config */
|
|
947
|
+
/* Excluded from this release type: "error:fatal" */
|
|
952
948
|
};
|
|
953
949
|
|
|
954
950
|
declare type PlayerCustomEventsOverloads = {
|
|
@@ -987,11 +983,18 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
987
983
|
* Sent right before the player src attribute is set. This allows you to change the video URL before playback.
|
|
988
984
|
*/
|
|
989
985
|
on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
|
|
990
|
-
|
|
986
|
+
/**
|
|
987
|
+
* Emitted when an Error recovery is attempted
|
|
988
|
+
*/
|
|
989
|
+
on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
|
|
991
990
|
/**
|
|
992
991
|
* Sent when a flowplayer instance is about to be removed from the DOM, and any unsafe references are about to be reaped, which allows Single Page Applications to perform the necessary resource cleanups. This is important when working with front-end frameworks like React. This event should never be emitted directly, only listened to.
|
|
993
992
|
*/
|
|
994
993
|
on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
|
|
994
|
+
/**
|
|
995
|
+
* Emitted when a player will retry to reload
|
|
996
|
+
*/
|
|
997
|
+
on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
|
|
995
998
|
/* Excluded from this release type: on */
|
|
996
999
|
/**
|
|
997
1000
|
* Emitted when the set of underlying qualities has changed.
|
|
@@ -1011,8 +1014,7 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
1011
1014
|
/**
|
|
1012
1015
|
* when src is a livestream
|
|
1013
1016
|
*/
|
|
1014
|
-
on(event: typeof
|
|
1015
|
-
/* Excluded from this release type: on */
|
|
1017
|
+
on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
|
|
1016
1018
|
/* Excluded from this release type: on */
|
|
1017
1019
|
/* Excluded from this release type: on */
|
|
1018
1020
|
/* Excluded from this release type: on */
|
|
@@ -1041,11 +1043,26 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
1041
1043
|
*/
|
|
1042
1044
|
off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
1043
1045
|
/* Excluded from this release type: poll */
|
|
1044
|
-
emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
|
|
1045
1046
|
/* Excluded from this release type: emit */
|
|
1046
|
-
|
|
1047
|
+
/* Excluded from this release type: emit */
|
|
1048
|
+
emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
|
|
1049
|
+
/* Excluded from this release type: emit */
|
|
1050
|
+
};
|
|
1051
|
+
|
|
1052
|
+
declare type PlayerEmittableCustomEventsDetailMap = {
|
|
1053
|
+
[ERROR]: ErrorEventDetail;
|
|
1054
|
+
[CONTEXT_MENU]: ContextMenuEventDetail;
|
|
1055
|
+
[VIEW_ENTER]: ViewEnterEventDetail;
|
|
1056
|
+
[VIEW_LEAVE]: ViewLeaveEventDetail;
|
|
1057
|
+
[QUALITIES]: QualitiesEventDetail;
|
|
1058
|
+
[RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
|
|
1047
1059
|
};
|
|
1048
1060
|
|
|
1061
|
+
declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* @public
|
|
1065
|
+
*/
|
|
1049
1066
|
declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
|
|
1050
1067
|
|
|
1051
1068
|
declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
|
|
@@ -1239,9 +1256,23 @@ declare type RecommendationsReadyEventDetail = {
|
|
|
1239
1256
|
playlist: RecommendationItem[];
|
|
1240
1257
|
};
|
|
1241
1258
|
|
|
1242
|
-
|
|
1259
|
+
/**
|
|
1260
|
+
* @public
|
|
1261
|
+
* emitted when an Error recovery is attempted
|
|
1262
|
+
*/
|
|
1263
|
+
declare const /**
|
|
1264
|
+
@public
|
|
1265
|
+
* when a new player is inserted into the HTML
|
|
1266
|
+
*/ /**
|
|
1267
|
+
* @public
|
|
1268
|
+
* emitted when an Error recovery is attempted
|
|
1269
|
+
*/
|
|
1270
|
+
RECOVER = "recover";
|
|
1243
1271
|
|
|
1244
|
-
|
|
1272
|
+
/**
|
|
1273
|
+
* @public
|
|
1274
|
+
*/
|
|
1275
|
+
declare type RecoverEventDetail = null;
|
|
1245
1276
|
|
|
1246
1277
|
/* Excluded from this release type: REMOTE_SESSION_ENDED */
|
|
1247
1278
|
|
|
@@ -1265,9 +1296,21 @@ declare const /**
|
|
|
1265
1296
|
*/
|
|
1266
1297
|
RESIZE = "resize";
|
|
1267
1298
|
|
|
1268
|
-
|
|
1299
|
+
/**
|
|
1300
|
+
* @public
|
|
1301
|
+
*/
|
|
1302
|
+
declare const /**
|
|
1303
|
+
@public
|
|
1304
|
+
* when a new player is inserted into the HTML
|
|
1305
|
+
*/ /**
|
|
1306
|
+
* @public
|
|
1307
|
+
*/
|
|
1308
|
+
RETRY = "retry";
|
|
1269
1309
|
|
|
1270
|
-
|
|
1310
|
+
/**
|
|
1311
|
+
* @public
|
|
1312
|
+
*/
|
|
1313
|
+
declare type RetryEventDetail = null;
|
|
1271
1314
|
|
|
1272
1315
|
declare const RTL = "is-rtl";
|
|
1273
1316
|
|
|
@@ -1402,7 +1445,7 @@ declare namespace states {
|
|
|
1402
1445
|
RTL,
|
|
1403
1446
|
TV,
|
|
1404
1447
|
ENDED,
|
|
1405
|
-
LIVE,
|
|
1448
|
+
LIVE_2 as LIVE,
|
|
1406
1449
|
ERRORED,
|
|
1407
1450
|
WAITING,
|
|
1408
1451
|
AUTOPLAY,
|
package/plugins/chromecast.d.ts
CHANGED
|
@@ -400,6 +400,7 @@ declare type ErrorEventDetail = {
|
|
|
400
400
|
declare namespace events {
|
|
401
401
|
export {
|
|
402
402
|
MOUNT,
|
|
403
|
+
RETRY,
|
|
403
404
|
ERROR,
|
|
404
405
|
CONTEXT_MENU,
|
|
405
406
|
CLICK,
|
|
@@ -451,7 +452,8 @@ declare namespace events {
|
|
|
451
452
|
LANDSCAPE,
|
|
452
453
|
PORTRAIT,
|
|
453
454
|
DVR,
|
|
454
|
-
|
|
455
|
+
LIVE,
|
|
456
|
+
RECOVER
|
|
455
457
|
}
|
|
456
458
|
}
|
|
457
459
|
|
|
@@ -650,8 +652,6 @@ declare const /**
|
|
|
650
652
|
*/
|
|
651
653
|
LANDSCAPE = "landscape";
|
|
652
654
|
|
|
653
|
-
declare const LIVE = "is-live";
|
|
654
|
-
|
|
655
655
|
/**
|
|
656
656
|
* @public
|
|
657
657
|
* when src is a livestream
|
|
@@ -663,7 +663,9 @@ declare const /**
|
|
|
663
663
|
* @public
|
|
664
664
|
* when src is a livestream
|
|
665
665
|
*/
|
|
666
|
-
|
|
666
|
+
LIVE = "live";
|
|
667
|
+
|
|
668
|
+
declare const LIVE_2 = "is-live";
|
|
667
669
|
|
|
668
670
|
declare const LIVE_SEEKED = "is-live-seeked";
|
|
669
671
|
|
|
@@ -965,33 +967,27 @@ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
|
|
|
965
967
|
|
|
966
968
|
declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
|
|
967
969
|
|
|
968
|
-
declare type PlayerCustomEventsDetailMap = {
|
|
969
|
-
[
|
|
970
|
-
[
|
|
971
|
-
[CONTEXT_MENU]: ContextMenuEventDetail;
|
|
972
|
-
/* Excluded from this release type: beforeplay */
|
|
973
|
-
/* Excluded from this release type: beforepause */
|
|
974
|
-
/* Excluded from this release type: state */
|
|
970
|
+
declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
|
|
971
|
+
[REAP]: ReapEventDetail;
|
|
972
|
+
[SOURCE]: SourceEventDetail;
|
|
975
973
|
[CUEPOINT_START]: CuePointStartEventDetail;
|
|
976
974
|
[CUEPOINT_END]: CuePointEndEventDetail;
|
|
977
|
-
[
|
|
978
|
-
[
|
|
979
|
-
[
|
|
980
|
-
|
|
981
|
-
[
|
|
982
|
-
/* Excluded from this release type: config */
|
|
983
|
-
[QUALITIES]: QualitiesEventDetail;
|
|
984
|
-
/* Excluded from this release type: "error:fatal" */
|
|
985
|
-
[RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
|
|
975
|
+
[MOUNT]: MountEventDetail;
|
|
976
|
+
[LIVE]: LiveEventDetail;
|
|
977
|
+
[DVR]: DvrEventDetail;
|
|
978
|
+
[RETRY]: RetryEventDetail;
|
|
979
|
+
[RECOVER]: RecoverEventDetail;
|
|
986
980
|
/* Excluded from this release type: audioonlysource */
|
|
987
981
|
/* Excluded from this release type: renderplugin */
|
|
988
|
-
[DVR]: DvrEventDetail;
|
|
989
|
-
[LIVE_2]: LiveEventDetail;
|
|
990
982
|
/* Excluded from this release type: "seek:queued" */
|
|
991
983
|
/* Excluded from this release type: "seek:cancel" */
|
|
992
984
|
/* Excluded from this release type: "plugin:registered" */
|
|
993
985
|
/* Excluded from this release type: intersectionchange */
|
|
994
|
-
/* Excluded from this release type:
|
|
986
|
+
/* Excluded from this release type: beforeplay */
|
|
987
|
+
/* Excluded from this release type: beforepause */
|
|
988
|
+
/* Excluded from this release type: state */
|
|
989
|
+
/* Excluded from this release type: config */
|
|
990
|
+
/* Excluded from this release type: "error:fatal" */
|
|
995
991
|
};
|
|
996
992
|
|
|
997
993
|
declare type PlayerCustomEventsOverloads = {
|
|
@@ -1030,11 +1026,18 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
1030
1026
|
* Sent right before the player src attribute is set. This allows you to change the video URL before playback.
|
|
1031
1027
|
*/
|
|
1032
1028
|
on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
|
|
1033
|
-
|
|
1029
|
+
/**
|
|
1030
|
+
* Emitted when an Error recovery is attempted
|
|
1031
|
+
*/
|
|
1032
|
+
on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
|
|
1034
1033
|
/**
|
|
1035
1034
|
* Sent when a flowplayer instance is about to be removed from the DOM, and any unsafe references are about to be reaped, which allows Single Page Applications to perform the necessary resource cleanups. This is important when working with front-end frameworks like React. This event should never be emitted directly, only listened to.
|
|
1036
1035
|
*/
|
|
1037
1036
|
on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
|
|
1037
|
+
/**
|
|
1038
|
+
* Emitted when a player will retry to reload
|
|
1039
|
+
*/
|
|
1040
|
+
on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
|
|
1038
1041
|
/* Excluded from this release type: on */
|
|
1039
1042
|
/**
|
|
1040
1043
|
* Emitted when the set of underlying qualities has changed.
|
|
@@ -1054,8 +1057,7 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
1054
1057
|
/**
|
|
1055
1058
|
* when src is a livestream
|
|
1056
1059
|
*/
|
|
1057
|
-
on(event: typeof
|
|
1058
|
-
/* Excluded from this release type: on */
|
|
1060
|
+
on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
|
|
1059
1061
|
/* Excluded from this release type: on */
|
|
1060
1062
|
/* Excluded from this release type: on */
|
|
1061
1063
|
/* Excluded from this release type: on */
|
|
@@ -1084,11 +1086,26 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
1084
1086
|
*/
|
|
1085
1087
|
off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
1086
1088
|
/* Excluded from this release type: poll */
|
|
1087
|
-
emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
|
|
1088
1089
|
/* Excluded from this release type: emit */
|
|
1089
|
-
|
|
1090
|
+
/* Excluded from this release type: emit */
|
|
1091
|
+
emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
|
|
1092
|
+
/* Excluded from this release type: emit */
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
declare type PlayerEmittableCustomEventsDetailMap = {
|
|
1096
|
+
[ERROR]: ErrorEventDetail;
|
|
1097
|
+
[CONTEXT_MENU]: ContextMenuEventDetail;
|
|
1098
|
+
[VIEW_ENTER]: ViewEnterEventDetail;
|
|
1099
|
+
[VIEW_LEAVE]: ViewLeaveEventDetail;
|
|
1100
|
+
[QUALITIES]: QualitiesEventDetail;
|
|
1101
|
+
[RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
|
|
1090
1102
|
};
|
|
1091
1103
|
|
|
1104
|
+
declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* @public
|
|
1108
|
+
*/
|
|
1092
1109
|
declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
|
|
1093
1110
|
|
|
1094
1111
|
declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
|
|
@@ -1282,9 +1299,23 @@ declare type RecommendationsReadyEventDetail = {
|
|
|
1282
1299
|
playlist: RecommendationItem[];
|
|
1283
1300
|
};
|
|
1284
1301
|
|
|
1285
|
-
|
|
1302
|
+
/**
|
|
1303
|
+
* @public
|
|
1304
|
+
* emitted when an Error recovery is attempted
|
|
1305
|
+
*/
|
|
1306
|
+
declare const /**
|
|
1307
|
+
@public
|
|
1308
|
+
* when a new player is inserted into the HTML
|
|
1309
|
+
*/ /**
|
|
1310
|
+
* @public
|
|
1311
|
+
* emitted when an Error recovery is attempted
|
|
1312
|
+
*/
|
|
1313
|
+
RECOVER = "recover";
|
|
1286
1314
|
|
|
1287
|
-
|
|
1315
|
+
/**
|
|
1316
|
+
* @public
|
|
1317
|
+
*/
|
|
1318
|
+
declare type RecoverEventDetail = null;
|
|
1288
1319
|
|
|
1289
1320
|
/* Excluded from this release type: REMOTE_SESSION_ENDED */
|
|
1290
1321
|
|
|
@@ -1308,9 +1339,21 @@ declare const /**
|
|
|
1308
1339
|
*/
|
|
1309
1340
|
RESIZE = "resize";
|
|
1310
1341
|
|
|
1311
|
-
|
|
1342
|
+
/**
|
|
1343
|
+
* @public
|
|
1344
|
+
*/
|
|
1345
|
+
declare const /**
|
|
1346
|
+
@public
|
|
1347
|
+
* when a new player is inserted into the HTML
|
|
1348
|
+
*/ /**
|
|
1349
|
+
* @public
|
|
1350
|
+
*/
|
|
1351
|
+
RETRY = "retry";
|
|
1312
1352
|
|
|
1313
|
-
|
|
1353
|
+
/**
|
|
1354
|
+
* @public
|
|
1355
|
+
*/
|
|
1356
|
+
declare type RetryEventDetail = null;
|
|
1314
1357
|
|
|
1315
1358
|
declare const RTL = "is-rtl";
|
|
1316
1359
|
|
|
@@ -1450,7 +1493,7 @@ declare namespace states {
|
|
|
1450
1493
|
RTL,
|
|
1451
1494
|
TV,
|
|
1452
1495
|
ENDED,
|
|
1453
|
-
LIVE,
|
|
1496
|
+
LIVE_2 as LIVE,
|
|
1454
1497
|
ERRORED,
|
|
1455
1498
|
WAITING,
|
|
1456
1499
|
AUTOPLAY,
|