@flowplayer/player 3.23.1-rc → 3.24.0-rc.2
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.js +148 -74
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/index.d.ts +8 -37
- package/package.json +1 -1
- package/plugins/ads.d.ts +13 -42
- package/plugins/ads.js +2 -2
- package/plugins/airplay.d.ts +8 -42
- package/plugins/airplay.js +1 -1
- package/plugins/analytics.d.ts +8 -42
- package/plugins/analytics.js +1 -1
- package/plugins/asel.d.ts +8 -42
- package/plugins/asel.js +1 -1
- package/plugins/audio.d.ts +8 -42
- package/plugins/audio.js +1 -1
- package/plugins/chapters.d.ts +8 -42
- package/plugins/chapters.js +1 -1
- package/plugins/chromecast.d.ts +8 -42
- package/plugins/chromecast.js +1 -1
- package/plugins/comscore.d.ts +8 -42
- package/plugins/comscore.js +1 -1
- package/plugins/consent.d.ts +8 -42
- package/plugins/consent.js +1 -1
- package/plugins/context-menu.d.ts +8 -42
- package/plugins/context-menu.js +1 -1
- package/plugins/cuepoints.d.ts +8 -42
- package/plugins/cuepoints.js +1 -1
- package/plugins/dash.d.ts +8 -42
- package/plugins/dash.js +1 -1
- package/plugins/drm.d.ts +70 -8
- package/plugins/drm.js +1 -1
- package/plugins/endscreen.d.ts +8 -42
- package/plugins/endscreen.js +1 -1
- package/plugins/fas.d.ts +8 -42
- package/plugins/fas.js +1 -1
- package/plugins/float-on-scroll.d.ts +8 -42
- package/plugins/float-on-scroll.js +1 -1
- package/plugins/ga4.d.ts +8 -42
- package/plugins/ga4.js +1 -1
- package/plugins/gemius.d.ts +8 -42
- package/plugins/gemius.js +1 -1
- package/plugins/google-analytics.d.ts +8 -42
- package/plugins/google-analytics.js +1 -1
- package/plugins/hls.d.ts +8 -42
- package/plugins/hls.js +1 -1
- package/plugins/id3.d.ts +8 -42
- package/plugins/id3.js +1 -1
- package/plugins/iframe.d.ts +8 -42
- package/plugins/iframe.js +1 -1
- package/plugins/keyboard.d.ts +8 -42
- package/plugins/keyboard.js +1 -1
- package/plugins/media-session.d.ts +8 -42
- package/plugins/media-session.js +1 -1
- package/plugins/message.d.ts +8 -42
- package/plugins/message.js +1 -1
- package/plugins/ovp.d.ts +8 -42
- package/plugins/ovp.js +1 -1
- package/plugins/playlist.d.ts +95 -43
- package/plugins/playlist.js +1 -1
- package/plugins/preview.d.ts +8 -42
- package/plugins/preview.js +1 -1
- package/plugins/qsel.d.ts +8 -42
- package/plugins/qsel.js +1 -1
- package/plugins/qul.d.ts +8 -42
- package/plugins/qul.js +1 -1
- package/plugins/rts.d.ts +8 -42
- package/plugins/rts.js +1 -1
- package/plugins/share.d.ts +8 -42
- package/plugins/share.js +1 -1
- package/plugins/speed.d.ts +8 -42
- package/plugins/speed.js +1 -1
- package/plugins/ssai.d.ts +8 -42
- package/plugins/ssai.js +1 -1
- package/plugins/subtitles.d.ts +15 -45
- package/plugins/subtitles.js +1 -1
- package/plugins/thumbnails.d.ts +8 -42
- package/plugins/thumbnails.js +1 -1
- package/plugins/tizen.d.ts +8 -42
- package/plugins/tizen.js +1 -1
- package/plugins/vtsel.d.ts +8 -42
- package/plugins/vtsel.js +1 -1
- package/plugins/webos.d.ts +8 -42
- package/plugins/webos.js +1 -1
- package/util/loader.d.ts +8 -42
- package/util/loader.js +9 -8
package/plugins/qsel.d.ts
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import type { BitrateInfo } from 'dashjs';
|
|
4
4
|
import type { Get } from 'type-fest';
|
|
5
5
|
import type { Level } from 'hls.js';
|
|
6
|
-
import type { MediaKeyFunc } from 'hls.js';
|
|
7
|
-
import type { SetFieldType } from 'type-fest';
|
|
8
6
|
import type { TupleToUnion } from 'type-fest';
|
|
9
7
|
|
|
10
8
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -262,41 +260,6 @@ declare const DESTROYED = "is-destroyed";
|
|
|
262
260
|
|
|
263
261
|
declare const DISABLED = "is-disabled";
|
|
264
262
|
|
|
265
|
-
/**
|
|
266
|
-
* @public
|
|
267
|
-
*/
|
|
268
|
-
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @public
|
|
272
|
-
*/
|
|
273
|
-
declare type DRMConfiguration = {
|
|
274
|
-
license_server: string;
|
|
275
|
-
http_headers?: Record<string, string>;
|
|
276
|
-
certificate?: string;
|
|
277
|
-
vendor?: string | DRMVendorImplementation;
|
|
278
|
-
request_media_key_system_access_function?: MediaKeyFunc;
|
|
279
|
-
query_params?: Record<string, string>;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* @public
|
|
284
|
-
*/
|
|
285
|
-
declare type DRMSourceConfiguration = {
|
|
286
|
-
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* @public
|
|
291
|
-
*/
|
|
292
|
-
declare type DRMVendorImplementation = {
|
|
293
|
-
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
294
|
-
fairplay_request_license: (url: string, params: {
|
|
295
|
-
message: any;
|
|
296
|
-
assetId: string;
|
|
297
|
-
}, cb: (license_data: Uint8Array) => void) => void;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
263
|
/**
|
|
301
264
|
* @public
|
|
302
265
|
*/
|
|
@@ -530,13 +493,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
|
|
|
530
493
|
* @param selector - query selector of the HTML element where player will render
|
|
531
494
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
532
495
|
*/
|
|
533
|
-
(selector: string, config?: ConfigWithPlugins):
|
|
496
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
534
497
|
/**
|
|
535
498
|
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
536
499
|
* @param element - HTML element where player will render
|
|
537
500
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
538
501
|
*/
|
|
539
|
-
(element: HTMLElement, config?: ConfigWithPlugins):
|
|
502
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
540
503
|
}
|
|
541
504
|
|
|
542
505
|
/**
|
|
@@ -1153,6 +1116,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
|
1153
1116
|
*/
|
|
1154
1117
|
declare type PlayerWith<T> = T & Player;
|
|
1155
1118
|
|
|
1119
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
1120
|
+
opts: PluginConfig;
|
|
1121
|
+
setOpts: (config: PluginConfig) => void;
|
|
1122
|
+
};
|
|
1123
|
+
|
|
1156
1124
|
declare const PLAYING = "is-playing";
|
|
1157
1125
|
|
|
1158
1126
|
/**
|
|
@@ -1183,6 +1151,7 @@ declare interface Plugin_2<PluginConfig extends Config = Config, PluginPlayer ex
|
|
|
1183
1151
|
*/
|
|
1184
1152
|
declare interface PluginCtor<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
1185
1153
|
new (umd: FlowplayerUMD, player: Player): Plugin_2<PluginConfig, PluginPlayer>;
|
|
1154
|
+
pluginName: string;
|
|
1186
1155
|
}
|
|
1187
1156
|
|
|
1188
1157
|
/* Excluded from this release type: PluginRegisteredEventDetail */
|
|
@@ -1551,7 +1520,6 @@ declare type SourceObj<T = unknown> = {
|
|
|
1551
1520
|
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
1552
1521
|
*/
|
|
1553
1522
|
type?: string;
|
|
1554
|
-
drm?: DRMSourceConfiguration;
|
|
1555
1523
|
} & T;
|
|
1556
1524
|
|
|
1557
1525
|
/**
|
|
@@ -1779,6 +1747,4 @@ declare const WILL_PLAY = "will-play";
|
|
|
1779
1747
|
|
|
1780
1748
|
declare const WILL_SEEK = "will-seek";
|
|
1781
1749
|
|
|
1782
|
-
declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
|
|
1783
|
-
|
|
1784
1750
|
export { }
|
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)})}}).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=(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)}));
|
package/plugins/qul.d.ts
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import type { BitrateInfo } from 'dashjs';
|
|
4
4
|
import type { Get } from 'type-fest';
|
|
5
5
|
import type { Level } from 'hls.js';
|
|
6
|
-
import type { MediaKeyFunc } from 'hls.js';
|
|
7
|
-
import type { SetFieldType } from 'type-fest';
|
|
8
6
|
import type { TupleToUnion } from 'type-fest';
|
|
9
7
|
|
|
10
8
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -262,41 +260,6 @@ declare const DESTROYED = "is-destroyed";
|
|
|
262
260
|
|
|
263
261
|
declare const DISABLED = "is-disabled";
|
|
264
262
|
|
|
265
|
-
/**
|
|
266
|
-
* @public
|
|
267
|
-
*/
|
|
268
|
-
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @public
|
|
272
|
-
*/
|
|
273
|
-
declare type DRMConfiguration = {
|
|
274
|
-
license_server: string;
|
|
275
|
-
http_headers?: Record<string, string>;
|
|
276
|
-
certificate?: string;
|
|
277
|
-
vendor?: string | DRMVendorImplementation;
|
|
278
|
-
request_media_key_system_access_function?: MediaKeyFunc;
|
|
279
|
-
query_params?: Record<string, string>;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* @public
|
|
284
|
-
*/
|
|
285
|
-
declare type DRMSourceConfiguration = {
|
|
286
|
-
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* @public
|
|
291
|
-
*/
|
|
292
|
-
declare type DRMVendorImplementation = {
|
|
293
|
-
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
294
|
-
fairplay_request_license: (url: string, params: {
|
|
295
|
-
message: any;
|
|
296
|
-
assetId: string;
|
|
297
|
-
}, cb: (license_data: Uint8Array) => void) => void;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
263
|
/**
|
|
301
264
|
* @public
|
|
302
265
|
*/
|
|
@@ -523,13 +486,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
|
|
|
523
486
|
* @param selector - query selector of the HTML element where player will render
|
|
524
487
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
525
488
|
*/
|
|
526
|
-
(selector: string, config?: ConfigWithPlugins):
|
|
489
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
527
490
|
/**
|
|
528
491
|
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
529
492
|
* @param element - HTML element where player will render
|
|
530
493
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
531
494
|
*/
|
|
532
|
-
(element: HTMLElement, config?: ConfigWithPlugins):
|
|
495
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
533
496
|
}
|
|
534
497
|
|
|
535
498
|
/**
|
|
@@ -1146,6 +1109,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
|
1146
1109
|
*/
|
|
1147
1110
|
declare type PlayerWith<T> = T & Player;
|
|
1148
1111
|
|
|
1112
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
1113
|
+
opts: PluginConfig;
|
|
1114
|
+
setOpts: (config: PluginConfig) => void;
|
|
1115
|
+
};
|
|
1116
|
+
|
|
1149
1117
|
declare const PLAYING = "is-playing";
|
|
1150
1118
|
|
|
1151
1119
|
/**
|
|
@@ -1176,6 +1144,7 @@ declare interface Plugin_2<PluginConfig extends Config = Config, PluginPlayer ex
|
|
|
1176
1144
|
*/
|
|
1177
1145
|
declare interface PluginCtor<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
1178
1146
|
new (umd: FlowplayerUMD, player: Player): Plugin_2<PluginConfig, PluginPlayer>;
|
|
1147
|
+
pluginName: string;
|
|
1179
1148
|
}
|
|
1180
1149
|
|
|
1181
1150
|
/* Excluded from this release type: PluginRegisteredEventDetail */
|
|
@@ -1495,7 +1464,6 @@ declare type SourceObj<T = unknown> = {
|
|
|
1495
1464
|
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
1496
1465
|
*/
|
|
1497
1466
|
type?: string;
|
|
1498
|
-
drm?: DRMSourceConfiguration;
|
|
1499
1467
|
} & T;
|
|
1500
1468
|
|
|
1501
1469
|
/**
|
|
@@ -1719,6 +1687,4 @@ declare const WILL_PLAY = "will-play";
|
|
|
1719
1687
|
|
|
1720
1688
|
declare const WILL_SEEK = "will-seek";
|
|
1721
1689
|
|
|
1722
|
-
declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
|
|
1723
|
-
|
|
1724
1690
|
export { }
|
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),
|
|
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),u=/opr|opera/i.test(t),a=/SamsungBrowser/.test(t),l=a&&/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:u,chrome:r,firefox:s,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:a,samsung_tv:a&&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,(o,i,r)=>{if(200!=i)return n(0,t),o?e.emit("error",o):e.emit("error",{code:i,resp:r})})}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(u(o.pathname,0),i+"/"+u(o.pathname,0))].join("")}class QULPlugin{init(e,r,u){var a,l,c;const f=(null===(a=e.qul)||void 0===a?void 0:a.device_id)||(null===(l=e.qul)||void 0===l?void 0:l.dId)||u.deviceId();let v,p=null===(c=e.qul)||void 0===c?void 0:c.token;const m={};u.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}(u,u.opts))))})),u.on("config",(function(e){var t,n,o,i,r,d;const a=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);a&&a!==p&&function(e,t){p=e,u.setSrc({type:"application/x-mpegurl",src:s(v,p,t)})}(a,l)})),u.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(u,s,r);i(u.original_src,(e,t,n)=>{if(e)return u.emit("error",e);!isNaN(Number(t))&&Number(t)<400||d(u,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"),u=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(e,"flowplayer-ui");if(u&&d){if(e.setState("is-error",!0),!e.root.querySelector("#qul_error")){const t=new d(e);t.id="qul_error",u.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 u(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
|
@@ -5,10 +5,8 @@ import type { ConnectionStats } from '@millicast/sdk';
|
|
|
5
5
|
import type { DiagnosticsResponse } from '@millicast/sdk';
|
|
6
6
|
import type { Get } from 'type-fest';
|
|
7
7
|
import type { Level } from 'hls.js';
|
|
8
|
-
import type { MediaKeyFunc } from 'hls.js';
|
|
9
8
|
import type { MediaStreamSource } from '@millicast/sdk';
|
|
10
9
|
import type { OnStats } from '@dolbyio/webrtc-stats';
|
|
11
|
-
import type { SetFieldType } from 'type-fest';
|
|
12
10
|
import type { TupleToUnion } from 'type-fest';
|
|
13
11
|
|
|
14
12
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -266,41 +264,6 @@ declare const DESTROYED = "is-destroyed";
|
|
|
266
264
|
|
|
267
265
|
declare const DISABLED = "is-disabled";
|
|
268
266
|
|
|
269
|
-
/**
|
|
270
|
-
* @public
|
|
271
|
-
*/
|
|
272
|
-
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* @public
|
|
276
|
-
*/
|
|
277
|
-
declare type DRMConfiguration = {
|
|
278
|
-
license_server: string;
|
|
279
|
-
http_headers?: Record<string, string>;
|
|
280
|
-
certificate?: string;
|
|
281
|
-
vendor?: string | DRMVendorImplementation;
|
|
282
|
-
request_media_key_system_access_function?: MediaKeyFunc;
|
|
283
|
-
query_params?: Record<string, string>;
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* @public
|
|
288
|
-
*/
|
|
289
|
-
declare type DRMSourceConfiguration = {
|
|
290
|
-
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* @public
|
|
295
|
-
*/
|
|
296
|
-
declare type DRMVendorImplementation = {
|
|
297
|
-
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
298
|
-
fairplay_request_license: (url: string, params: {
|
|
299
|
-
message: any;
|
|
300
|
-
assetId: string;
|
|
301
|
-
}, cb: (license_data: Uint8Array) => void) => void;
|
|
302
|
-
};
|
|
303
|
-
|
|
304
267
|
/**
|
|
305
268
|
* @public
|
|
306
269
|
*/
|
|
@@ -535,13 +498,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
|
|
|
535
498
|
* @param selector - query selector of the HTML element where player will render
|
|
536
499
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
537
500
|
*/
|
|
538
|
-
(selector: string, config?: ConfigWithPlugins):
|
|
501
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
539
502
|
/**
|
|
540
503
|
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
541
504
|
* @param element - HTML element where player will render
|
|
542
505
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
543
506
|
*/
|
|
544
|
-
(element: HTMLElement, config?: ConfigWithPlugins):
|
|
507
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
545
508
|
}
|
|
546
509
|
|
|
547
510
|
/**
|
|
@@ -1181,6 +1144,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
|
1181
1144
|
*/
|
|
1182
1145
|
declare type PlayerWith<T> = T & Player;
|
|
1183
1146
|
|
|
1147
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
1148
|
+
opts: PluginConfig;
|
|
1149
|
+
setOpts: (config: PluginConfig) => void;
|
|
1150
|
+
};
|
|
1151
|
+
|
|
1184
1152
|
declare const PLAYING = "is-playing";
|
|
1185
1153
|
|
|
1186
1154
|
/**
|
|
@@ -1211,6 +1179,7 @@ declare interface Plugin_2<PluginConfig extends Config = Config, PluginPlayer ex
|
|
|
1211
1179
|
*/
|
|
1212
1180
|
declare interface PluginCtor<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
1213
1181
|
new (umd: FlowplayerUMD, player: Player): Plugin_2<PluginConfig, PluginPlayer>;
|
|
1182
|
+
pluginName: string;
|
|
1214
1183
|
}
|
|
1215
1184
|
|
|
1216
1185
|
/* Excluded from this release type: PluginRegisteredEventDetail */
|
|
@@ -1635,7 +1604,6 @@ declare type SourceObj<T = unknown> = {
|
|
|
1635
1604
|
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
1636
1605
|
*/
|
|
1637
1606
|
type?: string;
|
|
1638
|
-
drm?: DRMSourceConfiguration;
|
|
1639
1607
|
} & T;
|
|
1640
1608
|
|
|
1641
1609
|
/**
|
|
@@ -1865,8 +1833,6 @@ declare const WILL_PLAY = "will-play";
|
|
|
1865
1833
|
|
|
1866
1834
|
declare const WILL_SEEK = "will-seek";
|
|
1867
1835
|
|
|
1868
|
-
declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
|
|
1869
|
-
|
|
1870
1836
|
/**
|
|
1871
1837
|
* @public
|
|
1872
1838
|
*/
|
package/plugins/rts.js
CHANGED
|
@@ -22,4 +22,4 @@ function(e,t){var r=Mt,n=r.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}funct
|
|
|
22
22
|
* License: MIT
|
|
23
23
|
*/(n))}this.layers=void 0,this.player.emit("qualities",[])}_observe(){var e,t,r;null===(e=this.engine)||void 0===e||e.on("broadcastEvent",e=>{const{name:t,data:r}=e;switch(t){case"active":return this._handleActive(r);case"viewercount":return this._handleViewerCount(r.viewercount);case"layers":return this._handleQualityLayers(r.medias);case"inactive":return this._handleInactive()}}),null===(r=null===(t=this.engine)||void 0===t?void 0:t.webRTCPeer)||void 0===r||r.on("stats",e=>{if(this.status==ho.Idle)return;const t=_e.diagnose();this.player.emit("rts/stats",{stats:e,millicastDiagnostic:t})})}async _connect(){const e=this.engine;e&&await e.connect(Object.assign(Object.assign({},MillicastAdapter.Options),{peerConfig:{statsIntervalMs:5e3,autoInitStats:!0}}))}}function po(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?po(Object(r),!0).forEach((function(t){bo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):po(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function go(e,t,r,n,s,i,o){try{var a=e[i](o),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,s)}function yo(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var i=e.apply(t,r);function o(e){go(i,n,s,o,a,"next",e)}function a(e){go(i,n,s,o,a,"throw",e)}o(void 0)}))}}function bo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vo(){}function wo(){wo.init.call(this)}function So(e){return void 0===e._maxListeners?wo.defaultMaxListeners:e._maxListeners}function Ro(e,t,r){if(t)e.call(r);else for(var n=e.length,s=Lo(e,n),i=0;i<n;++i)s[i].call(r)}function xo(e,t,r,n){if(t)e.call(r,n);else for(var s=e.length,i=Lo(e,s),o=0;o<s;++o)i[o].call(r,n)}function ko(e,t,r,n,s){if(t)e.call(r,n,s);else for(var i=e.length,o=Lo(e,i),a=0;a<i;++a)o[a].call(r,n,s)}function _o(e,t,r,n,s,i){if(t)e.call(r,n,s,i);else for(var o=e.length,a=Lo(e,o),c=0;c<o;++c)a[c].call(r,n,s,i)}function Io(e,t,r,n){if(t)e.apply(r,n);else for(var s=e.length,i=Lo(e,s),o=0;o<s;++o)i[o].apply(r,n)}function Co(e,t,r,n){var s,i,o,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]):(i=e._events=new vo,e._eventsCount=0),o){if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),!o.warned&&(s=So(e))&&s>0&&o.length>s){o.warned=!0;var c=Error("Possible EventEmitter memory leak detected. "+o.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,a=c,"function"==typeof console.warn?console.warn(a):console.log(a)}}else o=i[t]=r,++e._eventsCount;return e}function Eo(e,t,r){var n=!1;function s(){e.removeListener(t,s),n||(n=!0,r.apply(e,arguments))}return s.listener=r,s}function To(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function Lo(e,t){for(var r=Array(t);t--;)r[t]=e[t];return r}MillicastAdapter.Events={ACTIVE:"rts/millicast/active",INACTIVE:"rts/millicast/inactive"},MillicastAdapter.Type="wowza/rts",MillicastAdapter.Options={events:["active","inactive","viewercount","layers"]},MillicastAdapter.WOWZA_DIRECTOR_ENDPOINT="https://realtime1.wowza.com",vo.prototype=Object.create(null),wo.EventEmitter=wo,wo.usingDomains=!1,wo.prototype.domain=void 0,wo.prototype._events=void 0,wo.prototype._maxListeners=void 0,wo.defaultMaxListeners=10,wo.init=function(){this.domain=null,wo.usingDomains&&(void 0).active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new vo,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},wo.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},wo.prototype.getMaxListeners=function(){return So(this)},wo.prototype.emit=function(e){var t,r,n,s,i,o,a,c="error"===e;if(o=this._events)c=c&&null==o.error;else if(!c)return!1;if(a=this.domain,c){if(t=arguments[1],!a){if(t instanceof Error)throw t;var l=Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}return t||(t=Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(r=o[e]))return!1;var u="function"==typeof r;switch(n=arguments.length){case 1:Ro(r,u,this);break;case 2:xo(r,u,this,arguments[1]);break;case 3:ko(r,u,this,arguments[1],arguments[2]);break;case 4:_o(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(s=Array(n-1),i=1;i<n;i++)s[i-1]=arguments[i];Io(r,u,this,s)}return!0},wo.prototype.addListener=function(e,t){return Co(this,e,t,!1)},wo.prototype.on=wo.prototype.addListener,wo.prototype.prependListener=function(e,t){return Co(this,e,t,!0)},wo.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,Eo(this,e,t)),this},wo.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Eo(this,e,t)),this},wo.prototype.removeListener=function(e,t){var r,n,s,i,o;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[e]))return this;if(r===t||r.listener&&r.listener===t)0==--this._eventsCount?this._events=new vo:(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,i=r.length;i-- >0;)if(r[i]===t||r[i].listener&&r[i].listener===t){o=r[i].listener,s=i;break}if(s<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new vo,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,s=e.length;n<s;r+=1,n+=1)e[r]=e[n];e.pop()}(r,s);n.removeListener&&this.emit("removeListener",e,o||t)}return this},wo.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new vo,this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=new vo:delete r[e]),this;if(0===arguments.length){for(var n,s=Object.keys(r),i=0;i<s.length;++i)"removeListener"!==(n=s[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new vo,this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},wo.prototype.listeners=function(e){var t,r=this._events;return r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(t):[]},wo.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):To.call(e,t)},wo.prototype.listenerCount=To,wo.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Ao=window.RTCPeerConnection,Mo=window.RTCIceCandidate,Po=window.RTCSessionDescription;class b extends wo{constructor(e){super(),bo(this,"pc",void 0),this.pc=new Ao({iceServers:e}),"ontrack"in this.pc?this.pc.ontrack=this.handleTrackEvent.bind(this):this.pc.onaddstream=this.handleNewStreamEvent.bind(this)}getPeerConnection(){return this.pc}close(){this.pc.close()}setRemoteDescription(e){return this.pc.setRemoteDescription(new Po(e))}setLocalDescription(e){return this.pc.setLocalDescription(new Po(e))}createAnswer(){var e=this;return yo((function*(){return e.pc.createAnswer()}))()}createOffer(){var e=this;return yo((function*(){return e.pc.createOffer()}))()}attachIceCandidate(e){return this.pc.addIceCandidate(new Mo(e))}attachMediaStream(e){var t=this.pc,r=t.getSenders(),n=e.getTracks();r.length?n.forEach(e=>{r.filter(t=>{var r;return(null===(r=t.track)||void 0===r?void 0:r.kind)===e.kind}).forEach(t=>{t.replaceTrack(e)})}):n.forEach(r=>{t.addTrack(r,e)})}handleNewStreamEvent(e){var{stream:t}=e;this.emit("addstream",t)}handleTrackEvent(e){e.streams.forEach(e=>{this.emit("addstream",e)})}}class C{constructor(e,t,r){this.url=e,this.streamInfo=t,this.userData=r,bo(this,"ws",null),bo(this,"pendingCommands",new Map)}connect(){return this.ws?Promise.resolve(this.ws):new Promise((e,t)=>{var r=new WebSocket(this.url);r.binaryType="arraybuffer",r.onopen=()=>e(r),r.onerror=()=>t(),r.onclose=()=>t(),r.onmessage=this.handleSocketData.bind(this),this.ws=r})}disconnect(){this.ws&&(this.ws.close(),this.ws=null)}getOffer(){var e={direction:"play",command:"getOffer"};return this.streamInfo.secureToken&&(e.secureToken=this.streamInfo.secureToken),this.send(e)}sendOffer(e){return this.send({direction:"publish",command:"sendOffer",sdp:e})}sendResponse(e){return this.send({direction:"play",command:"sendResponse",sdp:e})}getAvailableStreams(){return this.send({direction:"play",command:"getAvailableStreams"})}send(e){var t=this;return yo((function*(){var r,n=t.ws||(yield t.connect());return t.pendingCommands.has(e.command)||t.pendingCommands.set(e.command,((r={}).promise=new Promise((e,t)=>{r.resolve=e,r.reject=t}),r)),n.send(JSON.stringify(mo(mo({},e),{},{streamInfo:t.streamInfo,userData:t.userData}))),t.pendingCommands.get(e.command).promise}))()}handleSocketData(e){var t,r=JSON.parse(e.data);200===r.status?(null!==(t=r.streamInfo)&&void 0!==t&&t.sessionId&&(this.streamInfo.sessionId=r.streamInfo.sessionId),this.pendingCommands.has(r.command)&&(this.pendingCommands.get(r.command).resolve(r),this.pendingCommands.delete(r.command))):this.pendingCommands.has(r.command)&&(this.pendingCommands.get(r.command).reject(r),this.pendingCommands.delete(r.command))}}var Oo="mozGetUserMedia"in navigator?"firefox":"webkitGetUserMedia"in navigator||!1===window.isSecureContext&&"webkitRTCPeerConnection"in window&&!("RTCIceGatherer"in window)?"chrome":navigator.mediaDevices&&navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)?"edge":window.RTCPeerConnection&&navigator.userAgent.match(/AppleWebKit\/(\d+)\./)?"safari":"unknown",Do=["vp9","vp8","h264","red","ulpfec","rtx"],Fo=["opus","isac","g722","pcmu","pcma","cn"];class S{constructor(e,t){this.videoOptions=e,this.audioOptions=t,bo(this,"audioIndex",-1),bo(this,"videoIndex",-1)}transformPlay(e){return e.sdp?(e.sdp=e.sdp.replace(/profile-level-id=(\w+)/gi,(e,t)=>{var r=parseInt(t,16),n=r>>16&255,s=r>>8&255,i=255&r;return n>66?(n=66,s=224,i=31):0===s&&(s=224),"profile-level-id=".concat((n<<16|s<<8|i).toString(16))}),e):e}transformPublish(e){var t=this.prepareSDP(e),r=this.videoOptions,n=this.audioOptions,s=null,i=()=>"m=audio"===s?n:"m=video"===s?r:null,o=t.filter(Boolean).map(e=>{var[t]=e.split(/\s|:/,1);switch(t){case"m=audio":case"m=video":var o="m=audio"===t?this.audioIndex:this.videoIndex;if(-1!==o&&"chrome"===Oo){var[a,c,l]=e.split(" ");return"".concat(a," ").concat(c," ").concat(l," ").concat(o)}s=t;break;case"a=rtpmap":var u=/^a=rtpmap:(\d+)\s+(\w+)\/(\d+)/.exec(e);if(!u||"chrome"!==Oo)break;var d=u[2].toLowerCase();r.bitRate&&Do.includes(d)&&(e+="\r\na=fmtp:".concat(u[1]," x-google-min-bitrate=").concat(r.bitRate,";x-google-max-bitrate=").concat(r.bitRate)),n.bitRate&&Fo.includes(d)&&(e+="\r\na=fmtp:".concat(u[1]," x-google-min-bitrate=").concat(n.bitRate,";x-google-max-bitrate=").concat(n.bitRate));break;case"c=IN":var h=i();if(null!=h&&h.bitRate&&["firefox","safari"].includes(Oo)){var f=1e3*h.bitRate;e+="\r\nb=TIAS:".concat(.95*f-16e3),e+="\r\nb=AS:".concat(f),e+="\r\nb=CT:".concat(f)}break;case"a=mid":var p=i();p&&"chrome"===Oo&&(p.bitRate&&(e+="\r\nb=CT:".concat(p.bitRate),e+="\r\nb=AS:".concat(p.bitRate),"frameRate"in p&&p.frameRate&&(e+="\r\na=framerate:".concat(p.frameRate.toFixed(2)))),s=null)}return e}).join("\r\n")+"\r\n";return{type:e.type,sdp:o}}checkLine(e,t){if(/^a=(rtpmap|rtcp-fb|fmtp)/.test(e)){var r=e.split(":");if(r.length>1){var[n,s]=r[1].split(" ");if(!s.startsWith("http")&&!s.startsWith("ur")){var i=parseInt(n,10),o=t.get(i)||[];return o.push(e),t.set(i,o),!1}}}return!0}deliverCheckLine(e,t,r){var n=Array.from(r).find(t=>{var[,r]=t;return r.join("\r\n").includes(e)});if(!n)return[];var[s,i]=n;return"audio"===t?this.audioIndex=s:this.videoIndex=s,"VP8"!==e&&"VP9"!==e?i:i.filter(e=>!e.includes("transport-cc")&&!e.includes("goog-remb")&&!e.includes("nack"))}addAudio(e,t){for(var r="",n=0,s=e.length;n<s;++n){var i=e[n];if(i.startsWith("m=audio"))r="audio";else if(i.startsWith("m=video"))r="video";else if("a=rtcp-mux"===i&&"audio"===r){var o=this.deliverCheckLine(this.audioOptions.codec,"audio",t);e.splice(n+1,0,...o);break}}return e}addVideo(e,t){var r=e.includes("a=rtcp-rsize"),n=e.includes("a=rtcp-mux"),s=!1;if(!r&&!n)return e;var i=this.deliverCheckLine(this.videoOptions.codec,"video",t);return e.map(e=>{if(r){if(!s&&"a=rtcp-rsize"===e)return s=!0,[e].concat(i).join("\r\n")}else if("a=rtcp-mux"===e){if(s)return[e].concat(i).join("\r\n");s=!0}return e})}flattenLines(e){return e.join("\r\n").split("\r\n")}prepareSDP(e){var t=new Map,r=(e.sdp||"").split(/\r\n/);return r=r.filter(e=>e&&this.checkLine(e,t)),r=this.flattenLines(this.addAudio(r,t)),this.flattenLines(this.addVideo(r,t))}}class x extends wo{constructor(e,t){super(),this.video=e,bo(this,"sdpUrl",""),bo(this,"applicationName",""),bo(this,"streamName",""),bo(this,"userData",null),bo(this,"sdpHandler",void 0),bo(this,"secureToken",void 0),bo(this,"constraints",{audio:!0,video:!0}),bo(this,"videoConfigs",{bitRate:360,codec:"42e01f",frameRate:29.97}),bo(this,"audioConfigs",{codec:"opus",bitRate:64}),bo(this,"iceServers",[]),bo(this,"mediaStream",null),bo(this,"pc",null),t&&this.setConfigurations(t)}setConfigurations(e){e.constraints&&(this.constraints=e.constraints),e.videoConfigs&&(this.videoConfigs=e.videoConfigs),e.audioConfigs&&(this.audioConfigs=e.audioConfigs),e.applicationName&&(this.applicationName=e.applicationName),e.streamName&&(this.streamName=e.streamName),e.sdpUrl&&(this.sdpUrl=e.sdpUrl),void 0!==e.userData&&(this.userData=e.userData),e.iceServers&&(this.iceServers=e.iceServers),e.sdpHandler&&(this.sdpHandler=e.sdpHandler),e.secureToken&&(this.secureToken=e.secureToken)}stop(){this.pc&&(this.pc.close(),this.pc=null)}getMediaStream(){return this.mediaStream}getPeerConnection(){return this.pc?this.pc.getPeerConnection():null}playLocal(e){var t=this;return yo((function*(){e&&(t.constraints=e);var r=yield function(e){var t;return null!==(t=navigator.mediaDevices)&&void 0!==t&&t.getUserMedia?navigator.mediaDevices.getUserMedia(e):"getUserMedia"in navigator?new Promise((t,r)=>{navigator.getUserMedia(e,t,r)}):Promise.reject("Your browser does not support getUserMedia API")}(t.constraints);return t.attachStream(r),r}))()}stopLocal(){this.stop(),this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>{e.stop()}),this.mediaStream=null)}playRemote(e){var t=this;return yo((function*(){e&&t.setConfigurations(e);var r=t.createWowzaInstance();try{var{sdp:n}=yield r.getOffer(),s=t.createPeerConnection();s.on("addstream",t.attachStream.bind(t)),yield s.setRemoteDescription(n);var i=yield s.createAnswer(),o=new S(t.videoConfigs,t.audioConfigs),a=t.sdpHandler?t.sdpHandler(i,e=>o.transformPlay(e),"play"):o.transformPlay(i);yield s.setLocalDescription(a);var{iceCandidates:c}=yield r.sendResponse(a);c.forEach(e=>{s.attachIceCandidate(e)})}finally{r.disconnect()}}))()}publish(e){var t=this;return yo((function*(){e&&t.setConfigurations(e);var r=t.createWowzaInstance();try{var n=t.mediaStream||(yield t.playLocal()),s=t.createPeerConnection();s.attachMediaStream(n);var i=new S(t.videoConfigs,t.audioConfigs),o=yield s.createOffer(),a=t.sdpHandler?t.sdpHandler(o,e=>i.transformPublish(e),"publish"):i.transformPublish(o);yield s.setLocalDescription(a);var{sdp:c,iceCandidates:l}=yield r.sendOffer(a);yield s.setRemoteDescription(c),l.forEach(e=>{s.attachIceCandidate(e)})}finally{r.disconnect()}}))()}getAvailableStreams(){var e=this;return yo((function*(){var t=e.createWowzaInstance();try{var{availableStreams:r}=yield t.getAvailableStreams();return r||[]}catch(e){return[]}finally{t.disconnect()}}))()}createWowzaInstance(){return new C(this.sdpUrl,{applicationName:this.applicationName,sessionId:"[empty]",streamName:this.streamName,secureToken:this.secureToken},this.userData)}createPeerConnection(){return this.pc=new b(this.iceServers),this.pc}attachStream(e){this.mediaStream=e;try{var t=this.video.srcObject instanceof MediaStream&&this.video.srcObject;t&&t.id===e.id||(this.video.srcObject=e)}catch(t){this.video.src=window.URL.createObjectURL(e)}this.pc&&this.pc.attachMediaStream(e),this.video.play()}}
|
|
24
24
|
/*! For license information please see webrtc-stats.js.LICENSE.txt */
|
|
25
|
-
var jo=function(e){var t={exports:{}};return e(t,t.exports),t.exports}((function(e,t){!function(t,r){e.exports=r()}(self,()=>{return e={7:e=>{var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function s(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,s)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var s,i,o,l;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(s=c(e))>0&&o.length>s&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=u.bind(n);return s.listener=r,n.wrapFn=s,s}function h(e,t,r){var n=e._events;if(void 0===n)return[];var s=n[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(s):p(s,s.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function s(i){n.once&&e.removeEventListener(t,s),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var s="error"===e,i=this._events;if(void 0!==i)s=s&&void 0===i.error;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=p(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,s,i,o;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,s=i;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,s),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var s,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(s=i[n])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return h(this,e,!0)},i.prototype.rawListeners=function(e){return h(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},586:function(e,t,r){var n,s;!function(i){var o,a={VERSION:"1.6.1"},c={},l=function(e,t){return function(){return t.apply(e,arguments)}},u=function(){var e,t,r=arguments,n=r[0];for(t=1;t<r.length;t++)for(e in r[t])!(e in n)&&r[t].hasOwnProperty(e)&&(n[e]=r[t][e]);return n},d=function(e,t){return{value:e,name:t}};a.TRACE=d(1,"TRACE"),a.DEBUG=d(2,"DEBUG"),a.INFO=d(3,"INFO"),a.TIME=d(4,"TIME"),a.WARN=d(5,"WARN"),a.ERROR=d(8,"ERROR"),a.OFF=d(99,"OFF");var h=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};h.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},trace:function(){this.invoke(a.TRACE,arguments)},debug:function(){this.invoke(a.DEBUG,arguments)},info:function(){this.invoke(a.INFO,arguments)},warn:function(){this.invoke(a.WARN,arguments)},error:function(){this.invoke(a.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(a.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(a.TIME,[e,"end"])},invoke:function(e,t){o&&this.enabledFor(e)&&o(t,u({level:e},this.context))}};var f,p=new h({filterLevel:a.OFF});(f=a).enabledFor=l(p,p.enabledFor),f.trace=l(p,p.trace),f.debug=l(p,p.debug),f.time=l(p,p.time),f.timeEnd=l(p,p.timeEnd),f.info=l(p,p.info),f.warn=l(p,p.warn),f.error=l(p,p.error),f.log=f.info,a.setHandler=function(e){o=e},a.setLevel=function(e){for(var t in p.setLevel(e),c)c.hasOwnProperty(t)&&c[t].setLevel(e)},a.getLevel=function(){return p.getLevel()},a.get=function(e){return c[e]||(c[e]=new h(u({name:e},p.context)))},a.createDefaultHandler=function(e){(e=e||{}).formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},r=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(n,s){n=Array.prototype.slice.call(n);var i,o=console.log;s.level===a.TIME?(i=(s.name?"["+s.name+"] ":"")+n[0],"start"===n[1]?console.time?console.time(i):t[i]=(new Date).getTime():console.timeEnd?console.timeEnd(i):r(o,[i+": "+((new Date).getTime()-t[i])+"ms"])):(s.level===a.WARN&&console.warn?o=console.warn:s.level===a.ERROR&&console.error?o=console.error:s.level===a.INFO&&console.info?o=console.info:s.level===a.DEBUG&&console.debug?o=console.debug:s.level===a.TRACE&&console.trace&&(o=console.trace),e.formatter(n,s),r(o,n))}},a.useDefaults=function(e){a.setLevel(e&&e.defaultLevel||a.DEBUG),a.setHandler(a.createDefaultHandler(e))},a.setDefaults=a.useDefaults,void 0===(s="function"==typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=s)}()},156:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;var o=r(586);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return i(o).default}}),s(r(284),t),s(r(280),t),s(r(738),t),s(r(767),t)},738:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.QualityLimitationReason=void 0,function(e){e[e.none=0]="none",e[e.cpu=1]="cpu",e[e.bandwidth=2]="bandwidth",e[e.other=3]="other"}(r||(t.QualityLimitationReason=r={}))},280:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},767:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},185:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePacketsLostRatio=t.calculateRate=t.getMediaKind=void 0,t.getMediaKind=e=>{let t=e.kind||e.mediaType;return["audio","video"].includes(t)||"inbound-rtp"!==e.type||(t=e.id.toLocaleLowerCase().includes("video")?"video":"audio"),t},t.calculateRate=(e,t,r,n)=>r&&n?(t-n)/((e-r)/1e3):0,t.calculatePacketsLostRatio=(e,t,r,n)=>0==t?0:(e-(null!=r?r:0))/(t-(null!=n?n:0))},284:function(e,t,r){var n,s,i,o,a,c,l,u,d,h,f,p,m,g,y,v,w=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))},R=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},k=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},_=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WebRTCStats=void 0;const I=r(7),E=_(r(586)),T=r(738),L=r(185);class P extends I.EventEmitter{constructor(e){super(),n.add(this),s.set(this,void 0),i.set(this,void 0),o.set(this,void 0),a.set(this,null),c.set(this,void 0),l.set(this,null),this.start=()=>{k(this,c,"f").info("WebRTC statistics collection is starting..."),R(this,l,null,"f"),R(this,a,setInterval(k(this,u,"f"),k(this,i,"f")),"f")},this.stop=()=>{k(this,a,"f")&&(clearInterval(k(this,a,"f")),R(this,a,null,"f"),k(this,c,"f").info("WebRTC statistics collection has stopped."))},u.set(this,()=>w(this,void 0,void 0,(function*(){let e,t;try{k(this,c,"f").trace("Requesting WebRTC statistics..."),e=yield k(this,s,"f").call(this),t=(new Date).toISOString()}catch(e){return k(this,c,"f").error("Problem collecting the WebRTC statistics.",e),void this.emit("error","Problem collecting the WebRTC statistics - "+e)}const r=Array.from(e.values()),i={timestamp:t,input:{audio:[],video:[]},output:{audio:[],video:[]}};k(this,o,"f")&&(i.rawStats=e);for(let t=0;t<Object.keys(r).length;t++){const s=r[t];switch(s.type){case"outbound-rtp":const t=s,r=(0,L.getMediaKind)(t);"audio"===r?yield k(this,n,"m",f).call(this,e,t,i):"video"===r&&(yield k(this,n,"m",p).call(this,e,t,i));break;case"inbound-rtp":const o=s;let a=(0,L.getMediaKind)(o);"audio"===a?yield k(this,n,"m",g).call(this,e,o,i):"video"===a&&(yield k(this,n,"m",y).call(this,e,o,i));break;case"candidate-pair":const c=s;c.nominated&&k(this,n,"m",v).call(this,c,i)}}R(this,l,i,"f"),this.emit("stats",i)}))),R(this,c,E.default.get("WebRTCStats"),"f"),R(this,s,e.getStats,"f"),R(this,i,e.getStatsInterval||1e3,"f"),R(this,o,!!e.includeRawStats,"f")}}t.WebRTCStats=P,s=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,n=new WeakSet,d=function(e,t){if(t){const r=e.get(t);if(r)return{mimeType:r.mimeType}}return{}},h=function(e,t,r){return w(this,void 0,void 0,(function*(){var s,i,o,a;const c=(0,L.calculateRate)(t.timestamp,t.bytesSent,null==r?void 0:r.timestamp,null==r?void 0:r.totalBytesSent),l=(0,L.calculateRate)(t.timestamp,t.packetsSent,null==r?void 0:r.timestamp,null==r?void 0:r.totalPacketsSent),u=k(this,n,"m",d).call(this,e,t.codecId);return Object.assign({id:t.id,timestamp:t.timestamp,mid:t.mid,totalBytesSent:t.bytesSent,bytesSentDelta:t.bytesSent-(null!==(s=null==r?void 0:r.totalBytesSent)&&void 0!==s?s:0),totalPacketsSent:t.packetsSent,packetsSentDelta:t.packetsSent-(null!==(i=null==r?void 0:r.totalPacketsSent)&&void 0!==i?i:0),bitrate:c,packetRate:l,targetBitrate:t.targetBitrate,retransmittedPacketsSent:t.retransmittedPacketsSent,retransmittedPacketsSentDelta:t.retransmittedPacketsSent-(null!==(o=null==r?void 0:r.retransmittedPacketsSent)&&void 0!==o?o:0),retransmittedBytesSent:t.retransmittedBytesSent,retransmittedBytesSentDelta:t.retransmittedBytesSent-(null!==(a=null==r?void 0:r.retransmittedBytesSent)&&void 0!==a?a:0)},u)}))},f=function(e,t,r){return w(this,void 0,void 0,(function*(){var s;const i=null===(s=k(this,l,"f"))||void 0===s?void 0:s.output.audio.find(e=>e.id===t.id);if(i&&t.timestamp-i.timestamp<=0)return;const o=yield k(this,n,"m",h).call(this,e,t,i),a=Object.assign({},o);r.output.audio.push(a)}))},p=function(e,t,r){return w(this,void 0,void 0,(function*(){var s;const i=null===(s=k(this,l,"f"))||void 0===s?void 0:s.output.video.find(e=>e.id===t.id);if(i&&t.timestamp-i.timestamp<=0)return;const o=yield k(this,n,"m",h).call(this,e,t,i);let a=T.QualityLimitationReason.none;t.qualityLimitationReason&&(a=t.qualityLimitationReason);const c=Object.assign(Object.assign({},o),{frameWidth:t.frameWidth,frameHeight:t.frameHeight,framesPerSecond:t.framesPerSecond,framesSent:t.framesSent,qualityLimitationReason:a,qualityLimitationDurations:t.qualityLimitationDurations});r.output.video.push(c)}))},m=function(e,t,r){return w(this,void 0,void 0,(function*(){var s,i;const o=(0,L.calculateRate)(t.timestamp,t.bytesReceived,null==r?void 0:r.timestamp,null==r?void 0:r.totalBytesReceived),a=(0,L.calculateRate)(t.timestamp,t.packetsReceived,null==r?void 0:r.timestamp,null==r?void 0:r.totalPacketsReceived),c=(0,L.calculatePacketsLostRatio)(t.packetsReceived,t.packetsLost,null==r?void 0:r.totalPacketsReceived,null==r?void 0:r.totalPacketsLost),l=(null!==(s=t.packetsLost)&&void 0!==s?s:0)-(null!==(i=null==r?void 0:r.totalPacketsLost)&&void 0!==i?i:0),u=k(this,n,"m",d).call(this,e,t.codecId);return Object.assign({id:t.id,timestamp:t.timestamp,mid:t.mid,trackIdentifier:t.trackIdentifier,jitter:t.jitter,jitterBufferDelay:t.jitterBufferDelay,jitterBufferEmittedCount:t.jitterBufferEmittedCount,totalBytesReceived:t.bytesReceived,totalPacketsReceived:t.packetsReceived,totalPacketsLost:t.packetsLost,bitrate:o,packetRate:a,packetLossRatio:c,packetLossDelta:l},u)}))},g=function(e,t,r){return w(this,void 0,void 0,(function*(){var s;const i=null===(s=k(this,l,"f"))||void 0===s?void 0:s.input.audio.find(e=>e.id===t.id);if(i&&t.timestamp-i.timestamp<=0)return;const o=yield k(this,n,"m",m).call(this,e,t,i);r.input.audio.push(o)}))},y=function(e,t,r){return w(this,void 0,void 0,(function*(){var s;const i=null===(s=k(this,l,"f"))||void 0===s?void 0:s.input.video.find(e=>e.id===t.id);if(i&&t.timestamp-i.timestamp<=0)return;const o=yield k(this,n,"m",m).call(this,e,t,i),a=Object.assign(Object.assign({},o),{keyFramesDecoded:t.keyFramesDecoded,frameHeight:t.frameHeight,frameWidth:t.frameWidth,framesDecoded:t.framesDecoded,framesDropped:t.framesDropped,framesPerSecond:t.framesPerSecond,framesReceived:t.framesReceived});r.input.video.push(a)}))},v=function(e,t){t.totalRoundTripTime=e.totalRoundTripTime,t.currentRoundTripTime=e.currentRoundTripTime,t.responsesReceived=e.responsesReceived,t.availableOutgoingBitrate=e.availableOutgoingBitrate,t.availableIncomingBitrate=e.availableIncomingBitrate}}},t={},function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}(156);var e,t})}));class WowzaWebRTCAdapter{static wants(e){return e.type==WowzaWebRTCAdapter.Type}constructor(e,r,n=t("rts/webrtc")){this.player=e,this.src=r,this.log=n,this.hasReportedError=!1}async load(){this.log("loading",this.src.streamName),this.player.original_src=this.src.sdpUrl,this.engine=new x(this.player,this.src),await this.playRemote()}retry(){!1!==this.player.opts.retry&&setTimeout(()=>{0!=this.player.reaper&&this.engine&&this.playRemote()},3e3)}async playRemote(){var e;if(this.engine)try{await this.engine.playRemote(),this.addStatsTracking(),this.player.emit("recover")}catch(t){if(this.retry(),this.hasReportedError)return;this.player.emit("error",null!==(e=t)&&void 0!==e?e:{fatal:!1,message:"failed to connect to stream"}),this.hasReportedError=!0}}addStatsTracking(){if(!this.engine)return;const e=this.engine.getPeerConnection();e&&(this.stats=new jo.WebRTCStats({getStatsInterval:5e3,getStats:()=>e.getStats()}),this.stats.start(),this.stats.on("stats",e=>{this.player.emit("rts/stats",{stats:e})}))}stop(){var e,t;null===(e=this.engine)||void 0===e||e.stop(),null===(t=this.stats)||void 0===t||t.stop(),this.engine=void 0}}WowzaWebRTCAdapter.Events={ACTIVE:"rts/wowza-webrtc/active",INACTIVE:"rts/webrtc/inactive"},WowzaWebRTCAdapter.Type="wowza/webrtc";class RTSLoader{constructor(){this.log=t("rts")}init(e,t,r){r.on("reap",()=>{var e;return null===(e=this.engine)||void 0===e?void 0:e.stop()}),r.on("src",()=>{this.engine&&(this.engine.stop(),r.srcObject=null,this.engine=void 0)})}onload(e,t,r,n){var s;switch(n.type){case MillicastAdapter.Type:this.engine=new MillicastAdapter(r,n);break;case WowzaWebRTCAdapter.Type:this.engine=new WowzaWebRTCAdapter(r,n)}null===(s=this.engine)||void 0===s||s.load()}wants(e,t,r){return"string"==typeof t.type&&(MillicastAdapter.wants(t)||WowzaWebRTCAdapter.wants(t))}}RTSLoader.events=fo,RTSLoader.state=ho;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 r=e.flowplayer;return"function"==typeof r?(r(t),t):(Array.isArray(r.extensions)||(r.extensions=[]),~r.extensions.indexOf(t)||r.extensions.push(t),t)}(window,RTSLoader)}));
|
|
25
|
+
var jo=function(e){var t={exports:{}};return e(t,t.exports),t.exports}((function(e,t){!function(t,r){e.exports=r()}(self,()=>{return e={7:e=>{var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function s(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,s)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var s,i,o,l;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(s=c(e))>0&&o.length>s&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=u.bind(n);return s.listener=r,n.wrapFn=s,s}function h(e,t,r){var n=e._events;if(void 0===n)return[];var s=n[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(s):p(s,s.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function s(i){n.once&&e.removeEventListener(t,s),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var s="error"===e,i=this._events;if(void 0!==i)s=s&&void 0===i.error;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=p(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,s,i,o;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,s=i;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,s),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var s,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(s=i[n])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return h(this,e,!0)},i.prototype.rawListeners=function(e){return h(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},586:function(e,t,r){var n,s;!function(i){var o,a={VERSION:"1.6.1"},c={},l=function(e,t){return function(){return t.apply(e,arguments)}},u=function(){var e,t,r=arguments,n=r[0];for(t=1;t<r.length;t++)for(e in r[t])!(e in n)&&r[t].hasOwnProperty(e)&&(n[e]=r[t][e]);return n},d=function(e,t){return{value:e,name:t}};a.TRACE=d(1,"TRACE"),a.DEBUG=d(2,"DEBUG"),a.INFO=d(3,"INFO"),a.TIME=d(4,"TIME"),a.WARN=d(5,"WARN"),a.ERROR=d(8,"ERROR"),a.OFF=d(99,"OFF");var h=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};h.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},trace:function(){this.invoke(a.TRACE,arguments)},debug:function(){this.invoke(a.DEBUG,arguments)},info:function(){this.invoke(a.INFO,arguments)},warn:function(){this.invoke(a.WARN,arguments)},error:function(){this.invoke(a.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(a.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(a.TIME,[e,"end"])},invoke:function(e,t){o&&this.enabledFor(e)&&o(t,u({level:e},this.context))}};var f,p=new h({filterLevel:a.OFF});(f=a).enabledFor=l(p,p.enabledFor),f.trace=l(p,p.trace),f.debug=l(p,p.debug),f.time=l(p,p.time),f.timeEnd=l(p,p.timeEnd),f.info=l(p,p.info),f.warn=l(p,p.warn),f.error=l(p,p.error),f.log=f.info,a.setHandler=function(e){o=e},a.setLevel=function(e){for(var t in p.setLevel(e),c)c.hasOwnProperty(t)&&c[t].setLevel(e)},a.getLevel=function(){return p.getLevel()},a.get=function(e){return c[e]||(c[e]=new h(u({name:e},p.context)))},a.createDefaultHandler=function(e){(e=e||{}).formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},r=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(n,s){n=Array.prototype.slice.call(n);var i,o=console.log;s.level===a.TIME?(i=(s.name?"["+s.name+"] ":"")+n[0],"start"===n[1]?console.time?console.time(i):t[i]=(new Date).getTime():console.timeEnd?console.timeEnd(i):r(o,[i+": "+((new Date).getTime()-t[i])+"ms"])):(s.level===a.WARN&&console.warn?o=console.warn:s.level===a.ERROR&&console.error?o=console.error:s.level===a.INFO&&console.info?o=console.info:s.level===a.DEBUG&&console.debug?o=console.debug:s.level===a.TRACE&&console.trace&&(o=console.trace),e.formatter(n,s),r(o,n))}},a.useDefaults=function(e){a.setLevel(e&&e.defaultLevel||a.DEBUG),a.setHandler(a.createDefaultHandler(e))},a.setDefaults=a.useDefaults,void 0===(s="function"==typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=s)}()},156:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;var o=r(586);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return i(o).default}}),s(r(284),t),s(r(280),t),s(r(738),t),s(r(767),t)},738:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.QualityLimitationReason=void 0,function(e){e[e.none=0]="none",e[e.cpu=1]="cpu",e[e.bandwidth=2]="bandwidth",e[e.other=3]="other"}(r||(t.QualityLimitationReason=r={}))},280:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},767:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},185:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePacketsLostRatio=t.calculateRate=t.getMediaKind=void 0,t.getMediaKind=e=>{let t=e.kind||e.mediaType;return["audio","video"].includes(t)||"inbound-rtp"!==e.type||(t=e.id.toLocaleLowerCase().includes("video")?"video":"audio"),t},t.calculateRate=(e,t,r,n)=>r&&n?(t-n)/((e-r)/1e3):0,t.calculatePacketsLostRatio=(e,t,r,n)=>0==t?0:(e-(null!=r?r:0))/(t-(null!=n?n:0))},284:function(e,t,r){var n,s,i,o,a,c,l,u,d,h,f,p,m,g,y,v,w=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))},R=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},k=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},_=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WebRTCStats=void 0;const I=r(7),E=_(r(586)),T=r(738),L=r(185);class P extends I.EventEmitter{constructor(e){super(),n.add(this),s.set(this,void 0),i.set(this,void 0),o.set(this,void 0),a.set(this,null),c.set(this,void 0),l.set(this,null),this.start=()=>{k(this,c,"f").info("WebRTC statistics collection is starting..."),R(this,l,null,"f"),R(this,a,setInterval(k(this,u,"f"),k(this,i,"f")),"f")},this.stop=()=>{k(this,a,"f")&&(clearInterval(k(this,a,"f")),R(this,a,null,"f"),k(this,c,"f").info("WebRTC statistics collection has stopped."))},u.set(this,()=>w(this,void 0,void 0,(function*(){let e,t;try{k(this,c,"f").trace("Requesting WebRTC statistics..."),e=yield k(this,s,"f").call(this),t=(new Date).toISOString()}catch(e){return k(this,c,"f").error("Problem collecting the WebRTC statistics.",e),void this.emit("error","Problem collecting the WebRTC statistics - "+e)}const r=Array.from(e.values()),i={timestamp:t,input:{audio:[],video:[]},output:{audio:[],video:[]}};k(this,o,"f")&&(i.rawStats=e);for(let t=0;t<Object.keys(r).length;t++){const s=r[t];switch(s.type){case"outbound-rtp":const t=s,r=(0,L.getMediaKind)(t);"audio"===r?yield k(this,n,"m",f).call(this,e,t,i):"video"===r&&(yield k(this,n,"m",p).call(this,e,t,i));break;case"inbound-rtp":const o=s;let a=(0,L.getMediaKind)(o);"audio"===a?yield k(this,n,"m",g).call(this,e,o,i):"video"===a&&(yield k(this,n,"m",y).call(this,e,o,i));break;case"candidate-pair":const c=s;c.nominated&&k(this,n,"m",v).call(this,c,i)}}R(this,l,i,"f"),this.emit("stats",i)}))),R(this,c,E.default.get("WebRTCStats"),"f"),R(this,s,e.getStats,"f"),R(this,i,e.getStatsInterval||1e3,"f"),R(this,o,!!e.includeRawStats,"f")}}t.WebRTCStats=P,s=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,n=new WeakSet,d=function(e,t){if(t){const r=e.get(t);if(r)return{mimeType:r.mimeType}}return{}},h=function(e,t,r){return w(this,void 0,void 0,(function*(){var s,i,o,a;const c=(0,L.calculateRate)(t.timestamp,t.bytesSent,null==r?void 0:r.timestamp,null==r?void 0:r.totalBytesSent),l=(0,L.calculateRate)(t.timestamp,t.packetsSent,null==r?void 0:r.timestamp,null==r?void 0:r.totalPacketsSent),u=k(this,n,"m",d).call(this,e,t.codecId);return Object.assign({id:t.id,timestamp:t.timestamp,mid:t.mid,totalBytesSent:t.bytesSent,bytesSentDelta:t.bytesSent-(null!==(s=null==r?void 0:r.totalBytesSent)&&void 0!==s?s:0),totalPacketsSent:t.packetsSent,packetsSentDelta:t.packetsSent-(null!==(i=null==r?void 0:r.totalPacketsSent)&&void 0!==i?i:0),bitrate:c,packetRate:l,targetBitrate:t.targetBitrate,retransmittedPacketsSent:t.retransmittedPacketsSent,retransmittedPacketsSentDelta:t.retransmittedPacketsSent-(null!==(o=null==r?void 0:r.retransmittedPacketsSent)&&void 0!==o?o:0),retransmittedBytesSent:t.retransmittedBytesSent,retransmittedBytesSentDelta:t.retransmittedBytesSent-(null!==(a=null==r?void 0:r.retransmittedBytesSent)&&void 0!==a?a:0)},u)}))},f=function(e,t,r){return w(this,void 0,void 0,(function*(){var s;const i=null===(s=k(this,l,"f"))||void 0===s?void 0:s.output.audio.find(e=>e.id===t.id);if(i&&t.timestamp-i.timestamp<=0)return;const o=yield k(this,n,"m",h).call(this,e,t,i),a=Object.assign({},o);r.output.audio.push(a)}))},p=function(e,t,r){return w(this,void 0,void 0,(function*(){var s;const i=null===(s=k(this,l,"f"))||void 0===s?void 0:s.output.video.find(e=>e.id===t.id);if(i&&t.timestamp-i.timestamp<=0)return;const o=yield k(this,n,"m",h).call(this,e,t,i);let a=T.QualityLimitationReason.none;t.qualityLimitationReason&&(a=t.qualityLimitationReason);const c=Object.assign(Object.assign({},o),{frameWidth:t.frameWidth,frameHeight:t.frameHeight,framesPerSecond:t.framesPerSecond,framesSent:t.framesSent,qualityLimitationReason:a,qualityLimitationDurations:t.qualityLimitationDurations});r.output.video.push(c)}))},m=function(e,t,r){return w(this,void 0,void 0,(function*(){var s,i;const o=(0,L.calculateRate)(t.timestamp,t.bytesReceived,null==r?void 0:r.timestamp,null==r?void 0:r.totalBytesReceived),a=(0,L.calculateRate)(t.timestamp,t.packetsReceived,null==r?void 0:r.timestamp,null==r?void 0:r.totalPacketsReceived),c=(0,L.calculatePacketsLostRatio)(t.packetsReceived,t.packetsLost,null==r?void 0:r.totalPacketsReceived,null==r?void 0:r.totalPacketsLost),l=(null!==(s=t.packetsLost)&&void 0!==s?s:0)-(null!==(i=null==r?void 0:r.totalPacketsLost)&&void 0!==i?i:0),u=k(this,n,"m",d).call(this,e,t.codecId);return Object.assign({id:t.id,timestamp:t.timestamp,mid:t.mid,trackIdentifier:t.trackIdentifier,jitter:t.jitter,jitterBufferDelay:t.jitterBufferDelay,jitterBufferEmittedCount:t.jitterBufferEmittedCount,totalBytesReceived:t.bytesReceived,totalPacketsReceived:t.packetsReceived,totalPacketsLost:t.packetsLost,bitrate:o,packetRate:a,packetLossRatio:c,packetLossDelta:l},u)}))},g=function(e,t,r){return w(this,void 0,void 0,(function*(){var s;const i=null===(s=k(this,l,"f"))||void 0===s?void 0:s.input.audio.find(e=>e.id===t.id);if(i&&t.timestamp-i.timestamp<=0)return;const o=yield k(this,n,"m",m).call(this,e,t,i);r.input.audio.push(o)}))},y=function(e,t,r){return w(this,void 0,void 0,(function*(){var s;const i=null===(s=k(this,l,"f"))||void 0===s?void 0:s.input.video.find(e=>e.id===t.id);if(i&&t.timestamp-i.timestamp<=0)return;const o=yield k(this,n,"m",m).call(this,e,t,i),a=Object.assign(Object.assign({},o),{keyFramesDecoded:t.keyFramesDecoded,frameHeight:t.frameHeight,frameWidth:t.frameWidth,framesDecoded:t.framesDecoded,framesDropped:t.framesDropped,framesPerSecond:t.framesPerSecond,framesReceived:t.framesReceived});r.input.video.push(a)}))},v=function(e,t){t.totalRoundTripTime=e.totalRoundTripTime,t.currentRoundTripTime=e.currentRoundTripTime,t.responsesReceived=e.responsesReceived,t.availableOutgoingBitrate=e.availableOutgoingBitrate,t.availableIncomingBitrate=e.availableIncomingBitrate}}},t={},function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}(156);var e,t})}));class WowzaWebRTCAdapter{static wants(e){return e.type==WowzaWebRTCAdapter.Type}constructor(e,r,n=t("rts/webrtc")){this.player=e,this.src=r,this.log=n,this.hasReportedError=!1}async load(){this.log("loading",this.src.streamName),this.player.original_src=this.src.sdpUrl,this.engine=new x(this.player,this.src),await this.playRemote()}retry(){!1!==this.player.opts.retry&&setTimeout(()=>{0!=this.player.reaper&&this.engine&&this.playRemote()},3e3)}async playRemote(){var e;if(this.engine)try{await this.engine.playRemote(),this.addStatsTracking(),this.player.emit("recover")}catch(t){if(this.retry(),this.hasReportedError)return;this.player.emit("error",null!==(e=t)&&void 0!==e?e:{fatal:!1,message:"failed to connect to stream"}),this.hasReportedError=!0}}addStatsTracking(){if(!this.engine)return;const e=this.engine.getPeerConnection();e&&(this.stats=new jo.WebRTCStats({getStatsInterval:5e3,getStats:()=>e.getStats()}),this.stats.start(),this.stats.on("stats",e=>{this.player.emit("rts/stats",{stats:e})}))}stop(){var e,t;null===(e=this.engine)||void 0===e||e.stop(),null===(t=this.stats)||void 0===t||t.stop(),this.engine=void 0}}WowzaWebRTCAdapter.Events={ACTIVE:"rts/wowza-webrtc/active",INACTIVE:"rts/webrtc/inactive"},WowzaWebRTCAdapter.Type="wowza/webrtc";class RTSLoader{constructor(){this.log=t("rts")}init(e,t,r){r.on("reap",()=>{var e;return null===(e=this.engine)||void 0===e?void 0:e.stop()}),r.on("src",()=>{this.engine&&(this.engine.stop(),r.srcObject=null,this.engine=void 0)})}onload(e,t,r,n){var s;switch(n.type){case MillicastAdapter.Type:this.engine=new MillicastAdapter(r,n);break;case WowzaWebRTCAdapter.Type:this.engine=new WowzaWebRTCAdapter(r,n)}null===(s=this.engine)||void 0===s||s.load()}wants(e,t,r){return"string"==typeof t.type&&(MillicastAdapter.wants(t)||WowzaWebRTCAdapter.wants(t))}}RTSLoader.pluginName="rts",RTSLoader.events=fo,RTSLoader.state=ho;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 r=e.flowplayer;return"function"==typeof r?(r(t),t):(Array.isArray(r.extensions)||(r.extensions=[]),~r.extensions.indexOf(t)||r.extensions.push(t),t)}(window,RTSLoader)}));
|
package/plugins/share.d.ts
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import type { BitrateInfo } from 'dashjs';
|
|
4
4
|
import type { Get } from 'type-fest';
|
|
5
5
|
import type { Level } from 'hls.js';
|
|
6
|
-
import type { MediaKeyFunc } from 'hls.js';
|
|
7
|
-
import type { SetFieldType } from 'type-fest';
|
|
8
6
|
import type { TupleToUnion } from 'type-fest';
|
|
9
7
|
|
|
10
8
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -262,41 +260,6 @@ declare const DESTROYED = "is-destroyed";
|
|
|
262
260
|
|
|
263
261
|
declare const DISABLED = "is-disabled";
|
|
264
262
|
|
|
265
|
-
/**
|
|
266
|
-
* @public
|
|
267
|
-
*/
|
|
268
|
-
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @public
|
|
272
|
-
*/
|
|
273
|
-
declare type DRMConfiguration = {
|
|
274
|
-
license_server: string;
|
|
275
|
-
http_headers?: Record<string, string>;
|
|
276
|
-
certificate?: string;
|
|
277
|
-
vendor?: string | DRMVendorImplementation;
|
|
278
|
-
request_media_key_system_access_function?: MediaKeyFunc;
|
|
279
|
-
query_params?: Record<string, string>;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* @public
|
|
284
|
-
*/
|
|
285
|
-
declare type DRMSourceConfiguration = {
|
|
286
|
-
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* @public
|
|
291
|
-
*/
|
|
292
|
-
declare type DRMVendorImplementation = {
|
|
293
|
-
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
294
|
-
fairplay_request_license: (url: string, params: {
|
|
295
|
-
message: any;
|
|
296
|
-
assetId: string;
|
|
297
|
-
}, cb: (license_data: Uint8Array) => void) => void;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
263
|
/**
|
|
301
264
|
* @public
|
|
302
265
|
*/
|
|
@@ -523,13 +486,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
|
|
|
523
486
|
* @param selector - query selector of the HTML element where player will render
|
|
524
487
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
525
488
|
*/
|
|
526
|
-
(selector: string, config?: ConfigWithPlugins):
|
|
489
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
527
490
|
/**
|
|
528
491
|
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
529
492
|
* @param element - HTML element where player will render
|
|
530
493
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
531
494
|
*/
|
|
532
|
-
(element: HTMLElement, config?: ConfigWithPlugins):
|
|
495
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
533
496
|
}
|
|
534
497
|
|
|
535
498
|
/**
|
|
@@ -1146,6 +1109,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
|
1146
1109
|
*/
|
|
1147
1110
|
declare type PlayerWith<T> = T & Player;
|
|
1148
1111
|
|
|
1112
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
1113
|
+
opts: PluginConfig;
|
|
1114
|
+
setOpts: (config: PluginConfig) => void;
|
|
1115
|
+
};
|
|
1116
|
+
|
|
1149
1117
|
declare const PLAYING = "is-playing";
|
|
1150
1118
|
|
|
1151
1119
|
/**
|
|
@@ -1176,6 +1144,7 @@ declare interface Plugin_2<PluginConfig extends Config = Config, PluginPlayer ex
|
|
|
1176
1144
|
*/
|
|
1177
1145
|
declare interface PluginCtor<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
1178
1146
|
new (umd: FlowplayerUMD, player: Player): Plugin_2<PluginConfig, PluginPlayer>;
|
|
1147
|
+
pluginName: string;
|
|
1179
1148
|
}
|
|
1180
1149
|
|
|
1181
1150
|
/* Excluded from this release type: PluginRegisteredEventDetail */
|
|
@@ -1513,7 +1482,6 @@ declare type SourceObj<T = unknown> = {
|
|
|
1513
1482
|
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
1514
1483
|
*/
|
|
1515
1484
|
type?: string;
|
|
1516
|
-
drm?: DRMSourceConfiguration;
|
|
1517
1485
|
} & T;
|
|
1518
1486
|
|
|
1519
1487
|
/**
|
|
@@ -1739,6 +1707,4 @@ declare const WILL_PLAY = "will-play";
|
|
|
1739
1707
|
|
|
1740
1708
|
declare const WILL_SEEK = "will-seek";
|
|
1741
1709
|
|
|
1742
|
-
declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
|
|
1743
|
-
|
|
1744
1710
|
export { }
|